From 3285ca4372bd9d8de46fdee271072485173899c3 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Mon, 14 May 2018 11:09:30 -0700 Subject: [PATCH 01/13] Fixed bug in README.md example code The example code shows the way to access data as: ```javascript return state.contracts.SimpleStorage.methods.storedData[dataKey].value ``` But in fact 'methods' is not defined. Instead the state is: ```javascript return state.contracts.SimpleStorage.storedData[dataKey].value ``` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 53d7aaf5..b128529f 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends const dataKey = drizzle.contracts.SimpleStorage.methods.storedData.cacheCall() // Use the dataKey to display data from the store. - return state.contracts.SimpleStorage.methods.storedData[dataKey].value + return state.contracts.SimpleStorage.storedData[dataKey].value } // If Drizzle isn't initialized, display some loading indication. From 255a58963e2714234d8df616a62cac7d646dde38 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Mon, 14 May 2018 15:54:44 -0700 Subject: [PATCH 02/13] Added ability to configure with raw Web3 contract instances. - DrizzleContract is now instantiated with a Web3 Contract instance - ContractSaga now has another method to create DrizzleContracts from Web3 Contract instances - drizzleStatusSaga is aware of an alternate contract option form - abi references have been updated to be generic - README.md has been updated to include new options --- README.md | 14 +- dist/drizzle.js | 649 ++++++++++++++----------- package-lock.json | 2 +- src/DrizzleContract.js | 24 +- src/contracts/contractsReducer.js | 2 +- src/contracts/contractsSaga.js | 42 +- src/drizzleStatus/drizzleStatusSaga.js | 21 +- src/generateContractsInitialState.js | 9 +- src/generateStore.js | 8 +- src/getAbi.js | 7 + 10 files changed, 441 insertions(+), 337 deletions(-) create mode 100644 src/getAbi.js diff --git a/README.md b/README.md index b128529f..30daa3ba 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,19 @@ Drizzle has a number of configuration options so it only keeps track of exactly ``` ### `contracts` (array) -An array of contract artifact files. +An array of either contract artifact files or Web3 Contract objects. The objects have a `contractName` and `web3Contract` key. + +I.e. + +``` +contracts: [ + truffleArtifact, // A regular Truffle contract artifact + { + contractName: 'RegisteredContract', + web3Contract: new web3.eth.Contract(abi, address, {data: 'deployedBytecode' }) // An instance of a Web3 contract + } +] +``` ### `events` (object) An object consisting of contract names each containing an array of strings of the event names we'd like to listen for and sync with the store. diff --git a/dist/drizzle.js b/dist/drizzle.js index f835786d..c318b95c 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -7,7 +7,7 @@ exports["drizzle"] = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("web3")); else root["drizzle"] = factory(root["redux-saga"], root["redux"], root["eth-block-tracker-es5"], root["web3"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_18__, __WEBPACK_EXTERNAL_MODULE_46__, __WEBPACK_EXTERNAL_MODULE_82__, __WEBPACK_EXTERNAL_MODULE_128__) { +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_18__, __WEBPACK_EXTERNAL_MODULE_46__, __WEBPACK_EXTERNAL_MODULE_83__, __WEBPACK_EXTERNAL_MODULE_129__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 71); +/******/ return __webpack_require__(__webpack_require__.s = 72); /******/ }) /************************************************************************/ /******/ ([ @@ -136,7 +136,7 @@ exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProp /* 4 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(75); +module.exports = __webpack_require__(76); /***/ }), @@ -720,7 +720,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_18__; /* harmony export (immutable) */ __webpack_exports__["u"] = throttle; /* unused harmony export asEffect */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(77); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(78); @@ -1106,7 +1106,7 @@ exports.default = accountBalancesSaga; /* 21 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(83), __esModule: true }; +module.exports = { "default": __webpack_require__(84), __esModule: true }; /***/ }), /* 22 */ @@ -1148,7 +1148,7 @@ exports.f = {}.propertyIsEnumerable; exports.__esModule = true; -var _from = __webpack_require__(89); +var _from = __webpack_require__(90); var _from2 = _interopRequireDefault(_from); @@ -1240,7 +1240,7 @@ function fsmIterator(fsm, q0) { /* unused harmony export stdChannel */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffers__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(80); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -1671,63 +1671,92 @@ var _regenerator = __webpack_require__(4); var _regenerator2 = _interopRequireDefault(_regenerator); +exports.instantiateWeb3Contract = instantiateWeb3Contract; exports.instantiateContract = instantiateContract; var _reduxSaga = __webpack_require__(18); var _effects = __webpack_require__(5); -var _DrizzleContract = __webpack_require__(120); +var _DrizzleContract = __webpack_require__(121); var _DrizzleContract2 = _interopRequireDefault(_DrizzleContract); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _marked = /*#__PURE__*/_regenerator2.default.mark(instantiateContract), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(callListenForContractEvent), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(callSendContractTx), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(callCallContractFn), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(callSyncContract), - _marked6 = /*#__PURE__*/_regenerator2.default.mark(contractsSaga); +var _marked = /*#__PURE__*/_regenerator2.default.mark(instantiateWeb3Contract), + _marked2 = /*#__PURE__*/_regenerator2.default.mark(instantiateContract), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(callListenForContractEvent), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendContractTx), + _marked5 = /*#__PURE__*/_regenerator2.default.mark(callCallContractFn), + _marked6 = /*#__PURE__*/_regenerator2.default.mark(callSyncContract), + _marked7 = /*#__PURE__*/_regenerator2.default.mark(contractsSaga); /* * Instantiation */ -function instantiateContract(_ref) { - var contractArtifact = _ref.contractArtifact, +function instantiateWeb3Contract(_ref) { + var web3Contract = _ref.web3Contract, + name = _ref.name, events = _ref.events, store = _ref.store, web3 = _ref.web3; - var networkId; - return _regenerator2.default.wrap(function instantiateContract$(_context) { + return _regenerator2.default.wrap(function instantiateWeb3Contract$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - _context.next = 2; + return _context.abrupt('return', new _DrizzleContract2.default(web3Contract, web3, name, store, events)); + + case 1: + case 'end': + return _context.stop(); + } + } + }, _marked, this); +} + +function instantiateContract(_ref2) { + var contractArtifact = _ref2.contractArtifact, + events = _ref2.events, + store = _ref2.store, + web3 = _ref2.web3; + var networkId, web3Contract; + return _regenerator2.default.wrap(function instantiateContract$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; return (0, _effects.select)(getNetworkId); case 2: - networkId = _context.sent; - return _context.abrupt('return', new _DrizzleContract2.default(contractArtifact, web3, networkId, store, events)); + networkId = _context2.sent; - case 4: + + // Instantiate the contract. + web3Contract = new web3.eth.Contract(contractArtifact.abi, contractArtifact.networks[networkId].address, { + from: store.getState().accounts[0], + data: contractArtifact.deployedBytecode + }); + return _context2.abrupt('return', new _DrizzleContract2.default(web3Contract, web3, contractArtifact.contractName, store, events)); + + case 5: case 'end': - return _context.stop(); + return _context2.stop(); } } - }, _marked, this); + }, _marked2, this); } /* * Events */ -function createContractEventChannel(_ref2) { - var contract = _ref2.contract, - eventName = _ref2.eventName; +function createContractEventChannel(_ref3) { + var contract = _ref3.contract, + eventName = _ref3.eventName; - var name = contract.contractArtifact.contractName; + var name = contract.contractName; return (0, _reduxSaga.eventChannel)(function (emit) { var eventListener = contract.events[eventName]().on('data', function (event) { @@ -1747,56 +1776,56 @@ function createContractEventChannel(_ref2) { }); } -function callListenForContractEvent(_ref3) { - var contract = _ref3.contract, - eventName = _ref3.eventName; +function callListenForContractEvent(_ref4) { + var contract = _ref4.contract, + eventName = _ref4.eventName; var contractEventChannel, event; - return _regenerator2.default.wrap(function callListenForContractEvent$(_context2) { + return _regenerator2.default.wrap(function callListenForContractEvent$(_context3) { while (1) { - switch (_context2.prev = _context2.next) { + switch (_context3.prev = _context3.next) { case 0: - _context2.next = 2; + _context3.next = 2; return (0, _effects.call)(createContractEventChannel, { contract: contract, eventName: eventName }); case 2: - contractEventChannel = _context2.sent; + contractEventChannel = _context3.sent; case 3: if (false) { - _context2.next = 11; + _context3.next = 11; break; } - _context2.next = 6; + _context3.next = 6; return (0, _effects.take)(contractEventChannel); case 6: - event = _context2.sent; - _context2.next = 9; + event = _context3.sent; + _context3.next = 9; return (0, _effects.put)(event); case 9: - _context2.next = 3; + _context3.next = 3; break; case 11: case 'end': - return _context2.stop(); + return _context3.stop(); } } - }, _marked2, this); + }, _marked3, this); } /* * Send and Cache */ -function createTxChannel(_ref4) { - var txObject = _ref4.txObject, - stackId = _ref4.stackId, - _ref4$sendArgs = _ref4.sendArgs, - sendArgs = _ref4$sendArgs === undefined ? {} : _ref4$sendArgs, - contractName = _ref4.contractName; +function createTxChannel(_ref5) { + var txObject = _ref5.txObject, + stackId = _ref5.stackId, + _ref5$sendArgs = _ref5.sendArgs, + sendArgs = _ref5$sendArgs === undefined ? {} : _ref5$sendArgs, + contractName = _ref5.contractName; var persistTxHash; @@ -1824,16 +1853,16 @@ function createTxChannel(_ref4) { }); } -function callSendContractTx(_ref5) { - var contract = _ref5.contract, - fnName = _ref5.fnName, - fnIndex = _ref5.fnIndex, - args = _ref5.args, - stackId = _ref5.stackId; +function callSendContractTx(_ref6) { + var contract = _ref6.contract, + fnName = _ref6.fnName, + fnIndex = _ref6.fnIndex, + args = _ref6.args, + stackId = _ref6.stackId; var finalArg, sendArgs, finalArgTest, contractName, txObject, txChannel, event; - return _regenerator2.default.wrap(function callSendContractTx$(_context3) { + return _regenerator2.default.wrap(function callSendContractTx$(_context4) { while (1) { - switch (_context3.prev = _context3.next) { + switch (_context4.prev = _context4.next) { case 0: // Check for type of object and properties indicative of call/send options. if (args.length) { @@ -1855,77 +1884,77 @@ function callSendContractTx(_ref5) { } // Get name to mark as desynchronized on tx creation - contractName = contract.contractArtifact.contractName; + contractName = contract.contractName; // Create the transaction object and execute the tx. - _context3.next = 4; + _context4.next = 4; return _effects.call.apply(undefined, [contract.methods[fnName]].concat((0, _toConsumableArray3.default)(args))); case 4: - txObject = _context3.sent; - _context3.next = 7; + txObject = _context4.sent; + _context4.next = 7; return (0, _effects.call)(createTxChannel, { txObject: txObject, stackId: stackId, sendArgs: sendArgs, contractName: contractName }); case 7: - txChannel = _context3.sent; - _context3.prev = 8; + txChannel = _context4.sent; + _context4.prev = 8; case 9: if (false) { - _context3.next = 17; + _context4.next = 17; break; } - _context3.next = 12; + _context4.next = 12; return (0, _effects.take)(txChannel); case 12: - event = _context3.sent; - _context3.next = 15; + event = _context4.sent; + _context4.next = 15; return (0, _effects.put)(event); case 15: - _context3.next = 9; + _context4.next = 9; break; case 17: - _context3.prev = 17; + _context4.prev = 17; txChannel.close(); - return _context3.finish(17); + return _context4.finish(17); case 20: case 'end': - return _context3.stop(); + return _context4.stop(); } } - }, _marked3, this, [[8,, 17, 20]]); + }, _marked4, this, [[8,, 17, 20]]); } /* * Call and Cache */ -function callCallContractFn(_ref6) { - var contract = _ref6.contract, - fnName = _ref6.fnName, - fnIndex = _ref6.fnIndex, - args = _ref6.args, - argsHash = _ref6.argsHash, - _ref6$sync = _ref6.sync, - sync = _ref6$sync === undefined ? false : _ref6$sync; +function callCallContractFn(_ref7) { + var contract = _ref7.contract, + fnName = _ref7.fnName, + fnIndex = _ref7.fnIndex, + args = _ref7.args, + argsHash = _ref7.argsHash, + _ref7$sync = _ref7.sync, + sync = _ref7$sync === undefined ? false : _ref7$sync; var finalArg, callArgs, finalArgTest, txObject, callResult, dispatchArgs, errorArgs; - return _regenerator2.default.wrap(function callCallContractFn$(_context4) { + return _regenerator2.default.wrap(function callCallContractFn$(_context5) { while (1) { - switch (_context4.prev = _context4.next) { + switch (_context5.prev = _context5.next) { case 0: if (!sync) { - _context4.next = 2; + _context5.next = 2; break; } - return _context4.abrupt('return'); + return _context5.abrupt('return'); case 2: @@ -1949,55 +1978,55 @@ function callCallContractFn(_ref6) { } // Create the transaction object and execute the call. - _context4.next = 5; + _context5.next = 5; return _effects.call.apply(undefined, [contract.methods[fnName]].concat((0, _toConsumableArray3.default)(args))); case 5: - txObject = _context4.sent; - _context4.prev = 6; - _context4.next = 9; + txObject = _context5.sent; + _context5.prev = 6; + _context5.next = 9; return (0, _effects.call)(txObject.call, callArgs); case 9: - callResult = _context4.sent; + callResult = _context5.sent; dispatchArgs = { - name: contract.contractArtifact.contractName, + name: contract.contractName, variable: contract.abi[fnIndex].name, argsHash: argsHash, args: args, value: callResult, fnIndex: fnIndex }; - _context4.next = 13; + _context5.next = 13; return (0, _effects.put)((0, _extends3.default)({ type: 'GOT_CONTRACT_VAR' }, dispatchArgs)); case 13: - _context4.next = 21; + _context5.next = 21; break; case 15: - _context4.prev = 15; - _context4.t0 = _context4['catch'](6); + _context5.prev = 15; + _context5.t0 = _context5['catch'](6); - console.error(_context4.t0); + console.error(_context5.t0); errorArgs = { - name: contract.contractArtifact.contractName, + name: contract.contractName, variable: contract.abi[fnIndex].name, argsHash: argsHash, args: args, - error: _context4.t0, + error: _context5.t0, fnIndex: fnIndex }; - _context4.next = 21; + _context5.next = 21; return (0, _effects.put)((0, _extends3.default)({ type: 'ERROR_CONTRACT_VAR' }, errorArgs)); case 21: case 'end': - return _context4.stop(); + return _context5.stop(); } } - }, _marked4, this, [[6, 15]]); + }, _marked5, this, [[6, 15]]); } /* @@ -2006,18 +2035,18 @@ function callCallContractFn(_ref6) { function callSyncContract(action) { var contract, contractName, contractsState, contractFnsState, fnName, argsHash, fnIndex, args; - return _regenerator2.default.wrap(function callSyncContract$(_context5) { + return _regenerator2.default.wrap(function callSyncContract$(_context6) { while (1) { - switch (_context5.prev = _context5.next) { + switch (_context6.prev = _context6.next) { case 0: // Get contract state from store contract = action.contract; - contractName = contract.contractArtifact.contractName; - _context5.next = 4; + contractName = contract.contractName; + _context6.next = 4; return (0, _effects.select)(getContractsState); case 4: - contractsState = _context5.sent; + contractsState = _context6.sent; contractFnsState = (0, _assign2.default)({}, contractsState[contractName]); // Remove unnecessary keys @@ -2027,55 +2056,55 @@ function callSyncContract(action) { delete contractFnsState.events; // Iterate over functions and hashes - _context5.t0 = _regenerator2.default.keys(contractFnsState); + _context6.t0 = _regenerator2.default.keys(contractFnsState); case 10: - if ((_context5.t1 = _context5.t0()).done) { - _context5.next = 25; + if ((_context6.t1 = _context6.t0()).done) { + _context6.next = 25; break; } - fnName = _context5.t1.value; - _context5.t2 = _regenerator2.default.keys(contractFnsState[fnName]); + fnName = _context6.t1.value; + _context6.t2 = _regenerator2.default.keys(contractFnsState[fnName]); case 13: - if ((_context5.t3 = _context5.t2()).done) { - _context5.next = 23; + if ((_context6.t3 = _context6.t2()).done) { + _context6.next = 23; break; } - argsHash = _context5.t3.value; + argsHash = _context6.t3.value; fnIndex = contractFnsState[fnName][argsHash].fnIndex; args = contractFnsState[fnName][argsHash].args; // Pull args and call fn for each given function // keeping for pre-v1.1.5 compatibility with CALL_CONTRACT_FN event. - _context5.next = 19; + _context6.next = 19; return (0, _effects.put)({ type: 'CALL_CONTRACT_FN', contract: contract, fnName: fnName, fnIndex: fnIndex, args: args, argsHash: argsHash, sync: true }); case 19: - _context5.next = 21; + _context6.next = 21; return (0, _effects.call)(callCallContractFn, { contract: contract, fnName: fnName, fnIndex: fnIndex, args: args, argsHash: argsHash }); case 21: - _context5.next = 13; + _context6.next = 13; break; case 23: - _context5.next = 10; + _context6.next = 10; break; case 25: - _context5.next = 27; + _context6.next = 27; return (0, _effects.put)({ type: 'CONTRACT_SYNCED', contractName: contractName }); case 27: case 'end': - return _context5.stop(); + return _context6.stop(); } } - }, _marked5, this); + }, _marked6, this); } var getContractsState = function getContractsState(state) { @@ -2095,31 +2124,31 @@ function isSendOrCallOptions(options) { } function contractsSaga() { - return _regenerator2.default.wrap(function contractsSaga$(_context6) { + return _regenerator2.default.wrap(function contractsSaga$(_context7) { while (1) { - switch (_context6.prev = _context6.next) { + switch (_context7.prev = _context7.next) { case 0: - _context6.next = 2; + _context7.next = 2; return (0, _effects.takeEvery)('SEND_CONTRACT_TX', callSendContractTx); case 2: - _context6.next = 4; + _context7.next = 4; return (0, _effects.takeEvery)('CALL_CONTRACT_FN', callCallContractFn); case 4: - _context6.next = 6; + _context7.next = 6; return (0, _effects.takeEvery)('CONTRACT_SYNCING', callSyncContract); case 6: - _context6.next = 8; + _context7.next = 8; return (0, _effects.takeEvery)('LISTEN_FOR_EVENT', callListenForContractEvent); case 8: case 'end': - return _context6.stop(); + return _context7.stop(); } } - }, _marked6, this); + }, _marked7, this); } exports.default = contractsSaga; @@ -2297,7 +2326,7 @@ var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); -var Web3 = __webpack_require__(128); +var Web3 = __webpack_require__(129); /* * Initialization @@ -2937,7 +2966,7 @@ var _marked = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockChannel), _marked4 = /*#__PURE__*/_regenerator2.default.mark(processBlock), _marked5 = /*#__PURE__*/_regenerator2.default.mark(blocksSaga); -var BlockTracker = __webpack_require__(82); +var BlockTracker = __webpack_require__(83); /* * Listen for Blocks @@ -3256,7 +3285,7 @@ exports.default = blocksSaga; /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding -var aFunction = __webpack_require__(85); +var aFunction = __webpack_require__(86); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; @@ -3305,7 +3334,7 @@ module.exports = function (it) { var has = __webpack_require__(7); var toIObject = __webpack_require__(10); -var arrayIndexOf = __webpack_require__(87)(false); +var arrayIndexOf = __webpack_require__(88)(false); var IE_PROTO = __webpack_require__(34)('IE_PROTO'); module.exports = function (object, names) { @@ -3352,7 +3381,7 @@ module.exports = function (it) { "use strict"; -var $at = __webpack_require__(91)(true); +var $at = __webpack_require__(92)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(57)(String, 'String', function (iterated) { @@ -3382,9 +3411,9 @@ var redefine = __webpack_require__(58); var hide = __webpack_require__(9); var has = __webpack_require__(7); var Iterators = __webpack_require__(17); -var $iterCreate = __webpack_require__(92); +var $iterCreate = __webpack_require__(93); var setToStringTag = __webpack_require__(40); -var getPrototypeOf = __webpack_require__(95); +var getPrototypeOf = __webpack_require__(96); var ITERATOR = __webpack_require__(0)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; @@ -3460,7 +3489,7 @@ module.exports = __webpack_require__(9); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(13); -var dPs = __webpack_require__(93); +var dPs = __webpack_require__(94); var enumBugKeys = __webpack_require__(36); var IE_PROTO = __webpack_require__(34)('IE_PROTO'); var Empty = function () { /* empty */ }; @@ -3475,7 +3504,7 @@ var createDict = function () { var gt = '>'; var iframeDocument; iframe.style.display = 'none'; - __webpack_require__(94).appendChild(iframe); + __webpack_require__(95).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); @@ -3510,11 +3539,11 @@ module.exports = Object.create || function create(O, Properties) { exports.__esModule = true; -var _iterator = __webpack_require__(103); +var _iterator = __webpack_require__(104); var _iterator2 = _interopRequireDefault(_iterator); -var _symbol = __webpack_require__(109); +var _symbol = __webpack_require__(110); var _symbol2 = _interopRequireDefault(_symbol); @@ -3545,7 +3574,7 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { /* 62 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(124), __esModule: true }; +module.exports = { "default": __webpack_require__(125), __esModule: true }; /***/ }), /* 63 */ @@ -3564,11 +3593,11 @@ var _regenerator2 = _interopRequireDefault(_regenerator); var _effects = __webpack_require__(5); -var _defaultOptions = __webpack_require__(126); +var _defaultOptions = __webpack_require__(127); var _defaultOptions2 = _interopRequireDefault(_defaultOptions); -var _deepmerge = __webpack_require__(127); +var _deepmerge = __webpack_require__(128); var _deepmerge2 = _interopRequireDefault(_deepmerge); @@ -3589,7 +3618,7 @@ var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeDrizzle), function initializeDrizzle(action) { - var options, web3Options, web3, i, contractArtifact, events, contractAddresses, contractNames, contract, interval; + var options, web3Options, web3, i, contractConfig, events, contractName, contractAddresses, contractNames, contract, interval; return _regenerator2.default.wrap(function initializeDrizzle$(_context) { while (1) { switch (_context.prev = _context.next) { @@ -3624,30 +3653,49 @@ function initializeDrizzle(action) { case 14: if (!(i < options.contracts.length)) { - _context.next = 24; + _context.next = 32; break; } - contractArtifact = options.contracts[i]; + contractConfig = options.contracts[i]; events = []; + contractName = contractConfig.contractName; - if (contractArtifact.contractName in options.events) { - events = options.events[contractArtifact.contractName]; + if (contractName in options.events) { + events = options.events[contractName]; } - _context.next = 20; - return (0, _effects.call)(_contractsSaga.instantiateContract, { contractArtifact: contractArtifact, events: events, store: action.drizzle.store, web3: web3 }); + if (!contractConfig.web3Contract) { + _context.next = 25; + break; + } - case 20: - action.drizzle.contracts[contractArtifact.contractName] = _context.sent; + _context.next = 22; + return (0, _effects.call)(_contractsSaga.instantiateWeb3Contract, { web3Contract: contractConfig.web3Contract, name: contractName, events: events, store: action.drizzle.store, web3: web3 }); - case 21: + case 22: + drizzleContract = _context.sent; + _context.next = 28; + break; + + case 25: + _context.next = 27; + return (0, _effects.call)(_contractsSaga.instantiateContract, { contractConfig: contractConfig, events: events, store: action.drizzle.store, web3: web3 }); + + case 27: + drizzleContract = _context.sent; + + case 28: + + action.drizzle.contracts[contractName] = drizzleContract; + + case 29: i++; _context.next = 14; break; - case 24: + case 32: // Collect contract addresses in an array for later comparison in txs. contractAddresses = []; @@ -3655,67 +3703,67 @@ function initializeDrizzle(action) { for (contract in action.drizzle.contracts) { - contractNames.push(action.drizzle.contracts[contract].contractArtifact.contractName); + contractNames.push(action.drizzle.contracts[contract].contractName); contractAddresses.push(action.drizzle.contracts[contract].options.address.toLowerCase()); } if (!web3.currentProvider.isMetaMask) { - _context.next = 33; + _context.next = 41; break; } // Using MetaMask, attempt block polling. interval = options.polls.blocks; - _context.next = 31; + _context.next = 39; return (0, _effects.put)({ type: 'BLOCKS_POLLING', contracts: action.drizzle.contracts, interval: interval, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - case 31: - _context.next = 35; + case 39: + _context.next = 43; break; - case 33: - _context.next = 35; + case 41: + _context.next = 43; return (0, _effects.put)({ type: 'BLOCKS_LISTENING', contracts: action.drizzle.contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - case 35: + case 43: if (!('accounts' in options.polls)) { - _context.next = 38; + _context.next = 46; break; } - _context.next = 38; + _context.next = 46; return (0, _effects.put)({ type: 'ACCOUNTS_POLLING', interval: options.polls.accounts, web3: web3 }); - case 38: - _context.next = 47; + case 46: + _context.next = 55; break; - case 40: - _context.prev = 40; + case 48: + _context.prev = 48; _context.t0 = _context['catch'](0); - _context.next = 44; + _context.next = 52; return (0, _effects.put)({ type: 'DRIZZLE_FAILED', error: _context.t0 }); - case 44: + case 52: console.error('Error initializing Drizzle:'); console.error(_context.t0); return _context.abrupt('return'); - case 47: - _context.next = 49; + case 55: + _context.next = 57; return (0, _effects.put)({ type: 'DRIZZLE_INITIALIZED' }); - case 49: + case 57: return _context.abrupt('return'); - case 50: + case 58: case 'end': return _context.stop(); } } - }, _marked, this, [[0, 40]]); + }, _marked, this, [[0, 48]]); } function drizzleStatusSaga() { @@ -3852,7 +3900,7 @@ var contractsReducer = function contractsReducer() { } if (action.type === 'CONTRACT_SYNCING') { - var contractName = action.contract.contractArtifact.contractName; + var contractName = action.contract.contractName; return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, contractName, (0, _extends14.default)({}, state[contractName], { synced: false @@ -4121,20 +4169,39 @@ exports.default = web3Reducer; "use strict"; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getAbi; +function getAbi(contractEntry) { + if (contractEntry.web3Contract) { + return contractEntry.web3Contract.options.jsonInterface; + } else { + return contractEntry.abi; + } +} + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + Object.defineProperty(exports, "__esModule", { value: true }); exports.drizzleSagas = exports.drizzleReducers = exports.generateStore = exports.generateContractsInitialState = exports.Drizzle = undefined; -var _Drizzle = __webpack_require__(72); +var _Drizzle = __webpack_require__(73); var _Drizzle2 = _interopRequireDefault(_Drizzle); -var _generateStore = __webpack_require__(73); +var _generateStore = __webpack_require__(74); var _generateStore2 = _interopRequireDefault(_generateStore); -var _generateContractsInitialState = __webpack_require__(130); +var _generateContractsInitialState = __webpack_require__(131); var _generateContractsInitialState2 = _interopRequireDefault(_generateContractsInitialState); @@ -4216,7 +4283,7 @@ exports.drizzleReducers = drizzleReducers; exports.drizzleSagas = drizzleSagas; /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4253,7 +4320,7 @@ var Drizzle = function Drizzle(options, store) { exports.default = Drizzle; /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4265,14 +4332,18 @@ var _reduxSaga = __webpack_require__(18); var _reduxSaga2 = _interopRequireDefault(_reduxSaga); -var _rootSaga = __webpack_require__(74); +var _rootSaga = __webpack_require__(75); var _rootSaga2 = _interopRequireDefault(_rootSaga); -var _reducer = __webpack_require__(129); +var _reducer = __webpack_require__(130); var _reducer2 = _interopRequireDefault(_reducer); +var _getAbi = __webpack_require__(71); + +var _getAbi2 = _interopRequireDefault(_getAbi); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function generateStore(options) { @@ -4291,8 +4362,9 @@ function generateStore(options) { synced: false // Constant getters - };for (var i2 = 0; i2 < options.contracts[i].abi.length; i2++) { - var item = options.contracts[i].abi[i2]; + };var abi = (0, _getAbi2.default)(options.contracts[i]); + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; if (item.type == "function" && item.constant === true) { contractsInitialState[contractName][item.name] = {}; @@ -4316,7 +4388,7 @@ function generateStore(options) { module.exports = generateStore; /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4379,7 +4451,7 @@ function root() { } /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4404,7 +4476,7 @@ var oldRuntime = hadRuntime && g.regeneratorRuntime; // Force reevalutation of runtime.js. g.regeneratorRuntime = undefined; -module.exports = __webpack_require__(76); +module.exports = __webpack_require__(77); if (hadRuntime) { // Restore the original runtime. @@ -4420,7 +4492,7 @@ if (hadRuntime) { /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -5153,16 +5225,16 @@ if (hadRuntime) { /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export takeEvery */ /* unused harmony export takeLatest */ /* unused harmony export throttle */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(78); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(80); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(79); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(81); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(82); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(8); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__takeEvery__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__takeLatest__["a"]; }); @@ -5184,7 +5256,7 @@ var throttle = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* d /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5222,7 +5294,7 @@ function takeEvery(patternOrChannel, worker) { } /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5293,7 +5365,7 @@ function flush() { } /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5341,7 +5413,7 @@ function takeLatest(patternOrChannel, worker) { } /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -5398,31 +5470,31 @@ function throttle(delayLength, pattern, worker) { } /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_82__; +module.exports = __WEBPACK_EXTERNAL_MODULE_83__; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(84); +__webpack_require__(85); module.exports = __webpack_require__(2).Object.assign; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(12); -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(86) }); +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(87) }); /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports) { module.exports = function (it) { @@ -5432,7 +5504,7 @@ module.exports = function (it) { /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5473,14 +5545,14 @@ module.exports = !$assign || __webpack_require__(15)(function () { /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(10); var toLength = __webpack_require__(55); -var toAbsoluteIndex = __webpack_require__(88); +var toAbsoluteIndex = __webpack_require__(89); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); @@ -5502,7 +5574,7 @@ module.exports = function (IS_INCLUDES) { /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(33); @@ -5515,22 +5587,22 @@ module.exports = function (index, length) { /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(90), __esModule: true }; +module.exports = { "default": __webpack_require__(91), __esModule: true }; /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(56); -__webpack_require__(96); +__webpack_require__(97); module.exports = __webpack_require__(2).Array.from; /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(33); @@ -5553,7 +5625,7 @@ module.exports = function (TO_STRING) { /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5573,7 +5645,7 @@ module.exports = function (Constructor, NAME, next) { /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(3); @@ -5592,7 +5664,7 @@ module.exports = __webpack_require__(6) ? Object.defineProperties : function def /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(1).document; @@ -5600,7 +5672,7 @@ module.exports = document && document.documentElement; /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) @@ -5619,7 +5691,7 @@ module.exports = Object.getPrototypeOf || function (O) { /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5627,13 +5699,13 @@ module.exports = Object.getPrototypeOf || function (O) { var ctx = __webpack_require__(50); var $export = __webpack_require__(12); var toObject = __webpack_require__(38); -var call = __webpack_require__(97); -var isArrayIter = __webpack_require__(98); +var call = __webpack_require__(98); +var isArrayIter = __webpack_require__(99); var toLength = __webpack_require__(55); -var createProperty = __webpack_require__(99); -var getIterFn = __webpack_require__(100); +var createProperty = __webpack_require__(100); +var getIterFn = __webpack_require__(101); -$export($export.S + $export.F * !__webpack_require__(102)(function (iter) { Array.from(iter); }), 'Array', { +$export($export.S + $export.F * !__webpack_require__(103)(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); @@ -5663,7 +5735,7 @@ $export($export.S + $export.F * !__webpack_require__(102)(function (iter) { Arra /***/ }), -/* 97 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error @@ -5681,7 +5753,7 @@ module.exports = function (iterator, fn, value, entries) { /***/ }), -/* 98 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator @@ -5695,7 +5767,7 @@ module.exports = function (it) { /***/ }), -/* 99 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5710,10 +5782,10 @@ module.exports = function (object, index, value) { /***/ }), -/* 100 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(101); +var classof = __webpack_require__(102); var ITERATOR = __webpack_require__(0)('iterator'); var Iterators = __webpack_require__(17); module.exports = __webpack_require__(2).getIteratorMethod = function (it) { @@ -5724,7 +5796,7 @@ module.exports = __webpack_require__(2).getIteratorMethod = function (it) { /***/ }), -/* 101 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() @@ -5753,7 +5825,7 @@ module.exports = function (it) { /***/ }), -/* 102 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(0)('iterator'); @@ -5781,25 +5853,25 @@ module.exports = function (exec, skipClosing) { /***/ }), -/* 103 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(104), __esModule: true }; +module.exports = { "default": __webpack_require__(105), __esModule: true }; /***/ }), -/* 104 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(56); -__webpack_require__(105); +__webpack_require__(106); module.exports = __webpack_require__(41).f('iterator'); /***/ }), -/* 105 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(106); +__webpack_require__(107); var global = __webpack_require__(1); var hide = __webpack_require__(9); var Iterators = __webpack_require__(17); @@ -5821,13 +5893,13 @@ for (var i = 0; i < DOMIterables.length; i++) { /***/ }), -/* 106 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(107); -var step = __webpack_require__(108); +var addToUnscopables = __webpack_require__(108); +var step = __webpack_require__(109); var Iterators = __webpack_require__(17); var toIObject = __webpack_require__(10); @@ -5862,14 +5934,14 @@ addToUnscopables('entries'); /***/ }), -/* 107 */ +/* 108 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), -/* 108 */ +/* 109 */ /***/ (function(module, exports) { module.exports = function (done, value) { @@ -5878,24 +5950,24 @@ module.exports = function (done, value) { /***/ }), -/* 109 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(110), __esModule: true }; +module.exports = { "default": __webpack_require__(111), __esModule: true }; /***/ }), -/* 110 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(111); -__webpack_require__(117); +__webpack_require__(112); __webpack_require__(118); __webpack_require__(119); +__webpack_require__(120); module.exports = __webpack_require__(2).Symbol; /***/ }), -/* 111 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5906,7 +5978,7 @@ var has = __webpack_require__(7); var DESCRIPTORS = __webpack_require__(6); var $export = __webpack_require__(12); var redefine = __webpack_require__(58); -var META = __webpack_require__(112).KEY; +var META = __webpack_require__(113).KEY; var $fails = __webpack_require__(15); var shared = __webpack_require__(35); var setToStringTag = __webpack_require__(40); @@ -5914,16 +5986,16 @@ var uid = __webpack_require__(23); var wks = __webpack_require__(0); var wksExt = __webpack_require__(41); var wksDefine = __webpack_require__(42); -var enumKeys = __webpack_require__(113); -var isArray = __webpack_require__(114); +var enumKeys = __webpack_require__(114); +var isArray = __webpack_require__(115); var anObject = __webpack_require__(13); var isObject = __webpack_require__(14); var toIObject = __webpack_require__(10); var toPrimitive = __webpack_require__(30); var createDesc = __webpack_require__(16); var _create = __webpack_require__(59); -var gOPNExt = __webpack_require__(115); -var $GOPD = __webpack_require__(116); +var gOPNExt = __webpack_require__(116); +var $GOPD = __webpack_require__(117); var $DP = __webpack_require__(3); var $keys = __webpack_require__(22); var gOPD = $GOPD.f; @@ -6136,7 +6208,7 @@ setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 112 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(23)('meta'); @@ -6195,7 +6267,7 @@ var meta = module.exports = { /***/ }), -/* 113 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols @@ -6216,7 +6288,7 @@ module.exports = function (it) { /***/ }), -/* 114 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) @@ -6227,7 +6299,7 @@ module.exports = Array.isArray || function isArray(arg) { /***/ }), -/* 115 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window @@ -6252,7 +6324,7 @@ module.exports.f = function getOwnPropertyNames(it) { /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(24); @@ -6274,27 +6346,27 @@ exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports) { /***/ }), -/* 118 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(42)('asyncIterator'); /***/ }), -/* 119 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(42)('observable'); /***/ }), -/* 120 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6304,7 +6376,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _stringify = __webpack_require__(121); +var _stringify = __webpack_require__(122); var _stringify2 = _interopRequireDefault(_stringify); @@ -6320,28 +6392,22 @@ var _classCallCheck2 = __webpack_require__(45); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(123); +var _createClass2 = __webpack_require__(124); var _createClass3 = _interopRequireDefault(_createClass2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var DrizzleContract = function () { - function DrizzleContract(contractArtifact, web3, networkId, store) { + function DrizzleContract(web3Contract, web3, name, store) { var events = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : []; (0, _classCallCheck3.default)(this, DrizzleContract); - this.contractArtifact = contractArtifact; - this.abi = contractArtifact.abi; + this.abi = web3Contract.options.jsonInterface; this.web3 = web3; + this.contractName = name; this.store = store; - // Instantiate the contract. - var web3Contract = new web3.eth.Contract(this.abi, this.contractArtifact.networks[networkId].address, { - from: this.store.getState().accounts[0], - data: this.contractArtifact.deployedBytecode - }); - // Merge web3 contract instance into DrizzleContract instance. (0, _assign2.default)(this, web3Contract); @@ -6366,8 +6432,6 @@ var DrizzleContract = function () { } } - var name = contractArtifact.contractName; - store.dispatch({ type: 'CONTRACT_INITIALIZED', name: name }); } @@ -6384,7 +6448,7 @@ var DrizzleContract = function () { if (args.length > 0) { argsHash = contract.generateArgsHash(args); } - var contractName = contract.contractArtifact.contractName; + var contractName = contract.contractName; var functionState = contract.store.getState().contracts[contractName][fnName]; // If call result is in state and fresh, return value instead of calling @@ -6464,13 +6528,13 @@ var DrizzleContract = function () { exports.default = DrizzleContract; /***/ }), -/* 121 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(122), __esModule: true }; +module.exports = { "default": __webpack_require__(123), __esModule: true }; /***/ }), -/* 122 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(2); @@ -6481,7 +6545,7 @@ module.exports = function stringify(it) { // eslint-disable-line no-unused-vars /***/ }), -/* 123 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6514,10 +6578,10 @@ exports.default = function () { }(); /***/ }), -/* 124 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(125); +__webpack_require__(126); var $Object = __webpack_require__(2).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); @@ -6525,7 +6589,7 @@ module.exports = function defineProperty(it, key, desc) { /***/ }), -/* 125 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(12); @@ -6534,7 +6598,7 @@ $export($export.S + $export.F * !__webpack_require__(6), 'Object', { definePrope /***/ }), -/* 126 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6563,7 +6627,7 @@ var defaultOptions = { exports.default = defaultOptions; /***/ }), -/* 127 */ +/* 128 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6660,13 +6724,13 @@ var deepmerge_1 = deepmerge; /***/ }), -/* 128 */ +/* 129 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_128__; +module.exports = __WEBPACK_EXTERNAL_MODULE_129__; /***/ }), -/* 129 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6721,12 +6785,18 @@ var reducer = (0, _redux.combineReducers)({ exports.default = reducer; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +var _getAbi = __webpack_require__(71); + +var _getAbi2 = _interopRequireDefault(_getAbi); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function generateContractsInitialState(options) { // Preloaded state var contractsInitialState = {}; @@ -6740,8 +6810,9 @@ function generateContractsInitialState(options) { synced: false // Constant getters - };for (var i2 = 0; i2 < options.contracts[i].abi.length; i2++) { - var item = options.contracts[i].abi[i2]; + };var abi = (0, _getAbi2.default)(options.contracts[i]); + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; if (item.type == "function" && item.constant === true) { contractsInitialState[contractName][item.name] = {}; @@ -6757,4 +6828,4 @@ module.exports = generateContractsInitialState; /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCA5NWIyZjZjMDExY2MzNjg5M2I2ZCIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYX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vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9kcml6emxlU3RhdHVzL2RyaXp6bGVTdGF0dXNSZWR1Y2VyLmpzIiwiY29uc3QgaW5pdGlhbFN0YXRlID0ge31cclxuICBcclxuY29uc3QgdHJhbnNhY3Rpb25zUmVkdWNlciA9IChzdGF0ZSA9IGluaXRpYWxTdGF0ZSwgYWN0aW9uKSA9PiB7XHJcbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9CUk9BRENBU1RFRCcpXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4uc3RhdGUsXHJcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xyXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAncGVuZGluZycsXHJcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0NPTkZJUk1BSVRPTicpXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4uc3RhdGUsXHJcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xyXG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXHJcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXHJcbiAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0uY29uZmlybWF0aW9ucyxcclxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxyXG4gICAgICAgICAgICAgICAgXVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxyXG4gICAge1xyXG4gICAgICAgIHJldHVybiB7XHJcbiAgICAgICAgICAgIC4uLnN0YXRlLFxyXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcclxuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxyXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnc3VjY2VzcycsXHJcbiAgICAgICAgICAgICAgICByZWNlaXB0OiBhY3Rpb24ucmVjZWlwdFxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuXHJcbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9FUlJPUicpXHJcbiAgICB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgLi4uc3RhdGUsXHJcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xyXG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXHJcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdlcnJvcicsXHJcbiAgICAgICAgICAgICAgICBlcnJvcjogYWN0aW9uLmVycm9yXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgcmV0dXJuIHN0YXRlXHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IHRyYW5zYWN0aW9uc1JlZHVjZXJcclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3RyYW5zYWN0aW9ucy90cmFuc2FjdGlvbnNSZWR1Y2VyLmpzIiwiY29uc3QgaW5pdGlhbFN0YXRlID0gW11cclxuICBcclxuY29uc3QgdHJhbnNhY3Rpb25TdGFja1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xyXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnUFVTSF9UT19UWFNUQUNLJylcclxuICAgIHtcclx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0KSB7XG4gICAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgICAgdGhyb3cgY29udGV4dC5hcmc7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY29udGV4dC5kaXNwYXRjaEV4Y2VwdGlvbihjb250ZXh0LmFyZyk7XG5cbiAgICAgICAgfSBlbHNlIGlmIChjb250ZXh0Lm1ldGhvZCA9PT0gXCJyZXR1cm5cIikge1xuICAgICAgICAgIGNvbnRleHQuYWJydXB0KFwicmV0dXJuXCIsIGNvbnRleHQuYXJnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRlID0gR2VuU3RhdGVFeGVjdXRpbmc7XG5cbiAgICAgICAgdmFyIHJlY29yZCA9IHRyeUNhdGNoKGlubmVyRm4sIHNlbGYsIGNvbnRleHQpO1xuICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwibm9ybWFsXCIpIHtcbiAgICAgICAgICAvLyBJZiBhbiBleGNlcHRpb24gaXMgdGhyb3duIGZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJl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gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBma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ZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuICAgICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgICAgICB2YXIgdGhyb3duID0gcmVjb3JkLmFyZztcbiAgICAgICAgICAgIHJlc2V0VHJ5RW50cnkoZW50cnkpO1xuICAgICAgICAgIH1c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IHtcbiAgICB2YXIgaXRlbXMgPSBbXTtcbiAgICB3aGlsZSAobGVuZ3RoKSB7XG4gICAgICBpdGVtcy5wdXNoKHRha2UoKSk7XG4gICAgfVxuICAgIHJldHVybiBpdGVtcztcbiAgfTtcblxuICByZXR1cm4ge1xuICAgIGlzRW1wdHk6IGZ1bmN0aW9uIGlzRW1wdHkoKSB7XG4gICAgICByZXR1cm4gbGVuZ3RoID09IDA7XG4gICAgfSxcbiAgICBwdXQ6IGZ1bmN0aW9uIHB1dChpdCkge1xuICAgICAgaWYgKGxlbmd0aCA8IGxpbWl0KSB7XG4gICAgICAgIHB1c2goaXQpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIGRvdWJsZWRMaW1pdCA9IHZvaWQgMDtcbiAgICAgICAgc3dpdGNoIChvdmVyZmxvd0FjdGlvbikge1xuICAgICAgICAgIGNhc2UgT05fT1ZFUkZMT1dfVEhST1c6XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoQlVGRkVSX09WRVJGTE9XKTtcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX1NMSURFOlxuICAgICAgICAgICAgYXJyW3B1c2hJbmRleF0gPSBpdDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IChwdXNoSW5kZXggKyAxKSAlIGxpbWl0O1xuICAgICAgICAgICAgcG9wSW5kZXggPSBwdXNoSW5kZXg7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3Vib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yID0gKHN0YXRlID0gaW5pdGlhbFN0YXRlLCBhY3Rpb24pID0+IHtcbiAgLypcbiAgICogRHJpenpsZSBTdGF0dXNcbiAgICovXG5cbiAgaWYgKGFjdGlvbi50eXBlID09PSAnRFJJWlpMRV9JTklUSUFMSVpFRCcpXG4gIHtcbiAgICByZXR1cm4ge1xuICAgICAgLi4uc3RhdGUsXG4gICAgICBpbml0aWFsaXplZDogdHJ1ZVxuICAgIH1cbiAgfVxuICByZXR1cm4gc3RhdGVcbn1cblxuZXhwb3J0IGRlZmF1bHQgZHJpenpsZVN0YXR1c1JlZHVjZXJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9kcml6emxlU3RhdHVzL2RyaXp6bGVTdGF0dXNSZWR1Y2VyLmpzIiwiY29uc3QgaW5pdGlhbFN0YXRlID0ge31cbiAgXG5jb25zdCB0cmFuc2FjdGlvbnNSZWR1Y2VyID0gKHN0YXRlID0gaW5pdGlhbFN0YXRlLCBhY3Rpb24pID0+IHtcbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9CUk9BRENBU1RFRCcpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdwZW5kaW5nJyxcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfQ09ORklSTUFJVE9OJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtcbiAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0uY29uZmlybWF0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLmNvbmZpcm1hdGlvblJlY2VpcHRcbiAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9TVUNDRVNTRlVMJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxuICAgICAgICAgICAgICAgIHN0YXR1czogJ3N1Y2Nlc3MnLFxuICAgICAgICAgICAgICAgIHJlY2VpcHQ6IGFjdGlvbi5yZWNlaXB0XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0VSUk9SJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxuICAgICAgICAgICAgICAgIHN0YXR1czogJ2Vycm9yJyxcbiAgICAgICAgICAgICAgICBlcnJvcjogYWN0aW9uLmVycm9yXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gc3RhdGVcbn1cblxuZXhwb3J0IGRlZmF1bHQgdHJhbnNhY3Rpb25zUmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3RyYW5zYWN0aW9ucy90cmFuc2FjdGlvbnNSZWR1Y2VyLmpzIiwiY29uc3QgaW5pd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cIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZVxuICAgICAgICAgICAgPyBHZW5TdGF0ZUNvbXBsZXRlZFxuICAgICAgICAgICAgOiBHZW5TdGF0ZVN1c3BlbmRlZFlpZWxkO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC5hcmcgPT09IENvbnRpbnVlU2VudGluZWwpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YWx1ZTogcmVjb3JkLmFyZyxcbiAgICAgICAgICAgI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RlcmF0b3JNZXRob2QpIHtcbiAgICAgICAgcmV0dXJuIGl0ZXJhdG9yTWV0aG9kLmNhbGwoaXRlcmFibGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgcnVudGltZS52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250ZXh0LnByb3RvdHlwZSA9IHtcbiAgICBjb25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AgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICByZ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XRlW2NvbnRyYWN0TmFtZV0gPSB7XG4gICAgICBpbml0aWFsaXplZDogZmFsc2UsXG4gICAgICBzeW5jZWQ6IGZhbHNlXG4gICAgfVxuXG4gICAgLy8gQ29uc3RhbnQgZ2V0dGVyc1xuICAgIHZhciBhYmkgPSBnZXRBYmkob3B0aW9ucy5jb250cmFjdHNbaV0pXG4gICAgZm9yICh2YXIgaTIgPSAwOyBpMiA8IGFiaS5sZW5ndGg7IGkyKyspIHtcbiAgICAgIHZhciBpdGVtID0gYWJpW2kyXTtcblxuICAgICAgaWYgKGl0ZW0udHlwZSA9PSBcImZ1bmN0aW9uXCIgJiYgaXRlbS5jb25zdGFudCA9PT0gdHJ1ZSkge1xuICAgICAgICBjb250cmFjdHNJbml0aWFsU3RhdGVbY29udHJhY3ROYW1lXVtpdGVtLm5hbWVdID0ge31cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gY29udHJhY3RzSW5pdGlhbFN0YXRlXG59XG5cbm1vZHVsZS5leHBvcnRzID0gZ2VuZXJhdGVDb250cmFjdHNJbml0aWFsU3RhdGVcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9nZW5lcmF0ZUNvbnRyYWN0c0luaXRpYWxTdGF0ZS5qcyJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9d085b40..8df46053 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "drizzle", - "version": "1.1.3", + "version": "1.1.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/DrizzleContract.js b/src/DrizzleContract.js index 94decfd3..8a8f0fed 100644 --- a/src/DrizzleContract.js +++ b/src/DrizzleContract.js @@ -1,20 +1,10 @@ class DrizzleContract { - constructor(contractArtifact, web3, networkId, store, events = []) { - this.contractArtifact = contractArtifact - this.abi = contractArtifact.abi + constructor(web3Contract, web3, name, store, events = []) { + this.abi = web3Contract.options.jsonInterface this.web3 = web3 + this.contractName = name this.store = store - // Instantiate the contract. - var web3Contract = new web3.eth.Contract( - this.abi, - this.contractArtifact.networks[networkId].address, - { - from: this.store.getState().accounts[0], - data: this.contractArtifact.deployedBytecode - } - ) - // Merge web3 contract instance into DrizzleContract instance. Object.assign(this, web3Contract) @@ -39,8 +29,6 @@ class DrizzleContract { } } - const name = contractArtifact.contractName - store.dispatch({type: 'CONTRACT_INITIALIZED', name}) } @@ -55,7 +43,7 @@ class DrizzleContract { if (args.length > 0) { argsHash = contract.generateArgsHash(args) } - const contractName = contract.contractArtifact.contractName + const contractName = contract.contractName const functionState = contract.store.getState().contracts[contractName][fnName] // If call result is in state and fresh, return value instead of calling @@ -85,11 +73,11 @@ class DrizzleContract { // Add ID to "transactionStack" with empty value contract.store.dispatch({type: 'PUSH_TO_STACK'}) - + // Dispatch tx to saga // When txhash received, will be value of stack ID contract.store.dispatch({type: 'SEND_CONTRACT_TX', contract, fnName, fnIndex, args, stackId}) - + // return stack ID return stackId } diff --git a/src/contracts/contractsReducer.js b/src/contracts/contractsReducer.js index da19e84b..1d8994b5 100644 --- a/src/contracts/contractsReducer.js +++ b/src/contracts/contractsReducer.js @@ -20,7 +20,7 @@ const contractsReducer = (state = initialState, action) => { if (action.type === 'CONTRACT_SYNCING') { - const contractName = action.contract.contractArtifact.contractName + const contractName = action.contract.contractName return { ...state, diff --git a/src/contracts/contractsSaga.js b/src/contracts/contractsSaga.js index 5808df1e..c8737499 100644 --- a/src/contracts/contractsSaga.js +++ b/src/contracts/contractsSaga.js @@ -6,10 +6,24 @@ import DrizzleContract from '../DrizzleContract' * Instantiation */ +export function* instantiateWeb3Contract({web3Contract, name, events, store, web3}) { + return new DrizzleContract(web3Contract, web3, name, store, events) +} + export function* instantiateContract({contractArtifact, events, store, web3}) { const networkId = yield select(getNetworkId) - return new DrizzleContract(contractArtifact, web3, networkId, store, events) + // Instantiate the contract. + var web3Contract = new web3.eth.Contract( + contractArtifact.abi, + contractArtifact.networks[networkId].address, + { + from: store.getState().accounts[0], + data: contractArtifact.deployedBytecode + } + ) + + return new DrizzleContract(web3Contract, web3, contractArtifact.contractName, store, events) } /* @@ -17,7 +31,7 @@ export function* instantiateContract({contractArtifact, events, store, web3}) { */ function createContractEventChannel({contract, eventName}) { - const name = contract.contractArtifact.contractName + const name = contract.contractName return eventChannel(emit => { const eventListener = contract.events[eventName]().on('data', event => { @@ -88,21 +102,21 @@ function* callSendContractTx({contract, fnName, fnIndex, args, stackId}) { const finalArg = args.length > 1 ? args[args.length - 1] : args[0] var sendArgs = {} var finalArgTest = false - + if (typeof finalArg === 'object') { var finalArgTest = call(isSendOrCallOptions, finalArg) } if (finalArgTest) { sendArgs = finalArg - + args.length > 1 ? delete args[args.length - 1] : delete args[0] args.length = args.length - 1 } } // Get name to mark as desynchronized on tx creation - const contractName = contract.contractArtifact.contractName + const contractName = contract.contractName // Create the transaction object and execute the tx. const txObject = yield call(contract.methods[fnName], ...args) @@ -133,48 +147,48 @@ function* callCallContractFn({contract, fnName, fnIndex, args, argsHash, sync = const finalArg = args.length > 1 ? args[args.length - 1] : args[0] var callArgs = {} var finalArgTest = false - + if (typeof finalArg === 'object') { var finalArgTest = call(isSendOrCallOptions, finalArg) } if (finalArgTest) { callArgs = finalArg - + args.length > 1 ? delete args[args.length - 1] : delete args[0] args.length = args.length - 1 } } - + // Create the transaction object and execute the call. const txObject = yield call(contract.methods[fnName], ...args) - + try { const callResult = yield call(txObject.call, callArgs) var dispatchArgs = { - name: contract.contractArtifact.contractName, + name: contract.contractName, variable: contract.abi[fnIndex].name, argsHash: argsHash, args: args, value: callResult, fnIndex: fnIndex } - + yield put({type: 'GOT_CONTRACT_VAR', ...dispatchArgs}) } catch (error) { console.error(error) var errorArgs = { - name: contract.contractArtifact.contractName, + name: contract.contractName, variable: contract.abi[fnIndex].name, argsHash: argsHash, args: args, error: error, fnIndex: fnIndex } - + yield put({type: 'ERROR_CONTRACT_VAR', ...errorArgs}) } } @@ -186,7 +200,7 @@ function* callCallContractFn({contract, fnName, fnIndex, args, argsHash, sync = function* callSyncContract(action) { // Get contract state from store const contract = action.contract - const contractName = contract.contractArtifact.contractName + const contractName = contract.contractName const contractsState = yield select(getContractsState) var contractFnsState = Object.assign({}, contractsState[contractName]) diff --git a/src/drizzleStatus/drizzleStatusSaga.js b/src/drizzleStatus/drizzleStatusSaga.js index 5549044e..1a3ecb2e 100644 --- a/src/drizzleStatus/drizzleStatusSaga.js +++ b/src/drizzleStatus/drizzleStatusSaga.js @@ -6,7 +6,7 @@ import merge from 'deepmerge' import { initializeWeb3, getNetworkId } from '../web3/web3Saga' import { getAccounts } from '../accounts/accountsSaga' import { getAccountBalances } from '../accountBalances/accountBalancesSaga' -import { instantiateContract } from '../contracts/contractsSaga' +import { instantiateContract, instantiateWeb3Contract } from '../contracts/contractsSaga' function* initializeDrizzle(action) { try { @@ -26,14 +26,21 @@ function* initializeDrizzle(action) { // Instantiate contracts passed through via options. for (var i = 0; i < options.contracts.length; i++) { - var contractArtifact = options.contracts[i] + var contractConfig = options.contracts[i] var events = [] + var contractName = contractConfig.contractName - if (contractArtifact.contractName in options.events) { - events = options.events[contractArtifact.contractName] + if (contractName in options.events) { + events = options.events[contractName] } - action.drizzle.contracts[contractArtifact.contractName] = yield call(instantiateContract, {contractArtifact, events, store: action.drizzle.store, web3}) + if (contractConfig.web3Contract) { + drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractName, events, store: action.drizzle.store, web3}) + } else { + drizzleContract = yield call(instantiateContract, {contractConfig, events, store: action.drizzle.store, web3}) + } + + action.drizzle.contracts[contractName] = drizzleContract } // Collect contract addresses in an array for later comparison in txs. @@ -42,7 +49,7 @@ function* initializeDrizzle(action) { for (var contract in action.drizzle.contracts) { - contractNames.push(action.drizzle.contracts[contract].contractArtifact.contractName) + contractNames.push(action.drizzle.contracts[contract].contractName) contractAddresses.push(action.drizzle.contracts[contract].options.address.toLowerCase()) } @@ -80,4 +87,4 @@ function* drizzleStatusSaga() { yield takeLatest('DRIZZLE_INITIALIZING', initializeDrizzle) } -export default drizzleStatusSaga; \ No newline at end of file +export default drizzleStatusSaga; diff --git a/src/generateContractsInitialState.js b/src/generateContractsInitialState.js index fb3344a7..4ac83437 100644 --- a/src/generateContractsInitialState.js +++ b/src/generateContractsInitialState.js @@ -1,3 +1,5 @@ +import getAbi from './getAbi' + function generateContractsInitialState(options) { // Preloaded state var contractsInitialState = {} @@ -12,8 +14,9 @@ function generateContractsInitialState(options) { } // Constant getters - for (var i2 = 0; i2 < options.contracts[i].abi.length; i2++) { - var item = options.contracts[i].abi[i2]; + var abi = getAbi(options.contracts[i]) + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; if (item.type == "function" && item.constant === true) { contractsInitialState[contractName][item.name] = {} @@ -24,4 +27,4 @@ function generateContractsInitialState(options) { return contractsInitialState } -module.exports = generateContractsInitialState \ No newline at end of file +module.exports = generateContractsInitialState diff --git a/src/generateStore.js b/src/generateStore.js index 80dfd22a..b26a9acf 100644 --- a/src/generateStore.js +++ b/src/generateStore.js @@ -2,6 +2,7 @@ import { createStore, applyMiddleware, compose } from 'redux' import createSagaMiddleware from 'redux-saga' import rootSaga from './rootSaga' import reducer from './reducer' +import getAbi from './getAbi' function generateStore(options) { // Redux DevTools @@ -20,8 +21,9 @@ function generateStore(options) { } // Constant getters - for (var i2 = 0; i2 < options.contracts[i].abi.length; i2++) { - var item = options.contracts[i].abi[i2]; + var abi = getAbi(options.contracts[i]) + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; if (item.type == "function" && item.constant === true) { contractsInitialState[contractName][item.name] = {} @@ -51,4 +53,4 @@ function generateStore(options) { return store } -module.exports = generateStore \ No newline at end of file +module.exports = generateStore diff --git a/src/getAbi.js b/src/getAbi.js new file mode 100644 index 00000000..f7094b83 --- /dev/null +++ b/src/getAbi.js @@ -0,0 +1,7 @@ +export default function getAbi(contractEntry) { + if (contractEntry.web3Contract) { + return contractEntry.web3Contract.options.jsonInterface + } else { + return contractEntry.abi + } +} From 7e1409cc2808cfd0f7997ec3fe4887221064a9d5 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 May 2018 09:21:15 -0700 Subject: [PATCH 03/13] Fixed options recursive deep merge problem and fixed bug in drizzleStatusSaga --- src/drizzleStatus/drizzleStatusSaga.js | 6 +++--- src/mergeOptions.js | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 src/mergeOptions.js diff --git a/src/drizzleStatus/drizzleStatusSaga.js b/src/drizzleStatus/drizzleStatusSaga.js index 1a3ecb2e..060aabd1 100644 --- a/src/drizzleStatus/drizzleStatusSaga.js +++ b/src/drizzleStatus/drizzleStatusSaga.js @@ -1,6 +1,6 @@ import { call, put, select, takeLatest } from 'redux-saga/effects' import defaultOptions from '../defaultOptions' -import merge from 'deepmerge' +import merge from '../mergeOptions' // Initialization Functions import { initializeWeb3, getNetworkId } from '../web3/web3Saga' @@ -35,9 +35,9 @@ function* initializeDrizzle(action) { } if (contractConfig.web3Contract) { - drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractName, events, store: action.drizzle.store, web3}) + var drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractName, events, store: action.drizzle.store, web3}) } else { - drizzleContract = yield call(instantiateContract, {contractConfig, events, store: action.drizzle.store, web3}) + drizzleContract = yield call(instantiateContract, {contractArtifact: contractConfig, events, store: action.drizzle.store, web3}) } action.drizzle.contracts[contractName] = drizzleContract diff --git a/src/mergeOptions.js b/src/mergeOptions.js new file mode 100644 index 00000000..ddbc637b --- /dev/null +++ b/src/mergeOptions.js @@ -0,0 +1,8 @@ +import merge from 'deepmerge' +const isPlainObject = require('is-plain-object') + +export default function (defaultOptions, newOptions) { + return merge(defaultOptions, newOptions, { + isMergeableObject: isPlainObject + }) +} From e8b6b42f17c79e785eb1888b2b1759b92d04c484 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 May 2018 09:21:46 -0700 Subject: [PATCH 04/13] Fixed some undefined var issues in blocksSaga --- src/blocks/blocksSaga.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/blocks/blocksSaga.js b/src/blocks/blocksSaga.js index ce58bc42..6db16f2c 100644 --- a/src/blocks/blocksSaga.js +++ b/src/blocks/blocksSaga.js @@ -119,11 +119,14 @@ function* processBlock({block, contracts, contractAddresses, contractNames, web3 // Loop through txs looking for contract address for (var i = 0; i < txs.length; i++) { - if (contractAddresses.indexOf(txs[i].from.toLowerCase()) !== -1 || contractAddresses.indexOf(txs[i].to.toLowerCase()) !== -1) + var from = txs[i].from || '' + var to = txs[i].to || '' + + if (contractAddresses.indexOf(from.toLowerCase()) !== -1 || contractAddresses.indexOf(to.toLowerCase()) !== -1) { const index = contractAddresses.indexOf(txs[i].from.toLowerCase()) !== -1 ? contractAddresses.indexOf(txs[i].from.toLowerCase()) : contractAddresses.indexOf(txs[i].to.toLowerCase()) const contractName = contractNames[index] - + yield put({type: 'CONTRACT_SYNCING', contract: contracts[contractName]}) } } @@ -145,8 +148,8 @@ function* blocksSaga() { yield takeEvery('BLOCK_RECEIVED', processBlockHeader) // Block Polling - yield takeLatest('BLOCKS_POLLING', callCreateBlockPollChannel) + yield takeLatest('BLOCKS_POLLING', callCreateBlockPollChannel) yield takeEvery('BLOCK_FOUND', processBlock) } -export default blocksSaga \ No newline at end of file +export default blocksSaga From 8555862816a1713dbab91f2361b19ec38da384c9 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 May 2018 09:22:17 -0700 Subject: [PATCH 05/13] Changed window on load initialize event to promise so that Drizzle can be asynchronously loaded --- src/Drizzle.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Drizzle.js b/src/Drizzle.js index afeb1ff7..2c16d9bc 100644 --- a/src/Drizzle.js +++ b/src/Drizzle.js @@ -1,3 +1,7 @@ +var windowPromise = new Promise((resolve, reject) => { + window.addEventListener('load', resolve) +}) + class Drizzle { constructor(options, store) { // Variables @@ -7,7 +11,8 @@ class Drizzle { this.web3 = {} // Wait for window load event in case of injected web3. - window.addEventListener('load', () => { + // window.addEventListener('load', () => { + windowPromise.then(() => { // Begin Drizzle initialization. store.dispatch({type: 'DRIZZLE_INITIALIZING', drizzle: this, options}) }) From 35802064b66a7b68e97552a74b60f8a9e0ac1a72 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 May 2018 09:22:38 -0700 Subject: [PATCH 06/13] Added isPlainObject --- package-lock.json | 15 +++++++++++++++ package.json | 1 + 2 files changed, 16 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8df46053..3e63fd80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3496,6 +3496,21 @@ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, "is-posix-bracket": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", diff --git a/package.json b/package.json index 27230e28..a4a60764 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "dependencies": { "deepmerge": "^2.1.0", "eth-block-tracker-es5": "^2.3.2", + "is-plain-object": "^2.0.4", "redux": "^3.6.0", "redux-saga": "^0.15.3", "web3": "^1.0.0-beta.34" From d15af7fe53cb6fca6bef5afb7577204feae99785 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 May 2018 09:53:49 -0700 Subject: [PATCH 07/13] Clarified comments --- src/Drizzle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Drizzle.js b/src/Drizzle.js index 2c16d9bc..f3970f67 100644 --- a/src/Drizzle.js +++ b/src/Drizzle.js @@ -1,3 +1,4 @@ +// Load as promise so that async Drizzle initialization can still resolve var windowPromise = new Promise((resolve, reject) => { window.addEventListener('load', resolve) }) @@ -11,7 +12,6 @@ class Drizzle { this.web3 = {} // Wait for window load event in case of injected web3. - // window.addEventListener('load', () => { windowPromise.then(() => { // Begin Drizzle initialization. store.dispatch({type: 'DRIZZLE_INITIALIZING', drizzle: this, options}) From be6914e6ece58dce986bef5aeb4ef906547209e3 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Tue, 15 May 2018 10:04:50 -0700 Subject: [PATCH 08/13] Updated dist build --- dist/drizzle.js | 5922 +++++++++++++++++++++++++-------------------- dist/package.json | 23 - 2 files changed, 3350 insertions(+), 2595 deletions(-) delete mode 100644 dist/package.json diff --git a/dist/drizzle.js b/dist/drizzle.js index c318b95c..a123ffe0 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -7,7 +7,7 @@ exports["drizzle"] = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("web3")); else root["drizzle"] = factory(root["redux-saga"], root["redux"], root["eth-block-tracker-es5"], root["web3"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_18__, __WEBPACK_EXTERNAL_MODULE_46__, __WEBPACK_EXTERNAL_MODULE_83__, __WEBPACK_EXTERNAL_MODULE_129__) { +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_25__, __WEBPACK_EXTERNAL_MODULE_70__, __WEBPACK_EXTERNAL_MODULE_117__, __WEBPACK_EXTERNAL_MODULE_148__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -70,16 +70,28 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 72); +/******/ return __webpack_require__(__webpack_require__.s = 86); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ +/***/ (function(module, exports) { + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self + // eslint-disable-next-line no-new-func + : Function('return this')(); +if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef + + +/***/ }), +/* 1 */ /***/ (function(module, exports, __webpack_require__) { -var store = __webpack_require__(35)('wks'); +var store = __webpack_require__(38)('wks'); var uid = __webpack_require__(23); -var Symbol = __webpack_require__(1).Symbol; +var Symbol = __webpack_require__(0).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { @@ -90,18 +102,6 @@ var $exports = module.exports = function (name) { $exports.store = store; -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 -var global = module.exports = typeof window != 'undefined' && window.Math == Math - ? window : typeof self != 'undefined' && self.Math == Math ? self - // eslint-disable-next-line no-new-func - : Function('return this')(); -if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef - - /***/ }), /* 2 */ /***/ (function(module, exports) { @@ -114,9 +114,9 @@ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /* 3 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(13); -var IE8_DOM_DEFINE = __webpack_require__(51); -var toPrimitive = __webpack_require__(30); +var anObject = __webpack_require__(5); +var IE8_DOM_DEFINE = __webpack_require__(54); +var toPrimitive = __webpack_require__(35); var dP = Object.defineProperty; exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProperty(O, P, Attributes) { @@ -136,16 +136,137 @@ exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProp /* 4 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(76); +var global = __webpack_require__(0); +var core = __webpack_require__(2); +var ctx = __webpack_require__(15); +var hide = __webpack_require__(7); +var PROTOTYPE = 'prototype'; + +var $export = function (type, name, source) { + var IS_FORCED = type & $export.F; + var IS_GLOBAL = type & $export.G; + var IS_STATIC = type & $export.S; + var IS_PROTO = type & $export.P; + var IS_BIND = type & $export.B; + var IS_WRAP = type & $export.W; + var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); + var expProto = exports[PROTOTYPE]; + var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; + var key, own, out; + if (IS_GLOBAL) source = name; + for (key in source) { + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if (own && key in exports) continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function (C) { + var F = function (a, b, c) { + if (this instanceof C) { + switch (arguments.length) { + case 0: return new C(); + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if (IS_PROTO) { + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; /***/ }), /* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +var isObject = __webpack_require__(8); +module.exports = function (it) { + if (!isObject(it)) throw TypeError(it + ' is not an object!'); + return it; +}; + + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +// Thank's IE8 for his funny defineProperty +module.exports = !__webpack_require__(16)(function () { + return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; +}); + + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +var dP = __webpack_require__(3); +var createDesc = __webpack_require__(17); +module.exports = __webpack_require__(6) ? function (object, key, value) { + return dP.f(object, key, createDesc(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function (it, key) { + return hasOwnProperty.call(it, key); +}; + + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = __webpack_require__(110); + + +/***/ }), +/* 11 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_io__ = __webpack_require__(19); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__internal_io__ = __webpack_require__(26); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "take", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["q"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "takem", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["t"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "put", function() { return __WEBPACK_IMPORTED_MODULE_0__internal_io__["l"]; }); @@ -170,27 +291,19 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ }), -/* 6 */ +/* 12 */ /***/ (function(module, exports, __webpack_require__) { -// Thank's IE8 for his funny defineProperty -module.exports = !__webpack_require__(15)(function () { - return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = __webpack_require__(58); +var defined = __webpack_require__(33); +module.exports = function (it) { + return IObject(defined(it)); }; /***/ }), -/* 8 */ +/* 13 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -508,36 +621,10 @@ var cloneableGenerator = function cloneableGenerator(generatorFunc) { }; }; }; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(47))) - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -var dP = __webpack_require__(3); -var createDesc = __webpack_require__(16); -module.exports = __webpack_require__(6) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -// to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(54); -var defined = __webpack_require__(32); -module.exports = function (it) { - return IObject(defined(it)); -}; - +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(71))) /***/ }), -/* 11 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -545,7 +632,7 @@ module.exports = function (it) { exports.__esModule = true; -var _assign = __webpack_require__(21); +var _assign = __webpack_require__(28); var _assign2 = _interopRequireDefault(_assign); @@ -566,94 +653,33 @@ exports.default = _assign2.default || function (target) { }; /***/ }), -/* 12 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(1); -var core = __webpack_require__(2); -var ctx = __webpack_require__(50); -var hide = __webpack_require__(9); -var PROTOTYPE = 'prototype'; - -var $export = function (type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var IS_WRAP = type & $export.W; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE]; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; - var key, own, out; - if (IS_GLOBAL) source = name; - for (key in source) { - // contains in native - own = !IS_FORCED && target && target[key] !== undefined; - if (own && key in exports) continue; - // export native or passed - out = own ? target[key] : source[key]; - // prevent global pollution for namespaces - exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] - // bind timers to global for call from export context - : IS_BIND && own ? ctx(out, global) - // wrap global constructors for prevent change them in library - : IS_WRAP && target[key] == out ? (function (C) { - var F = function (a, b, c) { - if (this instanceof C) { - switch (arguments.length) { - case 0: return new C(); - case 1: return new C(a); - case 2: return new C(a, b); - } return new C(a, b, c); - } return C.apply(this, arguments); - }; - F[PROTOTYPE] = C[PROTOTYPE]; - return F; - // make static versions for prototype methods - })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% - if (IS_PROTO) { - (exports.virtual || (exports.virtual = {}))[key] = out; - // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% - if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); - } +// optional / simple context binding +var aFunction = __webpack_require__(21); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) return fn; + switch (length) { + case 1: return function (a) { + return fn.call(that, a); + }; + case 2: return function (a, b) { + return fn.call(that, a, b); + }; + case 3: return function (a, b, c) { + return fn.call(that, a, b, c); + }; } -}; -// type bitmap -$export.F = 1; // forced -$export.G = 2; // global -$export.S = 4; // static -$export.P = 8; // proto -$export.B = 16; // bind -$export.W = 32; // wrap -$export.U = 64; // safe -$export.R = 128; // real proto method for `library` -module.exports = $export; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(14); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports) { - -module.exports = function (it) { - return typeof it === 'object' ? it !== null : typeof it === 'function'; + return function (/* ...args */) { + return fn.apply(that, arguments); + }; }; /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports) { module.exports = function (exec) { @@ -666,7 +692,7 @@ module.exports = function (exec) { /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { @@ -680,20 +706,85 @@ module.exports = function (bitmap, value) { /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), -/* 18 */ +/* 19 */ +/***/ (function(module, exports) { + +var toString = {}.toString; + +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + + +/***/ }), +/* 20 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_18__; +module.exports = true; + /***/ }), -/* 19 */ +/* 21 */ +/***/ (function(module, exports) { + +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; + + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = __webpack_require__(57); +var enumBugKeys = __webpack_require__(39); + +module.exports = Object.keys || function keys(O) { + return $keys(O, enumBugKeys); +}; + + +/***/ }), +/* 23 */ +/***/ (function(module, exports) { + +var id = 0; +var px = Math.random(); +module.exports = function (key) { + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; + + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +var def = __webpack_require__(3).f; +var has = __webpack_require__(9); +var TAG = __webpack_require__(1)('toStringTag'); + +module.exports = function (it, tag, stat) { + if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); +}; + + +/***/ }), +/* 25 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_25__; + +/***/ }), +/* 26 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -719,8 +810,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_18__; /* harmony export (immutable) */ __webpack_exports__["s"] = takeLatest; /* harmony export (immutable) */ __webpack_exports__["u"] = throttle; /* unused harmony export asEffect */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(78); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(112); @@ -990,7 +1081,7 @@ var asEffect = { }; /***/ }), -/* 20 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1000,13 +1091,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _regenerator = __webpack_require__(4); +var _regenerator = __webpack_require__(10); var _regenerator2 = _interopRequireDefault(_regenerator); exports.getAccountBalances = getAccountBalances; -var _effects = __webpack_require__(5); +var _effects = __webpack_require__(11); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1103,44 +1194,20 @@ function accountBalancesSaga() { exports.default = accountBalancesSaga; /***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(84), __esModule: true }; - -/***/ }), -/* 22 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { -// 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(53); -var enumBugKeys = __webpack_require__(36); - -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - +module.exports = { "default": __webpack_require__(118), __esModule: true }; /***/ }), -/* 24 */ +/* 29 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), -/* 25 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1148,7 +1215,7 @@ exports.f = {}.propertyIsEnumerable; exports.__esModule = true; -var _from = __webpack_require__(90); +var _from = __webpack_require__(121); var _from2 = _interopRequireDefault(_from); @@ -1167,103 +1234,262 @@ exports.default = function (arr) { }; /***/ }), -/* 26 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return qEnd; }); -/* harmony export (immutable) */ __webpack_exports__["c"] = safeName; -/* harmony export (immutable) */ __webpack_exports__["a"] = fsmIterator; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8); - -var done = { done: true, value: undefined }; -var qEnd = {}; +var $at = __webpack_require__(90)(true); -function safeName(patternOrChannel) { - if (__WEBPACK_IMPORTED_MODULE_0__utils__["j" /* is */].channel(patternOrChannel)) { - return 'channel'; - } else if (Array.isArray(patternOrChannel)) { - return String(patternOrChannel.map(function (entry) { - return String(entry); - })); - } else { - return String(patternOrChannel); - } -} +// 21.1.3.27 String.prototype[@@iterator]() +__webpack_require__(53)(String, 'String', function (iterated) { + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function () { + var O = this._t; + var index = this._i; + var point; + if (index >= O.length) return { value: undefined, done: true }; + point = $at(O, index); + this._i += point.length; + return { value: point, done: false }; +}); -function fsmIterator(fsm, q0) { - var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'iterator'; - var updateState = void 0, - qNext = q0; +/***/ }), +/* 32 */ +/***/ (function(module, exports) { - function next(arg, error) { - if (qNext === qEnd) { - return done; - } +// 7.1.4 ToInteger +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (it) { + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; - if (error) { - qNext = qEnd; - throw error; - } else { - updateState && updateState(arg); - var _fsm$qNext = fsm[qNext](), - q = _fsm$qNext[0], - output = _fsm$qNext[1], - _updateState = _fsm$qNext[2]; +/***/ }), +/* 33 */ +/***/ (function(module, exports) { - qNext = q; - updateState = _updateState; - return qNext === qEnd ? done : output; - } - } +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; - return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["l" /* makeIterator */])(next, function (error) { - return next(null, error); - }, name, true); -} /***/ }), -/* 27 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return END; }); -/* unused harmony export isEnd */ -/* unused harmony export emitter */ -/* unused harmony export INVALID_BUFFER */ -/* unused harmony export UNDEFINED_INPUT_ERROR */ -/* unused harmony export channel */ -/* unused harmony export eventChannel */ -/* unused harmony export stdChannel */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffers__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(80); -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var isObject = __webpack_require__(8); +var document = __webpack_require__(0).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(8); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { -var CHANNEL_END_TYPE = '@@redux-saga/CHANNEL_END'; -var END = { type: CHANNEL_END_TYPE }; -var isEnd = function isEnd(a) { - return a && a.type === CHANNEL_END_TYPE; +// 7.1.15 ToLength +var toInteger = __webpack_require__(32); +var min = Math.min; +module.exports = function (it) { + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; -function emitter() { - var subscribers = []; - function subscribe(sub) { - subscribers.push(sub); - return function () { - return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* remove */])(subscribers, sub); - }; - } +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { - function emit(item) { +var shared = __webpack_require__(38)('keys'); +var uid = __webpack_require__(23); +module.exports = function (key) { + return shared[key] || (shared[key] = uid(key)); +}; + + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +var global = __webpack_require__(0); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || (global[SHARED] = {}); +module.exports = function (key) { + return store[key] || (store[key] = {}); +}; + + +/***/ }), +/* 39 */ +/***/ (function(module, exports) { + +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); + + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.13 ToObject(argument) +var defined = __webpack_require__(33); +module.exports = function (it) { + return Object(defined(it)); +}; + + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +// 25.4.1.5 NewPromiseCapability(C) +var aFunction = __webpack_require__(21); + +function PromiseCapability(C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +} + +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), +/* 42 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return qEnd; }); +/* harmony export (immutable) */ __webpack_exports__["c"] = safeName; +/* harmony export (immutable) */ __webpack_exports__["a"] = fsmIterator; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); + + +var done = { done: true, value: undefined }; +var qEnd = {}; + +function safeName(patternOrChannel) { + if (__WEBPACK_IMPORTED_MODULE_0__utils__["j" /* is */].channel(patternOrChannel)) { + return 'channel'; + } else if (Array.isArray(patternOrChannel)) { + return String(patternOrChannel.map(function (entry) { + return String(entry); + })); + } else { + return String(patternOrChannel); + } +} + +function fsmIterator(fsm, q0) { + var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'iterator'; + + var updateState = void 0, + qNext = q0; + + function next(arg, error) { + if (qNext === qEnd) { + return done; + } + + if (error) { + qNext = qEnd; + throw error; + } else { + updateState && updateState(arg); + + var _fsm$qNext = fsm[qNext](), + q = _fsm$qNext[0], + output = _fsm$qNext[1], + _updateState = _fsm$qNext[2]; + + qNext = q; + updateState = _updateState; + return qNext === qEnd ? done : output; + } + } + + return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["l" /* makeIterator */])(next, function (error) { + return next(null, error); + }, name, true); +} + +/***/ }), +/* 43 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return END; }); +/* unused harmony export isEnd */ +/* unused harmony export emitter */ +/* unused harmony export INVALID_BUFFER */ +/* unused harmony export UNDEFINED_INPUT_ERROR */ +/* unused harmony export channel */ +/* unused harmony export eventChannel */ +/* unused harmony export stdChannel */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffers__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(114); +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + + + + +var CHANNEL_END_TYPE = '@@redux-saga/CHANNEL_END'; +var END = { type: CHANNEL_END_TYPE }; +var isEnd = function isEnd(a) { + return a && a.type === CHANNEL_END_TYPE; +}; + +function emitter() { + var subscribers = []; + + function subscribe(sub) { + subscribers.push(sub); + return function () { + return Object(__WEBPACK_IMPORTED_MODULE_0__utils__["n" /* remove */])(subscribers, sub); + }; + } + + function emit(item) { var arr = subscribers.slice(); for (var i = 0, len = arr.length; i < len; i++) { arr[i](item); @@ -1441,10 +1667,10 @@ function stdChannel(subscribe) { } }); } -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(47))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(71))) /***/ }), -/* 28 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1454,17 +1680,17 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _regenerator = __webpack_require__(4); +var _regenerator = __webpack_require__(10); var _regenerator2 = _interopRequireDefault(_regenerator); exports.getAccounts = getAccounts; -var _reduxSaga = __webpack_require__(18); +var _reduxSaga = __webpack_require__(25); -var _effects = __webpack_require__(5); +var _effects = __webpack_require__(11); -var _accountBalancesSaga = __webpack_require__(20); +var _accountBalancesSaga = __webpack_require__(27); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1641,7 +1867,7 @@ function accountsSaga() { exports.default = accountsSaga; /***/ }), -/* 29 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1651,34 +1877,34 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _assign = __webpack_require__(21); +var _assign = __webpack_require__(28); var _assign2 = _interopRequireDefault(_assign); -var _extends2 = __webpack_require__(11); +var _extends2 = __webpack_require__(14); var _extends3 = _interopRequireDefault(_extends2); -var _toConsumableArray2 = __webpack_require__(25); +var _toConsumableArray2 = __webpack_require__(30); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); -var _typeof2 = __webpack_require__(60); +var _typeof2 = __webpack_require__(74); var _typeof3 = _interopRequireDefault(_typeof2); -var _regenerator = __webpack_require__(4); +var _regenerator = __webpack_require__(10); var _regenerator2 = _interopRequireDefault(_regenerator); exports.instantiateWeb3Contract = instantiateWeb3Contract; exports.instantiateContract = instantiateContract; -var _reduxSaga = __webpack_require__(18); +var _reduxSaga = __webpack_require__(25); -var _effects = __webpack_require__(5); +var _effects = __webpack_require__(11); -var _DrizzleContract = __webpack_require__(121); +var _DrizzleContract = __webpack_require__(137); var _DrizzleContract2 = _interopRequireDefault(_DrizzleContract); @@ -2154,192 +2380,76 @@ function contractsSaga() { exports.default = contractsSaga; /***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(14); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - -/***/ }), -/* 31 */ -/***/ (function(module, exports) { - -var toString = {}.toString; - -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - - -/***/ }), -/* 32 */ +/* 46 */ /***/ (function(module, exports) { -// 7.2.1 RequireObjectCoercible(argument) -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; +exports.f = Object.getOwnPropertySymbols; /***/ }), -/* 33 */ -/***/ (function(module, exports) { +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { -// 7.1.4 ToInteger -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; +exports.f = __webpack_require__(1); /***/ }), -/* 34 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { -var shared = __webpack_require__(35)('keys'); -var uid = __webpack_require__(23); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); +var global = __webpack_require__(0); +var core = __webpack_require__(2); +var LIBRARY = __webpack_require__(20); +var wksExt = __webpack_require__(47); +var defineProperty = __webpack_require__(3).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), -/* 35 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(1); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -module.exports = function (key) { - return store[key] || (store[key] = {}); -}; +"use strict"; -/***/ }), -/* 36 */ -/***/ (function(module, exports) { +Object.defineProperty(exports, "__esModule", { + value: true +}); -// IE 8- don't enum bug keys -module.exports = ( - 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' -).split(','); +var _regenerator = __webpack_require__(10); +var _regenerator2 = _interopRequireDefault(_regenerator); -/***/ }), -/* 37 */ -/***/ (function(module, exports) { +exports.initializeWeb3 = initializeWeb3; +exports.getNetworkId = getNetworkId; -exports.f = Object.getOwnPropertySymbols; +var _effects = __webpack_require__(11); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }), -/* 38 */ -/***/ (function(module, exports, __webpack_require__) { +var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), + _marked2 = /*#__PURE__*/_regenerator2.default.mark(callInitializeWeb3), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(getNetworkId), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), + _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); -// 7.1.13 ToObject(argument) -var defined = __webpack_require__(32); -module.exports = function (it) { - return Object(defined(it)); -}; +var Web3 = __webpack_require__(148); +/* + * Initialization + */ -/***/ }), -/* 39 */ -/***/ (function(module, exports) { - -module.exports = true; - - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __webpack_require__) { - -var def = __webpack_require__(3).f; -var has = __webpack_require__(7); -var TAG = __webpack_require__(0)('toStringTag'); - -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); -}; - - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -exports.f = __webpack_require__(0); - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -var global = __webpack_require__(1); -var core = __webpack_require__(2); -var LIBRARY = __webpack_require__(39); -var wksExt = __webpack_require__(41); -var defineProperty = __webpack_require__(3).f; -module.exports = function (name) { - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); -}; - - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _regenerator = __webpack_require__(4); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -exports.initializeWeb3 = initializeWeb3; -exports.getNetworkId = getNetworkId; - -var _effects = __webpack_require__(5); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(callInitializeWeb3), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(getNetworkId), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); - -var Web3 = __webpack_require__(129); - -/* - * Initialization - */ - -function initializeWeb3(_ref) { - var options = _ref.options; - var web3, provider; - return _regenerator2.default.wrap(function initializeWeb3$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - web3 = {}; +function initializeWeb3(_ref) { + var options = _ref.options; + var web3, provider; + return _regenerator2.default.wrap(function initializeWeb3$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + web3 = {}; // Checking if Web3 has been injected by the browser (Mist/MetaMask) @@ -2588,7 +2698,7 @@ function web3Saga() { exports.default = web3Saga; /***/ }), -/* 44 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2596,7 +2706,7 @@ exports.default = web3Saga; exports.__esModule = true; -var _defineProperty = __webpack_require__(62); +var _defineProperty = __webpack_require__(76); var _defineProperty2 = _interopRequireDefault(_defineProperty); @@ -2618,7 +2728,7 @@ exports.default = function (obj, key, value) { }; /***/ }), -/* 45 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -2633,519 +2743,972 @@ exports.default = function (instance, Constructor) { }; /***/ }), -/* 46 */ +/* 52 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_46__; + /***/ }), -/* 47 */ -/***/ (function(module, exports) { +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { -// shim for using process in browser -var process = module.exports = {}; +"use strict"; -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. +var LIBRARY = __webpack_require__(20); +var $export = __webpack_require__(4); +var redefine = __webpack_require__(55); +var hide = __webpack_require__(7); +var has = __webpack_require__(9); +var Iterators = __webpack_require__(18); +var $iterCreate = __webpack_require__(91); +var setToStringTag = __webpack_require__(24); +var getPrototypeOf = __webpack_require__(95); +var ITERATOR = __webpack_require__(1)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; -var cachedSetTimeout; -var cachedClearTimeout; +var returnThis = function () { return this; }; -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = (!BUGGY && $native) || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = !__webpack_require__(6) && !__webpack_require__(16)(function () { + return Object.defineProperty(__webpack_require__(34)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} +module.exports = __webpack_require__(7); -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { -process.listeners = function (name) { return [] } +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(5); +var dPs = __webpack_require__(92); +var enumBugKeys = __webpack_require__(39); +var IE_PROTO = __webpack_require__(37)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; -process.binding = function (name) { - throw new Error('process.binding is not supported'); +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(34)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(59).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); }; -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); }; -process.umask = function() { return 0; }; /***/ }), -/* 48 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export BUFFER_OVERFLOW */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buffers; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(8); - +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { -var BUFFER_OVERFLOW = "Channel's Buffer overflow!"; +var has = __webpack_require__(9); +var toIObject = __webpack_require__(12); +var arrayIndexOf = __webpack_require__(93)(false); +var IE_PROTO = __webpack_require__(37)('IE_PROTO'); -var ON_OVERFLOW_THROW = 1; -var ON_OVERFLOW_DROP = 2; -var ON_OVERFLOW_SLIDE = 3; -var ON_OVERFLOW_EXPAND = 4; +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; -var zeroBuffer = { isEmpty: __WEBPACK_IMPORTED_MODULE_0__utils__["k" /* kTrue */], put: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */], take: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */] }; -function ringBuffer() { - var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; - var overflowAction = arguments[1]; +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { - var arr = new Array(limit); - var length = 0; - var pushIndex = 0; - var popIndex = 0; +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(19); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; - var push = function push(it) { - arr[pushIndex] = it; - pushIndex = (pushIndex + 1) % limit; - length++; - }; - var take = function take() { - if (length != 0) { - var it = arr[popIndex]; - arr[popIndex] = null; - length--; - popIndex = (popIndex + 1) % limit; - return it; - } - }; +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { - var flush = function flush() { - var items = []; - while (length) { - items.push(take()); - } - return items; - }; +var document = __webpack_require__(0).document; +module.exports = document && document.documentElement; - return { - isEmpty: function isEmpty() { - return length == 0; - }, - put: function put(it) { - if (length < limit) { - push(it); - } else { - var doubledLimit = void 0; - switch (overflowAction) { - case ON_OVERFLOW_THROW: - throw new Error(BUFFER_OVERFLOW); - case ON_OVERFLOW_SLIDE: - arr[pushIndex] = it; - pushIndex = (pushIndex + 1) % limit; - popIndex = pushIndex; - break; - case ON_OVERFLOW_EXPAND: - doubledLimit = 2 * limit; - arr = flush(); +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { - length = arr.length; - pushIndex = arr.length; - popIndex = 0; +__webpack_require__(96); +var global = __webpack_require__(0); +var hide = __webpack_require__(7); +var Iterators = __webpack_require__(18); +var TO_STRING_TAG = __webpack_require__(1)('toStringTag'); - arr.length = doubledLimit; - limit = doubledLimit; +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); - push(it); - break; - default: - // DROP - } - } - }, - take: take, - flush: flush - }; +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; } -var buffers = { - none: function none() { - return zeroBuffer; - }, - fixed: function fixed(limit) { - return ringBuffer(limit, ON_OVERFLOW_THROW); - }, - dropping: function dropping(limit) { - return ringBuffer(limit, ON_OVERFLOW_DROP); - }, - sliding: function sliding(limit) { - return ringBuffer(limit, ON_OVERFLOW_SLIDE); - }, - expanding: function expanding(initialSize) { - return ringBuffer(initialSize, ON_OVERFLOW_EXPAND); - } -}; /***/ }), -/* 49 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(19); +var TAG = __webpack_require__(1)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; -var _regenerator = __webpack_require__(4); +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; -var _regenerator2 = _interopRequireDefault(_regenerator); +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; -var _reduxSaga = __webpack_require__(18); -var _effects = __webpack_require__(5); +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var _marked = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockChannel), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockPollChannel), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(processBlockHeader), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(processBlock), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(blocksSaga); - -var BlockTracker = __webpack_require__(83); +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(5); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; -/* - * Listen for Blocks - */ -function createBlockChannel(_ref) { - var contracts = _ref.contracts, - contractAddresses = _ref.contractAddresses, - contractNames = _ref.contractNames, - web3 = _ref.web3; +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { - return (0, _reduxSaga.eventChannel)(function (emit) { - var blockEvents = web3.eth.subscribe('newBlockHeaders', function (error, result) { - if (error) { - emit({ type: 'BLOCKS_FAILED', error: error }); +// check on default Array iterator +var Iterators = __webpack_require__(18); +var ITERATOR = __webpack_require__(1)('iterator'); +var ArrayProto = Array.prototype; - console.error('Error in block header subscription:'); - console.error(error); +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; - emit(_reduxSaga.END); - } - }).on('data', function (blockHeader) { - emit({ type: 'BLOCK_RECEIVED', blockHeader: blockHeader, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - }).on('error', function (error) { - emit({ type: 'BLOCKS_FAILED', error: error }); - emit(_reduxSaga.END); - }); - var unsubscribe = function unsubscribe() { - blockEvents.off(); - }; +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { - return unsubscribe; - }); -} +var classof = __webpack_require__(61); +var ITERATOR = __webpack_require__(1)('iterator'); +var Iterators = __webpack_require__(18); +module.exports = __webpack_require__(2).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; -function callCreateBlockChannel(_ref2) { - var contracts = _ref2.contracts, - contractAddresses = _ref2.contractAddresses, - contractNames = _ref2.contractNames, - web3 = _ref2.web3; - var blockChannel, event; - return _regenerator2.default.wrap(function callCreateBlockChannel$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0, _effects.call)(createBlockChannel, { contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - case 2: - blockChannel = _context.sent; - _context.prev = 3; +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { - case 4: - if (false) { - _context.next = 12; - break; - } +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(5); +var aFunction = __webpack_require__(21); +var SPECIES = __webpack_require__(1)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; - _context.next = 7; - return (0, _effects.take)(blockChannel); - case 7: - event = _context.sent; - _context.next = 10; - return (0, _effects.put)(event); +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { - case 10: - _context.next = 4; - break; +var ctx = __webpack_require__(15); +var invoke = __webpack_require__(102); +var html = __webpack_require__(59); +var cel = __webpack_require__(34); +var global = __webpack_require__(0); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(19)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; - case 12: - _context.prev = 12; - blockChannel.close(); - return _context.finish(12); +/***/ }), +/* 67 */ +/***/ (function(module, exports) { - case 15: - case 'end': - return _context.stop(); - } - } - }, _marked, this, [[3,, 12, 15]]); -} +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; -/* - * Poll for Blocks - */ -function createBlockPollChannel(_ref3) { - var contracts = _ref3.contracts, - contractAddresses = _ref3.contractAddresses, - contractNames = _ref3.contractNames, - interval = _ref3.interval, - web3 = _ref3.web3; +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { - return (0, _reduxSaga.eventChannel)(function (emit) { - var blockTracker = new BlockTracker({ provider: web3.currentProvider, pollingInterval: interval }); +var anObject = __webpack_require__(5); +var isObject = __webpack_require__(8); +var newPromiseCapability = __webpack_require__(41); + +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; - blockTracker.on('latest', function (block) { - emit({ type: 'BLOCK_FOUND', block: block, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - }); - blockTracker.start().catch(function (error) { - emit({ type: 'BLOCKS_FAILED', error: error }); - emit(_reduxSaga.END); - }); +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { - var unsubscribe = function unsubscribe() { - blockTracker.stop(); - }; +var ITERATOR = __webpack_require__(1)('iterator'); +var SAFE_CLOSING = false; - return unsubscribe; - }); -} +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } -function callCreateBlockPollChannel(_ref4) { - var contracts = _ref4.contracts, - contractAddresses = _ref4.contractAddresses, - contractNames = _ref4.contractNames, - interval = _ref4.interval, - web3 = _ref4.web3; - var blockChannel, event; - return _regenerator2.default.wrap(function callCreateBlockPollChannel$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.next = 2; - return (0, _effects.call)(createBlockPollChannel, { contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, interval: interval, web3: web3 }); +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; - case 2: - blockChannel = _context2.sent; - _context2.prev = 3; - case 4: - if (false) { - _context2.next = 12; - break; - } +/***/ }), +/* 70 */ +/***/ (function(module, exports) { - _context2.next = 7; - return (0, _effects.take)(blockChannel); +module.exports = __WEBPACK_EXTERNAL_MODULE_70__; - case 7: - event = _context2.sent; - _context2.next = 10; - return (0, _effects.put)(event); +/***/ }), +/* 71 */ +/***/ (function(module, exports) { - case 10: - _context2.next = 4; - break; +// shim for using process in browser +var process = module.exports = {}; - case 12: - _context2.prev = 12; +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. - blockChannel.close(); - return _context2.finish(12); +var cachedSetTimeout; +var cachedClearTimeout; - case 15: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this, [[3,, 12, 15]]); +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); } - -/* - * Process Blocks - */ - -function processBlockHeader(_ref5) { - var blockHeader = _ref5.blockHeader, - contracts = _ref5.contracts, - contractAddresses = _ref5.contractAddresses, - contractNames = _ref5.contractNames, - web3 = _ref5.web3; - var blockNumber, block; - return _regenerator2.default.wrap(function processBlockHeader$(_context3) { - while (1) { +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), +/* 72 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* unused harmony export BUFFER_OVERFLOW */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buffers; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); + + +var BUFFER_OVERFLOW = "Channel's Buffer overflow!"; + +var ON_OVERFLOW_THROW = 1; +var ON_OVERFLOW_DROP = 2; +var ON_OVERFLOW_SLIDE = 3; +var ON_OVERFLOW_EXPAND = 4; + +var zeroBuffer = { isEmpty: __WEBPACK_IMPORTED_MODULE_0__utils__["k" /* kTrue */], put: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */], take: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */] }; + +function ringBuffer() { + var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; + var overflowAction = arguments[1]; + + var arr = new Array(limit); + var length = 0; + var pushIndex = 0; + var popIndex = 0; + + var push = function push(it) { + arr[pushIndex] = it; + pushIndex = (pushIndex + 1) % limit; + length++; + }; + + var take = function take() { + if (length != 0) { + var it = arr[popIndex]; + arr[popIndex] = null; + length--; + popIndex = (popIndex + 1) % limit; + return it; + } + }; + + var flush = function flush() { + var items = []; + while (length) { + items.push(take()); + } + return items; + }; + + return { + isEmpty: function isEmpty() { + return length == 0; + }, + put: function put(it) { + if (length < limit) { + push(it); + } else { + var doubledLimit = void 0; + switch (overflowAction) { + case ON_OVERFLOW_THROW: + throw new Error(BUFFER_OVERFLOW); + case ON_OVERFLOW_SLIDE: + arr[pushIndex] = it; + pushIndex = (pushIndex + 1) % limit; + popIndex = pushIndex; + break; + case ON_OVERFLOW_EXPAND: + doubledLimit = 2 * limit; + + arr = flush(); + + length = arr.length; + pushIndex = arr.length; + popIndex = 0; + + arr.length = doubledLimit; + limit = doubledLimit; + + push(it); + break; + default: + // DROP + } + } + }, + take: take, + flush: flush + }; +} + +var buffers = { + none: function none() { + return zeroBuffer; + }, + fixed: function fixed(limit) { + return ringBuffer(limit, ON_OVERFLOW_THROW); + }, + dropping: function dropping(limit) { + return ringBuffer(limit, ON_OVERFLOW_DROP); + }, + sliding: function sliding(limit) { + return ringBuffer(limit, ON_OVERFLOW_SLIDE); + }, + expanding: function expanding(initialSize) { + return ringBuffer(initialSize, ON_OVERFLOW_EXPAND); + } +}; + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _regenerator = __webpack_require__(10); + +var _regenerator2 = _interopRequireDefault(_regenerator); + +var _reduxSaga = __webpack_require__(25); + +var _effects = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _marked = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockChannel), + _marked2 = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockPollChannel), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(processBlockHeader), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(processBlock), + _marked5 = /*#__PURE__*/_regenerator2.default.mark(blocksSaga); + +var BlockTracker = __webpack_require__(117); + +/* + * Listen for Blocks + */ + +function createBlockChannel(_ref) { + var contracts = _ref.contracts, + contractAddresses = _ref.contractAddresses, + contractNames = _ref.contractNames, + web3 = _ref.web3; + + return (0, _reduxSaga.eventChannel)(function (emit) { + var blockEvents = web3.eth.subscribe('newBlockHeaders', function (error, result) { + if (error) { + emit({ type: 'BLOCKS_FAILED', error: error }); + + console.error('Error in block header subscription:'); + console.error(error); + + emit(_reduxSaga.END); + } + }).on('data', function (blockHeader) { + emit({ type: 'BLOCK_RECEIVED', blockHeader: blockHeader, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + }).on('error', function (error) { + emit({ type: 'BLOCKS_FAILED', error: error }); + emit(_reduxSaga.END); + }); + + var unsubscribe = function unsubscribe() { + blockEvents.off(); + }; + + return unsubscribe; + }); +} + +function callCreateBlockChannel(_ref2) { + var contracts = _ref2.contracts, + contractAddresses = _ref2.contractAddresses, + contractNames = _ref2.contractNames, + web3 = _ref2.web3; + var blockChannel, event; + return _regenerator2.default.wrap(function callCreateBlockChannel$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _effects.call)(createBlockChannel, { contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + + case 2: + blockChannel = _context.sent; + _context.prev = 3; + + case 4: + if (false) { + _context.next = 12; + break; + } + + _context.next = 7; + return (0, _effects.take)(blockChannel); + + case 7: + event = _context.sent; + _context.next = 10; + return (0, _effects.put)(event); + + case 10: + _context.next = 4; + break; + + case 12: + _context.prev = 12; + + blockChannel.close(); + return _context.finish(12); + + case 15: + case 'end': + return _context.stop(); + } + } + }, _marked, this, [[3,, 12, 15]]); +} + +/* + * Poll for Blocks + */ + +function createBlockPollChannel(_ref3) { + var contracts = _ref3.contracts, + contractAddresses = _ref3.contractAddresses, + contractNames = _ref3.contractNames, + interval = _ref3.interval, + web3 = _ref3.web3; + + return (0, _reduxSaga.eventChannel)(function (emit) { + var blockTracker = new BlockTracker({ provider: web3.currentProvider, pollingInterval: interval }); + + blockTracker.on('latest', function (block) { + emit({ type: 'BLOCK_FOUND', block: block, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + }); + + blockTracker.start().catch(function (error) { + emit({ type: 'BLOCKS_FAILED', error: error }); + emit(_reduxSaga.END); + }); + + var unsubscribe = function unsubscribe() { + blockTracker.stop(); + }; + + return unsubscribe; + }); +} + +function callCreateBlockPollChannel(_ref4) { + var contracts = _ref4.contracts, + contractAddresses = _ref4.contractAddresses, + contractNames = _ref4.contractNames, + interval = _ref4.interval, + web3 = _ref4.web3; + var blockChannel, event; + return _regenerator2.default.wrap(function callCreateBlockPollChannel$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return (0, _effects.call)(createBlockPollChannel, { contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, interval: interval, web3: web3 }); + + case 2: + blockChannel = _context2.sent; + _context2.prev = 3; + + case 4: + if (false) { + _context2.next = 12; + break; + } + + _context2.next = 7; + return (0, _effects.take)(blockChannel); + + case 7: + event = _context2.sent; + _context2.next = 10; + return (0, _effects.put)(event); + + case 10: + _context2.next = 4; + break; + + case 12: + _context2.prev = 12; + + blockChannel.close(); + return _context2.finish(12); + + case 15: + case 'end': + return _context2.stop(); + } + } + }, _marked2, this, [[3,, 12, 15]]); +} + +/* + * Process Blocks + */ + +function processBlockHeader(_ref5) { + var blockHeader = _ref5.blockHeader, + contracts = _ref5.contracts, + contractAddresses = _ref5.contractAddresses, + contractNames = _ref5.contractNames, + web3 = _ref5.web3; + var blockNumber, block; + return _regenerator2.default.wrap(function processBlockHeader$(_context3) { + while (1) { switch (_context3.prev = _context3.next) { case 0: blockNumber = blockHeader.number; @@ -3189,7 +3752,7 @@ function processBlock(_ref6) { contractAddresses = _ref6.contractAddresses, contractNames = _ref6.contractNames, web3 = _ref6.web3; - var txs, i, index, contractName; + var txs, i, from, to, index, contractName; return _regenerator2.default.wrap(function processBlock$(_context4) { while (1) { switch (_context4.prev = _context4.next) { @@ -3198,7 +3761,7 @@ function processBlock(_ref6) { txs = block.transactions; if (!(txs.length > 0)) { - _context4.next = 13; + _context4.next = 15; break; } @@ -3206,48 +3769,51 @@ function processBlock(_ref6) { case 4: if (!(i < txs.length)) { - _context4.next = 13; + _context4.next = 15; break; } - if (!(contractAddresses.indexOf(txs[i].from.toLowerCase()) !== -1 || contractAddresses.indexOf(txs[i].to.toLowerCase()) !== -1)) { - _context4.next = 10; + from = txs[i].from || ''; + to = txs[i].to || ''; + + if (!(contractAddresses.indexOf(from.toLowerCase()) !== -1 || contractAddresses.indexOf(to.toLowerCase()) !== -1)) { + _context4.next = 12; break; } index = contractAddresses.indexOf(txs[i].from.toLowerCase()) !== -1 ? contractAddresses.indexOf(txs[i].from.toLowerCase()) : contractAddresses.indexOf(txs[i].to.toLowerCase()); contractName = contractNames[index]; - _context4.next = 10; + _context4.next = 12; return (0, _effects.put)({ type: 'CONTRACT_SYNCING', contract: contracts[contractName] }); - case 10: + case 12: i++; _context4.next = 4; break; - case 13: - _context4.next = 22; + case 15: + _context4.next = 24; break; - case 15: - _context4.prev = 15; + case 17: + _context4.prev = 17; _context4.t0 = _context4['catch'](0); console.error('Error in block processing:'); console.error(_context4.t0); - _context4.next = 21; + _context4.next = 23; return (0, _effects.put)({ type: 'BLOCK_FAILED', error: _context4.t0 }); - case 21: + case 23: return _context4.abrupt('return'); - case 22: + case 24: case 'end': return _context4.stop(); } } - }, _marked4, this, [[0, 15]]); + }, _marked4, this, [[0, 17]]); } function blocksSaga() { @@ -3259,279 +3825,29 @@ function blocksSaga() { return (0, _effects.takeLatest)('BLOCKS_LISTENING', callCreateBlockChannel); case 2: - _context5.next = 4; - return (0, _effects.takeEvery)('BLOCK_RECEIVED', processBlockHeader); - - case 4: - _context5.next = 6; - return (0, _effects.takeLatest)('BLOCKS_POLLING', callCreateBlockPollChannel); - - case 6: - _context5.next = 8; - return (0, _effects.takeEvery)('BLOCK_FOUND', processBlock); - - case 8: - case 'end': - return _context5.stop(); - } - } - }, _marked5, this); -} - -exports.default = blocksSaga; - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -// optional / simple context binding -var aFunction = __webpack_require__(86); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: return function (a) { - return fn.call(that, a); - }; - case 2: return function (a, b) { - return fn.call(that, a, b); - }; - case 3: return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function (/* ...args */) { - return fn.apply(that, arguments); - }; -}; - - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = !__webpack_require__(6) && !__webpack_require__(15)(function () { - return Object.defineProperty(__webpack_require__(52)('div'), 'a', { get: function () { return 7; } }).a != 7; -}); - - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(14); -var document = __webpack_require__(1).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { - -var has = __webpack_require__(7); -var toIObject = __webpack_require__(10); -var arrayIndexOf = __webpack_require__(88)(false); -var IE_PROTO = __webpack_require__(34)('IE_PROTO'); - -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; - - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { - -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(31); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.15 ToLength -var toInteger = __webpack_require__(33); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 -}; - - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var $at = __webpack_require__(92)(true); - -// 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(57)(String, 'String', function (iterated) { - this._t = String(iterated); // target - this._i = 0; // next index -// 21.1.5.2.1 %StringIteratorPrototype%.next() -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { value: undefined, done: true }; - point = $at(O, index); - this._i += point.length; - return { value: point, done: false }; -}); - - -/***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var LIBRARY = __webpack_require__(39); -var $export = __webpack_require__(12); -var redefine = __webpack_require__(58); -var hide = __webpack_require__(9); -var has = __webpack_require__(7); -var Iterators = __webpack_require__(17); -var $iterCreate = __webpack_require__(93); -var setToStringTag = __webpack_require__(40); -var getPrototypeOf = __webpack_require__(96); -var ITERATOR = __webpack_require__(0)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; - -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = (!BUGGY && $native) || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(9); - - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { + _context5.next = 4; + return (0, _effects.takeEvery)('BLOCK_RECEIVED', processBlockHeader); -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(13); -var dPs = __webpack_require__(94); -var enumBugKeys = __webpack_require__(36); -var IE_PROTO = __webpack_require__(34)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; + case 4: + _context5.next = 6; + return (0, _effects.takeLatest)('BLOCKS_POLLING', callCreateBlockPollChannel); -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(52)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(95).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; + case 6: + _context5.next = 8; + return (0, _effects.takeEvery)('BLOCK_FOUND', processBlock); -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; + case 8: + case 'end': + return _context5.stop(); + } + } + }, _marked5, this); +} +exports.default = blocksSaga; /***/ }), -/* 60 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3539,11 +3855,11 @@ module.exports = Object.create || function create(O, Properties) { exports.__esModule = true; -var _iterator = __webpack_require__(104); +var _iterator = __webpack_require__(125); var _iterator2 = _interopRequireDefault(_iterator); -var _symbol = __webpack_require__(110); +var _symbol = __webpack_require__(127); var _symbol2 = _interopRequireDefault(_symbol); @@ -3558,12 +3874,12 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d }; /***/ }), -/* 61 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(53); -var hiddenKeys = __webpack_require__(36).concat('length', 'prototype'); +var $keys = __webpack_require__(57); +var hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); @@ -3571,13 +3887,13 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { /***/ }), -/* 62 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(125), __esModule: true }; +module.exports = { "default": __webpack_require__(141), __esModule: true }; /***/ }), -/* 63 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3587,27 +3903,27 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _regenerator = __webpack_require__(4); +var _regenerator = __webpack_require__(10); var _regenerator2 = _interopRequireDefault(_regenerator); -var _effects = __webpack_require__(5); +var _effects = __webpack_require__(11); -var _defaultOptions = __webpack_require__(127); +var _defaultOptions = __webpack_require__(143); var _defaultOptions2 = _interopRequireDefault(_defaultOptions); -var _deepmerge = __webpack_require__(128); +var _mergeOptions = __webpack_require__(144); -var _deepmerge2 = _interopRequireDefault(_deepmerge); +var _mergeOptions2 = _interopRequireDefault(_mergeOptions); -var _web3Saga = __webpack_require__(43); +var _web3Saga = __webpack_require__(49); -var _accountsSaga = __webpack_require__(28); +var _accountsSaga = __webpack_require__(44); -var _accountBalancesSaga = __webpack_require__(20); +var _accountBalancesSaga = __webpack_require__(27); -var _contractsSaga = __webpack_require__(29); +var _contractsSaga = __webpack_require__(45); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -3618,13 +3934,13 @@ var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeDrizzle), function initializeDrizzle(action) { - var options, web3Options, web3, i, contractConfig, events, contractName, contractAddresses, contractNames, contract, interval; + var options, web3Options, web3, i, contractConfig, events, contractName, drizzleContract, contractAddresses, contractNames, contract, interval; return _regenerator2.default.wrap(function initializeDrizzle$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.prev = 0; - options = (0, _deepmerge2.default)(_defaultOptions2.default, action.options); + options = (0, _mergeOptions2.default)(_defaultOptions2.default, action.options); web3Options = options.web3; // Initialize web3 and get the current network ID. @@ -3681,7 +3997,7 @@ function initializeDrizzle(action) { case 25: _context.next = 27; - return (0, _effects.call)(_contractsSaga.instantiateContract, { contractConfig: contractConfig, events: events, store: action.drizzle.store, web3: web3 }); + return (0, _effects.call)(_contractsSaga.instantiateContract, { contractArtifact: contractConfig, events: events, store: action.drizzle.store, web3: web3 }); case 27: drizzleContract = _context.sent; @@ -3785,7 +4101,7 @@ function drizzleStatusSaga() { exports.default = drizzleStatusSaga; /***/ }), -/* 64 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3795,7 +4111,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _assign = __webpack_require__(21); +var _assign = __webpack_require__(28); var _assign2 = _interopRequireDefault(_assign); @@ -3821,7 +4137,7 @@ var accountsReducer = function accountsReducer() { exports.default = accountsReducer; /***/ }), -/* 65 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3831,11 +4147,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _defineProperty2 = __webpack_require__(44); +var _defineProperty2 = __webpack_require__(50); var _defineProperty3 = _interopRequireDefault(_defineProperty2); -var _extends3 = __webpack_require__(11); +var _extends3 = __webpack_require__(14); var _extends4 = _interopRequireDefault(_extends3); @@ -3857,7 +4173,7 @@ var accountBalancesReducer = function accountBalancesReducer() { exports.default = accountBalancesReducer; /***/ }), -/* 66 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3867,15 +4183,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _toConsumableArray2 = __webpack_require__(25); +var _toConsumableArray2 = __webpack_require__(30); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); -var _defineProperty2 = __webpack_require__(44); +var _defineProperty2 = __webpack_require__(50); var _defineProperty3 = _interopRequireDefault(_defineProperty2); -var _extends13 = __webpack_require__(11); +var _extends13 = __webpack_require__(14); var _extends14 = _interopRequireDefault(_extends13); @@ -3955,7 +4271,7 @@ var contractsReducer = function contractsReducer() { exports.default = contractsReducer; /***/ }), -/* 67 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3965,7 +4281,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(11); +var _extends2 = __webpack_require__(14); var _extends3 = _interopRequireDefault(_extends2); @@ -3994,7 +4310,7 @@ var drizzleStatusReducer = function drizzleStatusReducer() { exports.default = drizzleStatusReducer; /***/ }), -/* 68 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4004,15 +4320,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _toConsumableArray2 = __webpack_require__(25); +var _toConsumableArray2 = __webpack_require__(30); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); -var _defineProperty2 = __webpack_require__(44); +var _defineProperty2 = __webpack_require__(50); var _defineProperty3 = _interopRequireDefault(_defineProperty2); -var _extends6 = __webpack_require__(11); +var _extends6 = __webpack_require__(14); var _extends7 = _interopRequireDefault(_extends6); @@ -4057,7 +4373,7 @@ var transactionsReducer = function transactionsReducer() { exports.default = transactionsReducer; /***/ }), -/* 69 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4067,7 +4383,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _toConsumableArray2 = __webpack_require__(25); +var _toConsumableArray2 = __webpack_require__(30); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); @@ -4103,7 +4419,7 @@ var transactionStackReducer = function transactionStackReducer() { exports.default = transactionStackReducer; /***/ }), -/* 70 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4113,7 +4429,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _extends2 = __webpack_require__(11); +var _extends2 = __webpack_require__(14); var _extends3 = _interopRequireDefault(_extends2); @@ -4163,7 +4479,7 @@ var web3Reducer = function web3Reducer() { exports.default = web3Reducer; /***/ }), -/* 71 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4182,7 +4498,7 @@ function getAbi(contractEntry) { } /***/ }), -/* 72 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4193,67 +4509,67 @@ Object.defineProperty(exports, "__esModule", { }); exports.drizzleSagas = exports.drizzleReducers = exports.generateStore = exports.generateContractsInitialState = exports.Drizzle = undefined; -var _Drizzle = __webpack_require__(73); +var _Drizzle = __webpack_require__(87); var _Drizzle2 = _interopRequireDefault(_Drizzle); -var _generateStore = __webpack_require__(74); +var _generateStore = __webpack_require__(108); var _generateStore2 = _interopRequireDefault(_generateStore); -var _generateContractsInitialState = __webpack_require__(131); +var _generateContractsInitialState = __webpack_require__(150); var _generateContractsInitialState2 = _interopRequireDefault(_generateContractsInitialState); -var _accountsReducer = __webpack_require__(64); +var _accountsReducer = __webpack_require__(78); var _accountsReducer2 = _interopRequireDefault(_accountsReducer); -var _accountBalancesReducer = __webpack_require__(65); +var _accountBalancesReducer = __webpack_require__(79); var _accountBalancesReducer2 = _interopRequireDefault(_accountBalancesReducer); -var _contractsReducer = __webpack_require__(66); +var _contractsReducer = __webpack_require__(80); var _contractsReducer2 = _interopRequireDefault(_contractsReducer); -var _drizzleStatusReducer = __webpack_require__(67); +var _drizzleStatusReducer = __webpack_require__(81); var _drizzleStatusReducer2 = _interopRequireDefault(_drizzleStatusReducer); -var _transactionsReducer = __webpack_require__(68); +var _transactionsReducer = __webpack_require__(82); var _transactionsReducer2 = _interopRequireDefault(_transactionsReducer); -var _transactionStackReducer = __webpack_require__(69); +var _transactionStackReducer = __webpack_require__(83); var _transactionStackReducer2 = _interopRequireDefault(_transactionStackReducer); -var _web3Reducer = __webpack_require__(70); +var _web3Reducer = __webpack_require__(84); var _web3Reducer2 = _interopRequireDefault(_web3Reducer); -var _accountsSaga = __webpack_require__(28); +var _accountsSaga = __webpack_require__(44); var _accountsSaga2 = _interopRequireDefault(_accountsSaga); -var _accountBalancesSaga = __webpack_require__(20); +var _accountBalancesSaga = __webpack_require__(27); var _accountBalancesSaga2 = _interopRequireDefault(_accountBalancesSaga); -var _blocksSaga = __webpack_require__(49); +var _blocksSaga = __webpack_require__(73); var _blocksSaga2 = _interopRequireDefault(_blocksSaga); -var _contractsSaga = __webpack_require__(29); +var _contractsSaga = __webpack_require__(45); var _contractsSaga2 = _interopRequireDefault(_contractsSaga); -var _drizzleStatusSaga = __webpack_require__(63); +var _drizzleStatusSaga = __webpack_require__(77); var _drizzleStatusSaga2 = _interopRequireDefault(_drizzleStatusSaga); -var _web3Saga = __webpack_require__(43); +var _web3Saga = __webpack_require__(49); var _web3Saga2 = _interopRequireDefault(_web3Saga); @@ -4283,7 +4599,7 @@ exports.drizzleReducers = drizzleReducers; exports.drizzleSagas = drizzleSagas; /***/ }), -/* 73 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4293,12 +4609,21 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _classCallCheck2 = __webpack_require__(45); +var _classCallCheck2 = __webpack_require__(51); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); +var _promise = __webpack_require__(88); + +var _promise2 = _interopRequireDefault(_promise); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +// Load as promise so that async Drizzle initialization can still resolve +var windowPromise = new _promise2.default(function (resolve, reject) { + window.addEventListener('load', resolve); +}); + var Drizzle = function Drizzle(options, store) { var _this = this; @@ -4311,7 +4636,7 @@ var Drizzle = function Drizzle(options, store) { this.web3 = {}; // Wait for window load event in case of injected web3. - window.addEventListener('load', function () { + windowPromise.then(function () { // Begin Drizzle initialization. store.dispatch({ type: 'DRIZZLE_INITIALIZING', drizzle: _this, options: options }); }); @@ -4320,1682 +4645,2053 @@ var Drizzle = function Drizzle(options, store) { exports.default = Drizzle; /***/ }), -/* 74 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +module.exports = { "default": __webpack_require__(89), __esModule: true }; +/***/ }), +/* 89 */ +/***/ (function(module, exports, __webpack_require__) { -var _redux = __webpack_require__(46); +__webpack_require__(52); +__webpack_require__(31); +__webpack_require__(60); +__webpack_require__(99); +__webpack_require__(106); +__webpack_require__(107); +module.exports = __webpack_require__(2).Promise; -var _reduxSaga = __webpack_require__(18); -var _reduxSaga2 = _interopRequireDefault(_reduxSaga); +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { -var _rootSaga = __webpack_require__(75); +var toInteger = __webpack_require__(32); +var defined = __webpack_require__(33); +// true -> String#at +// false -> String#codePointAt +module.exports = function (TO_STRING) { + return function (that, pos) { + var s = String(defined(that)); + var i = toInteger(pos); + var l = s.length; + var a, b; + if (i < 0 || i >= l) return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; -var _rootSaga2 = _interopRequireDefault(_rootSaga); -var _reducer = __webpack_require__(130); +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { -var _reducer2 = _interopRequireDefault(_reducer); +"use strict"; -var _getAbi = __webpack_require__(71); +var create = __webpack_require__(56); +var descriptor = __webpack_require__(17); +var setToStringTag = __webpack_require__(24); +var IteratorPrototype = {}; -var _getAbi2 = _interopRequireDefault(_getAbi); +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +__webpack_require__(7)(IteratorPrototype, __webpack_require__(1)('iterator'), function () { return this; }); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +module.exports = function (Constructor, NAME, next) { + Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); + setToStringTag(Constructor, NAME + ' Iterator'); +}; -function generateStore(options) { - // Redux DevTools - var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || _redux.compose; - // Preloaded state - var contractsInitialState = {}; +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { - for (var i = 0; i < options.contracts.length; i++) { - // Initial contract details - var contractName = options.contracts[i].contractName; +var dP = __webpack_require__(3); +var anObject = __webpack_require__(5); +var getKeys = __webpack_require__(22); - contractsInitialState[contractName] = { - initialized: false, - synced: false +module.exports = __webpack_require__(6) ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = getKeys(Properties); + var length = keys.length; + var i = 0; + var P; + while (length > i) dP.f(O, P = keys[i++], Properties[P]); + return O; +}; - // Constant getters - };var abi = (0, _getAbi2.default)(options.contracts[i]); - for (var i2 = 0; i2 < abi.length; i2++) { - var item = abi[i2]; - if (item.type == "function" && item.constant === true) { - contractsInitialState[contractName][item.name] = {}; - } - } - } +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { - var preloadedState = { - contracts: contractsInitialState +// false -> Array#indexOf +// true -> Array#includes +var toIObject = __webpack_require__(12); +var toLength = __webpack_require__(36); +var toAbsoluteIndex = __webpack_require__(94); +module.exports = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) if (IS_INCLUDES || index in O) { + if (O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; - // create the saga middleware - };var sagaMiddleware = (0, _reduxSaga2.default)(); - var store = (0, _redux.createStore)(_reducer2.default, preloadedState, composeEnhancers((0, _redux.applyMiddleware)(sagaMiddleware))); +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { - sagaMiddleware.run(_rootSaga2.default); +var toInteger = __webpack_require__(32); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; - return store; -} -module.exports = generateStore; +/***/ }), +/* 95 */ +/***/ (function(module, exports, __webpack_require__) { + +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = __webpack_require__(9); +var toObject = __webpack_require__(40); +var IE_PROTO = __webpack_require__(37)('IE_PROTO'); +var ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; + /***/ }), -/* 75 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +var addToUnscopables = __webpack_require__(97); +var step = __webpack_require__(98); +var Iterators = __webpack_require__(18); +var toIObject = __webpack_require__(12); -Object.defineProperty(exports, "__esModule", { - value: true -}); +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = __webpack_require__(53)(Array, 'Array', function (iterated, kind) { + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function () { + var O = this._t; + var kind = this._k; + var index = this._i++; + if (!O || index >= O.length) { + this._t = undefined; + return step(1); + } + if (kind == 'keys') return step(0, index); + if (kind == 'values') return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); -var _regenerator = __webpack_require__(4); -var _regenerator2 = _interopRequireDefault(_regenerator); +/***/ }), +/* 97 */ +/***/ (function(module, exports) { + +module.exports = function () { /* empty */ }; + + +/***/ }), +/* 98 */ +/***/ (function(module, exports) { -exports.default = root; +module.exports = function (done, value) { + return { value: value, done: !!done }; +}; -var _effects = __webpack_require__(5); -var _accountsSaga = __webpack_require__(28); +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { -var _accountsSaga2 = _interopRequireDefault(_accountsSaga); +"use strict"; -var _accountBalancesSaga = __webpack_require__(20); +var LIBRARY = __webpack_require__(20); +var global = __webpack_require__(0); +var ctx = __webpack_require__(15); +var classof = __webpack_require__(61); +var $export = __webpack_require__(4); +var isObject = __webpack_require__(8); +var aFunction = __webpack_require__(21); +var anInstance = __webpack_require__(100); +var forOf = __webpack_require__(101); +var speciesConstructor = __webpack_require__(65); +var task = __webpack_require__(66).set; +var microtask = __webpack_require__(103)(); +var newPromiseCapabilityModule = __webpack_require__(41); +var perform = __webpack_require__(67); +var promiseResolve = __webpack_require__(68); +var PROMISE = 'Promise'; +var TypeError = global.TypeError; +var process = global.process; +var $Promise = global[PROMISE]; +var isNode = classof(process) == 'process'; +var empty = function () { /* empty */ }; +var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; +var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; + +var USE_NATIVE = !!function () { + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1); + var FakePromise = (promise.constructor = {})[__webpack_require__(1)('species')] = function (exec) { + exec(empty, empty); + }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch (e) { /* empty */ } +}(); -var _accountBalancesSaga2 = _interopRequireDefault(_accountBalancesSaga); +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (promise, isReject) { + if (promise._n) return; + promise._n = true; + var chain = promise._c; + microtask(function () { + var value = promise._v; + var ok = promise._s == 1; + var i = 0; + var run = function (reaction) { + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then; + try { + if (handler) { + if (!ok) { + if (promise._h == 2) onHandleUnhandled(promise); + promise._h = 1; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); + if (domain) domain.exit(); + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (e) { + reject(e); + } + }; + while (chain.length > i) run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if (isReject && !promise._h) onUnhandled(promise); + }); +}; +var onUnhandled = function (promise) { + task.call(global, function () { + var value = promise._v; + var unhandled = isUnhandled(promise); + var result, handler, console; + if (unhandled) { + result = perform(function () { + if (isNode) { + process.emit('unhandledRejection', value, promise); + } else if (handler = global.onunhandledrejection) { + handler({ promise: promise, reason: value }); + } else if ((console = global.console) && console.error) { + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if (unhandled && result.e) throw result.v; + }); +}; +var isUnhandled = function (promise) { + return promise._h !== 1 && (promise._a || promise._c).length === 0; +}; +var onHandleUnhandled = function (promise) { + task.call(global, function () { + var handler; + if (isNode) { + process.emit('rejectionHandled', promise); + } else if (handler = global.onrejectionhandled) { + handler({ promise: promise, reason: promise._v }); + } + }); +}; +var $reject = function (value) { + var promise = this; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if (!promise._a) promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function (value) { + var promise = this; + var then; + if (promise._d) return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if (promise === value) throw TypeError("Promise can't be resolved itself"); + if (then = isThenable(value)) { + microtask(function () { + var wrapper = { _w: promise, _d: false }; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch (e) { + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch (e) { + $reject.call({ _w: promise, _d: false }, e); // wrap + } +}; -var _blocksSaga = __webpack_require__(49); +// constructor polyfill +if (!USE_NATIVE) { + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor) { + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch (err) { + $reject.call(this, err); + } + }; + // eslint-disable-next-line no-unused-vars + Internal = function Promise(executor) { + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(104)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected) { + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if (this._a) this._a.push(reaction); + if (this._s) notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === $Promise || C === Wrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; +} -var _blocksSaga2 = _interopRequireDefault(_blocksSaga); +$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); +__webpack_require__(24)($Promise, PROMISE); +__webpack_require__(105)(PROMISE); +Wrapper = __webpack_require__(2)[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r) { + var capability = newPromiseCapability(this); + var $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x) { + return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); + } +}); +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(69)(function (iter) { + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var values = []; + var index = 0; + var remaining = 1; + forOf(iterable, false, function (promise) { + var $index = index++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.e) reject(result.v); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + forOf(iterable, false, function (promise) { + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if (result.e) reject(result.v); + return capability.promise; + } +}); -var _contractsSaga = __webpack_require__(29); -var _contractsSaga2 = _interopRequireDefault(_contractsSaga); +/***/ }), +/* 100 */ +/***/ (function(module, exports) { -var _drizzleStatusSaga = __webpack_require__(63); +module.exports = function (it, Constructor, name, forbiddenField) { + if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; -var _drizzleStatusSaga2 = _interopRequireDefault(_drizzleStatusSaga); -var _web3Saga = __webpack_require__(43); +/***/ }), +/* 101 */ +/***/ (function(module, exports, __webpack_require__) { -var _web3Saga2 = _interopRequireDefault(_web3Saga); +var ctx = __webpack_require__(15); +var call = __webpack_require__(62); +var isArrayIter = __webpack_require__(63); +var anObject = __webpack_require__(5); +var toLength = __webpack_require__(36); +var getIterFn = __webpack_require__(64); +var BREAK = {}; +var RETURN = {}; +var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { + var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); + var f = ctx(fn, that, entries ? 2 : 1); + var index = 0; + var length, step, iterator, result; + if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if (result === BREAK || result === RETURN) return result; + } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { + result = call(iterator, f, step.value, entries); + if (result === BREAK || result === RETURN) return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _marked = /*#__PURE__*/_regenerator2.default.mark(root); +/***/ }), +/* 102 */ +/***/ (function(module, exports) { -function root() { - return _regenerator2.default.wrap(function root$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return (0, _effects.all)([(0, _effects.fork)(_accountsSaga2.default), (0, _effects.fork)(_accountBalancesSaga2.default), (0, _effects.fork)(_blocksSaga2.default), (0, _effects.fork)(_contractsSaga2.default), (0, _effects.fork)(_drizzleStatusSaga2.default), (0, _effects.fork)(_web3Saga2.default)]); +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function (fn, args, that) { + var un = that === undefined; + switch (args.length) { + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; - case 2: - case 'end': - return _context.stop(); - } - } - }, _marked, this); -} /***/ }), -/* 76 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// This method of obtaining a reference to the global object needs to be -// kept identical to the way it is obtained in runtime.js -var g = (function() { return this })() || Function("return this")(); +var global = __webpack_require__(0); +var macrotask = __webpack_require__(66).set; +var Observer = global.MutationObserver || global.WebKitMutationObserver; +var process = global.process; +var Promise = global.Promise; +var isNode = __webpack_require__(19)(process) == 'process'; + +module.exports = function () { + var head, last, notify; + + var flush = function () { + var parent, fn; + if (isNode && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (e) { + if (head) notify(); + else last = undefined; + throw e; + } + } last = undefined; + if (parent) parent.enter(); + }; -// Use `getOwnPropertyNames` because not all browsers support calling -// `hasOwnProperty` on the global `self` object in a worker. See #183. -var hadRuntime = g.regeneratorRuntime && - Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + // Node.js + if (isNode) { + notify = function () { + process.nextTick(flush); + }; + // browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339 + } else if (Observer && !(global.navigator && global.navigator.standalone)) { + var toggle = true; + var node = document.createTextNode(''); + new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (Promise && Promise.resolve) { + var promise = Promise.resolve(); + notify = function () { + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function () { + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } -// Save the old regeneratorRuntime in case it needs to be restored later. -var oldRuntime = hadRuntime && g.regeneratorRuntime; + return function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; + }; +}; -// Force reevalutation of runtime.js. -g.regeneratorRuntime = undefined; -module.exports = __webpack_require__(77); +/***/ }), +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { -if (hadRuntime) { - // Restore the original runtime. - g.regeneratorRuntime = oldRuntime; -} else { - // Remove the global property added by runtime.js. - try { - delete g.regeneratorRuntime; - } catch(e) { - g.regeneratorRuntime = undefined; - } -} +var hide = __webpack_require__(7); +module.exports = function (target, src, safe) { + for (var key in src) { + if (safe && target[key]) target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; /***/ }), -/* 77 */ -/***/ (function(module, exports) { +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ +"use strict"; -!(function(global) { - "use strict"; +var global = __webpack_require__(0); +var core = __webpack_require__(2); +var dP = __webpack_require__(3); +var DESCRIPTORS = __webpack_require__(6); +var SPECIES = __webpack_require__(1)('species'); - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; +module.exports = function (KEY) { + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { + configurable: true, + get: function () { return this; } + }); +}; - var inModule = typeof module === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - // If regeneratorRuntime is defined globally and we're in a module, - // make the exports object identical to regeneratorRuntime. - module.exports = runtime; - } - // Don't bother evaluating the rest of this file if the runtime was - // already defined globally. - return; - } - // Define the runtime globally (as expected by generated code) as either - // module.exports (if we're in a module) or a new, empty object. - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); +"use strict"; +// https://github.com/tc39/proposal-promise-finally - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); +var $export = __webpack_require__(4); +var core = __webpack_require__(2); +var global = __webpack_require__(0); +var speciesConstructor = __webpack_require__(65); +var promiseResolve = __webpack_require__(68); - return generator; - } - runtime.wrap = wrap; +$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { + var C = speciesConstructor(this, core.Promise || global.Promise); + var isFunction = typeof onFinally == 'function'; + return this.then( + isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { return x; }); + } : onFinally, + isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { throw e; }); + } : onFinally + ); +} }); - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; +/***/ }), +/* 107 */ +/***/ (function(module, exports, __webpack_require__) { - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; +"use strict"; - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} +// https://github.com/tc39/proposal-promise-try +var $export = __webpack_require__(4); +var newPromiseCapability = __webpack_require__(41); +var perform = __webpack_require__(67); - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; +$export($export.S, 'Promise', { 'try': function (callbackfn) { + var promiseCapability = newPromiseCapability.f(this); + var result = perform(callbackfn); + (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); + return promiseCapability.promise; +} }); - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = - GeneratorFunction.displayName = "GeneratorFunction"; +/***/ }), +/* 108 */ +/***/ (function(module, exports, __webpack_require__) { - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - prototype[method] = function(arg) { - return this._invoke(method, arg); - }; - }); - } +"use strict"; - runtime.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - runtime.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; +var _redux = __webpack_require__(70); - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - runtime.awrap = function(arg) { - return { __await: arg }; - }; +var _reduxSaga = __webpack_require__(25); - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } +var _reduxSaga2 = _interopRequireDefault(_reduxSaga); - return Promise.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. If the Promise is rejected, however, the - // result for this iteration will be rejected with the same - // reason. Note that rejections of yielded Promises are not - // thrown back into the generator function, as is the case - // when an awaited Promise is rejected. This difference in - // behavior between yield and await is important, because it - // allows the consumer to decide what to do with the yielded - // rejection (swallow it and continue, manually .throw it back - // into the generator, abandon iteration, whatever). With - // await, by contrast, there is no opportunity to examine the - // rejection reason outside the generator function, so the - // only option is to throw it from the await expression, and - // let the generator function handle the exception. - result.value = unwrapped; - resolve(result); - }, reject); - } - } +var _rootSaga = __webpack_require__(109); - var previousPromise; +var _rootSaga2 = _interopRequireDefault(_rootSaga); - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } +var _reducer = __webpack_require__(149); - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } +var _reducer2 = _interopRequireDefault(_reducer); - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } +var _getAbi = __webpack_require__(85); - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; +var _getAbi2 = _interopRequireDefault(_getAbi); - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - runtime.async = function(innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList) - ); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - return runtime.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; +function generateStore(options) { + // Redux DevTools + var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || _redux.compose; - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; + // Preloaded state + var contractsInitialState = {}; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } + for (var i = 0; i < options.contracts.length; i++) { + // Initial contract details + var contractName = options.contracts[i].contractName; - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } + contractsInitialState[contractName] = { + initialized: false, + synced: false - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); + // Constant getters + };var abi = (0, _getAbi2.default)(options.contracts[i]); + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; + + if (item.type == "function" && item.constant === true) { + contractsInitialState[contractName][item.name] = {}; } + } + } - context.method = method; - context.arg = arg; + var preloadedState = { + contracts: contractsInitialState - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } + // create the saga middleware + };var sagaMiddleware = (0, _reduxSaga2.default)(); - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; + var store = (0, _redux.createStore)(_reducer2.default, preloadedState, composeEnhancers((0, _redux.applyMiddleware)(sagaMiddleware))); - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } + sagaMiddleware.run(_rootSaga2.default); - context.dispatchException(context.arg); + return store; +} - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } +module.exports = generateStore; - state = GenStateExecuting; +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; +"use strict"; - if (record.arg === ContinueSentinel) { - continue; - } - return { - value: record.arg, - done: context.done - }; +Object.defineProperty(exports, "__esModule", { + value: true +}); - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } +var _regenerator = __webpack_require__(10); - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; +var _regenerator2 = _interopRequireDefault(_regenerator); - if (context.method === "throw") { - if (delegate.iterator.return) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); +exports.default = root; + +var _effects = __webpack_require__(11); + +var _accountsSaga = __webpack_require__(44); + +var _accountsSaga2 = _interopRequireDefault(_accountsSaga); + +var _accountBalancesSaga = __webpack_require__(27); + +var _accountBalancesSaga2 = _interopRequireDefault(_accountBalancesSaga); + +var _blocksSaga = __webpack_require__(73); - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } +var _blocksSaga2 = _interopRequireDefault(_blocksSaga); - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } +var _contractsSaga = __webpack_require__(45); - return ContinueSentinel; - } +var _contractsSaga2 = _interopRequireDefault(_contractsSaga); - var record = tryCatch(method, delegate.iterator, context.arg); +var _drizzleStatusSaga = __webpack_require__(77); - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } +var _drizzleStatusSaga2 = _interopRequireDefault(_drizzleStatusSaga); - var info = record.arg; +var _web3Saga = __webpack_require__(49); - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } +var _web3Saga2 = _interopRequireDefault(_web3Saga); - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; +var _marked = /*#__PURE__*/_regenerator2.default.mark(root); - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } +function root() { + return _regenerator2.default.wrap(function root$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _effects.all)([(0, _effects.fork)(_accountsSaga2.default), (0, _effects.fork)(_accountBalancesSaga2.default), (0, _effects.fork)(_blocksSaga2.default), (0, _effects.fork)(_contractsSaga2.default), (0, _effects.fork)(_drizzleStatusSaga2.default), (0, _effects.fork)(_web3Saga2.default)]); - } else { - // Re-yield the result returned by the delegate method. - return info; + case 2: + case 'end': + return _context.stop(); + } } + }, _marked, this); +} - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { - Gp[toStringTagSymbol] = "Generator"; +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = (function() { return this })() || Function("return this")(); - Gp.toString = function() { - return "[object Generator]"; - }; +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; - if (1 in locs) { - entry.catchLoc = locs[1]; - } +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } +module.exports = __webpack_require__(111); - this.tryEntries.push(entry); +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; } +} - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } +/***/ }), +/* 111 */ +/***/ (function(module, exports) { - runtime.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); +/** + * Copyright (c) 2014-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; } - keys.reverse(); + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); - if (typeof iterable.next === "function") { - return iterable; - } + return generator; + } + runtime.wrap = wrap; - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } - next.value = undefined; - next.done = true; + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; - return next; - }; + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} - return next.next = next; - } - } + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; - // Return an iterator with no values. - return { next: doneResult }; + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; } - runtime.values = values; - function doneResult() { - return { value: undefined, done: true }; - } + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; - Context.prototype = { - constructor: Context, + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; - this.method = "next"; - this.arg = undefined; + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; - this.tryEntries.forEach(resetTryEntry); + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined; - } + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); } - } - }, - - stop: function() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); } + } - return this.rval; - }, + var previousPromise; - dispatchException: function(exception) { - if (this.done) { - throw exception; + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); } - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined; - } + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } - return !! caught; - } + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } - } else { - throw new Error("try statement without catch or finally"); + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; } } - } - }, - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; + context.dispatchException(context.arg); - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } - return this.complete(record); - }, + state = GenStateExecuting; - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } + if (record.arg === ContinueSentinel) { + continue; + } - return ContinueSentinel; - }, + return { + value: record.arg, + done: context.done + }; - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; } } - }, + }; + } - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; } - return thrown; } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); } - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, + return ContinueSentinel; + } - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; + var record = tryCatch(method, delegate.iterator, context.arg); - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined; - } + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; return ContinueSentinel; } - }; -})( - // In sloppy mode, unbound `this` refers to the global object, fallback to - // Function constructor if we're in global strict mode. That is sadly a form - // of indirect eval which violates Content Security Policy. - (function() { return this })() || Function("return this")() -); + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; -/***/ }), -/* 78 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; -"use strict"; -/* unused harmony export takeEvery */ -/* unused harmony export takeLatest */ -/* unused harmony export throttle */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(79); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(81); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(82); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(8); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__takeEvery__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__takeLatest__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__throttle__["a"]; }); + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + Gp[toStringTagSymbol] = "Generator"; + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + Gp.toString = function() { + return "[object Generator]"; + }; -var deprecationWarning = function deprecationWarning(helperName) { - return 'import { ' + helperName + ' } from \'redux-saga\' has been deprecated in favor of import { ' + helperName + ' } from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield ' + helperName + ' will return task descriptor to your saga and execute next lines of code.'; -}; + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; -var takeEvery = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_0__takeEvery__["a" /* default */], /*#__PURE__*/deprecationWarning('takeEvery')); -var takeLatest = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_1__takeLatest__["a" /* default */], /*#__PURE__*/deprecationWarning('takeLatest')); -var throttle = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_2__throttle__["a" /* default */], /*#__PURE__*/deprecationWarning('throttle')); + if (1 in locs) { + entry.catchLoc = locs[1]; + } + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + this.tryEntries.push(entry); + } -/***/ }), -/* 79 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = takeEvery; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(26); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(27); + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + if (typeof iterable.next === "function") { + return iterable; + } -function takeEvery(patternOrChannel, worker) { - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } - var yTake = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["q" /* take */])(patternOrChannel) }; - var yFork = function yFork(ac) { - return { done: false, value: __WEBPACK_IMPORTED_MODULE_1__io__["i" /* fork */].apply(undefined, [worker].concat(args, [ac])) }; - }; + next.value = undefined; + next.done = true; - var action = void 0, - setAction = function setAction(ac) { - return action = ac; - }; + return next; + }; - return Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["a" /* default */])({ - q1: function q1() { - return ['q2', yTake, setAction]; - }, - q2: function q2() { - return action === __WEBPACK_IMPORTED_MODULE_2__channel__["a" /* END */] ? [__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["b" /* qEnd */]] : ['q1', yFork(action)]; + return next.next = next; + } } - }, 'q1', 'takeEvery(' + Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["c" /* safeName */])(patternOrChannel) + ', ' + worker.name + ')'); -} - -/***/ }), -/* 80 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = asap; -/* unused harmony export suspend */ -/* unused harmony export flush */ -var queue = []; -/** - Variable to hold a counting semaphore - - Incrementing adds a lock and puts the scheduler in a `suspended` state (if it's not - already suspended) - - Decrementing releases a lock. Zero locks puts the scheduler in a `released` state. This - triggers flushing the queued tasks. -**/ -var semaphore = 0; -/** - Executes a task 'atomically'. Tasks scheduled during this execution will be queued - and flushed after this task has finished (assuming the scheduler endup in a released - state). -**/ -function exec(task) { - try { - suspend(); - task(); - } finally { - release(); + // Return an iterator with no values. + return { next: doneResult }; } -} - -/** - Executes or queues a task depending on the state of the scheduler (`suspended` or `released`) -**/ -function asap(task) { - queue.push(task); + runtime.values = values; - if (!semaphore) { - suspend(); - flush(); + function doneResult() { + return { value: undefined, done: true }; } -} - -/** - Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the - scheduler is released. -**/ -function suspend() { - semaphore++; -} -/** - Puts the scheduler in a `released` state. -**/ -function release() { - semaphore--; -} + Context.prototype = { + constructor: Context, -/** - Releases the current lock. Executes all queued tasks if the scheduler is in the released state. -**/ -function flush() { - release(); + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; - var task = void 0; - while (!semaphore && (task = queue.shift()) !== undefined) { - exec(task); - } -} + this.method = "next"; + this.arg = undefined; -/***/ }), -/* 81 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + this.tryEntries.forEach(resetTryEntry); -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = takeLatest; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(26); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(27); + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + return this.rval; + }, -function takeLatest(patternOrChannel, worker) { - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } + dispatchException: function(exception) { + if (this.done) { + throw exception; + } - var yTake = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["q" /* take */])(patternOrChannel) }; - var yFork = function yFork(ac) { - return { done: false, value: __WEBPACK_IMPORTED_MODULE_1__io__["i" /* fork */].apply(undefined, [worker].concat(args, [ac])) }; - }; - var yCancel = function yCancel(task) { - return { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["e" /* cancel */])(task) }; - }; + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; - var task = void 0, - action = void 0; - var setTask = function setTask(t) { - return task = t; - }; - var setAction = function setAction(ac) { - return action = ac; - }; + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } - return Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["a" /* default */])({ - q1: function q1() { - return ['q2', yTake, setAction]; - }, - q2: function q2() { - return action === __WEBPACK_IMPORTED_MODULE_2__channel__["a" /* END */] ? [__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["b" /* qEnd */]] : task ? ['q3', yCancel(task)] : ['q1', yFork(action), setTask]; - }, - q3: function q3() { - return ['q1', yFork(action), setTask]; - } - }, 'q1', 'takeLatest(' + Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["c" /* safeName */])(patternOrChannel) + ', ' + worker.name + ')'); -} + return !! caught; + } -/***/ }), -/* 82 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = throttle; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(26); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(27); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__buffers__ = __webpack_require__(48); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(8); + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, -function throttle(delayLength, pattern, worker) { - for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { - args[_key - 3] = arguments[_key]; - } + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } - var action = void 0, - channel = void 0; + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } - var yActionChannel = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["a" /* actionChannel */])(pattern, __WEBPACK_IMPORTED_MODULE_3__buffers__["a" /* buffers */].sliding(1)) }; - var yTake = function yTake() { - return { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["q" /* take */])(channel) }; - }; - var yFork = function yFork(ac) { - return { done: false, value: __WEBPACK_IMPORTED_MODULE_1__io__["i" /* fork */].apply(undefined, [worker].concat(args, [ac])) }; - }; - var yDelay = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["d" /* call */])(__WEBPACK_IMPORTED_MODULE_4__utils__["f" /* delay */], delayLength) }; + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; - var setAction = function setAction(ac) { - return action = ac; - }; - var setChannel = function setChannel(ch) { - return channel = ch; - }; + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } - return Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["a" /* default */])({ - q1: function q1() { - return ['q2', yActionChannel, setChannel]; - }, - q2: function q2() { - return ['q3', yTake(), setAction]; - }, - q3: function q3() { - return action === __WEBPACK_IMPORTED_MODULE_2__channel__["a" /* END */] ? [__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["b" /* qEnd */]] : ['q4', yFork(action)]; + return this.complete(record); }, - q4: function q4() { - return ['q2', yDelay]; - } - }, 'q1', 'throttle(' + Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["c" /* safeName */])(pattern) + ', ' + worker.name + ')'); -} - -/***/ }), -/* 83 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_83__; -/***/ }), -/* 84 */ -/***/ (function(module, exports, __webpack_require__) { + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } -__webpack_require__(85); -module.exports = __webpack_require__(2).Object.assign; + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + return ContinueSentinel; + }, -/***/ }), -/* 85 */ -/***/ (function(module, exports, __webpack_require__) { + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, -// 19.1.3.1 Object.assign(target, source) -var $export = __webpack_require__(12); + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(87) }); + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; -/***/ }), -/* 86 */ -/***/ (function(module, exports) { + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; + return ContinueSentinel; + } + }; +})( + // In sloppy mode, unbound `this` refers to the global object, fallback to + // Function constructor if we're in global strict mode. That is sadly a form + // of indirect eval which violates Content Security Policy. + (function() { return this })() || Function("return this")() +); /***/ }), -/* 87 */ -/***/ (function(module, exports, __webpack_require__) { +/* 112 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* unused harmony export takeEvery */ +/* unused harmony export takeLatest */ +/* unused harmony export throttle */ +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(113); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(115); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(13); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__takeEvery__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__takeLatest__["a"]; }); +/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_2__throttle__["a"]; }); -// 19.1.2.1 Object.assign(target, source, ...) -var getKeys = __webpack_require__(22); -var gOPS = __webpack_require__(37); -var pIE = __webpack_require__(24); -var toObject = __webpack_require__(38); -var IObject = __webpack_require__(54); -var $assign = Object.assign; -// should work with symbols and should have deterministic property order (V8 bug) -module.exports = !$assign || __webpack_require__(15)(function () { - var A = {}; - var B = {}; - // eslint-disable-next-line no-undef - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { B[k] = k; }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { // eslint-disable-line no-unused-vars - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } return T; -} : $assign; -/***/ }), -/* 88 */ -/***/ (function(module, exports, __webpack_require__) { -// false -> Array#indexOf -// true -> Array#includes -var toIObject = __webpack_require__(10); -var toLength = __webpack_require__(55); -var toAbsoluteIndex = __webpack_require__(89); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - // Array#includes uses SameValueZero equality algorithm - // eslint-disable-next-line no-self-compare - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - // eslint-disable-next-line no-self-compare - if (value != value) return true; - // Array#indexOf ignores holes, Array#includes - not - } else for (;length > index; index++) if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } return !IS_INCLUDES && -1; - }; -}; +var deprecationWarning = function deprecationWarning(helperName) { + return 'import { ' + helperName + ' } from \'redux-saga\' has been deprecated in favor of import { ' + helperName + ' } from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield ' + helperName + ' will return task descriptor to your saga and execute next lines of code.'; +}; -/***/ }), -/* 89 */ -/***/ (function(module, exports, __webpack_require__) { +var takeEvery = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_0__takeEvery__["a" /* default */], /*#__PURE__*/deprecationWarning('takeEvery')); +var takeLatest = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_1__takeLatest__["a" /* default */], /*#__PURE__*/deprecationWarning('takeLatest')); +var throttle = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* deprecate */])(__WEBPACK_IMPORTED_MODULE_2__throttle__["a" /* default */], /*#__PURE__*/deprecationWarning('throttle')); -var toInteger = __webpack_require__(33); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; /***/ }), -/* 90 */ -/***/ (function(module, exports, __webpack_require__) { +/* 113 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -module.exports = { "default": __webpack_require__(91), __esModule: true }; +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = takeEvery; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(26); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(43); -/***/ }), -/* 91 */ -/***/ (function(module, exports, __webpack_require__) { -__webpack_require__(56); -__webpack_require__(97); -module.exports = __webpack_require__(2).Array.from; -/***/ }), -/* 92 */ -/***/ (function(module, exports, __webpack_require__) { +function takeEvery(patternOrChannel, worker) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } -var toInteger = __webpack_require__(33); -var defined = __webpack_require__(32); -// true -> String#at -// false -> String#codePointAt -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff - ? TO_STRING ? s.charAt(i) : a - : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + var yTake = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["q" /* take */])(patternOrChannel) }; + var yFork = function yFork(ac) { + return { done: false, value: __WEBPACK_IMPORTED_MODULE_1__io__["i" /* fork */].apply(undefined, [worker].concat(args, [ac])) }; + }; + + var action = void 0, + setAction = function setAction(ac) { + return action = ac; }; -}; + return Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["a" /* default */])({ + q1: function q1() { + return ['q2', yTake, setAction]; + }, + q2: function q2() { + return action === __WEBPACK_IMPORTED_MODULE_2__channel__["a" /* END */] ? [__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["b" /* qEnd */]] : ['q1', yFork(action)]; + } + }, 'q1', 'takeEvery(' + Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["c" /* safeName */])(patternOrChannel) + ', ' + worker.name + ')'); +} /***/ }), -/* 93 */ -/***/ (function(module, exports, __webpack_require__) { +/* 114 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = asap; +/* unused harmony export suspend */ +/* unused harmony export flush */ +var queue = []; +/** + Variable to hold a counting semaphore + - Incrementing adds a lock and puts the scheduler in a `suspended` state (if it's not + already suspended) + - Decrementing releases a lock. Zero locks puts the scheduler in a `released` state. This + triggers flushing the queued tasks. +**/ +var semaphore = 0; -var create = __webpack_require__(59); -var descriptor = __webpack_require__(16); -var setToStringTag = __webpack_require__(40); -var IteratorPrototype = {}; - -// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() -__webpack_require__(9)(IteratorPrototype, __webpack_require__(0)('iterator'), function () { return this; }); +/** + Executes a task 'atomically'. Tasks scheduled during this execution will be queued + and flushed after this task has finished (assuming the scheduler endup in a released + state). +**/ +function exec(task) { + try { + suspend(); + task(); + } finally { + release(); + } +} -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; +/** + Executes or queues a task depending on the state of the scheduler (`suspended` or `released`) +**/ +function asap(task) { + queue.push(task); + if (!semaphore) { + suspend(); + flush(); + } +} -/***/ }), -/* 94 */ -/***/ (function(module, exports, __webpack_require__) { +/** + Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the + scheduler is released. +**/ +function suspend() { + semaphore++; +} -var dP = __webpack_require__(3); -var anObject = __webpack_require__(13); -var getKeys = __webpack_require__(22); +/** + Puts the scheduler in a `released` state. +**/ +function release() { + semaphore--; +} -module.exports = __webpack_require__(6) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) dP.f(O, P = keys[i++], Properties[P]); - return O; -}; +/** + Releases the current lock. Executes all queued tasks if the scheduler is in the released state. +**/ +function flush() { + release(); + var task = void 0; + while (!semaphore && (task = queue.shift()) !== undefined) { + exec(task); + } +} /***/ }), -/* 95 */ -/***/ (function(module, exports, __webpack_require__) { +/* 115 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -var document = __webpack_require__(1).document; -module.exports = document && document.documentElement; +"use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = takeLatest; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(26); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(43); -/***/ }), -/* 96 */ -/***/ (function(module, exports, __webpack_require__) { -// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) -var has = __webpack_require__(7); -var toObject = __webpack_require__(38); -var IE_PROTO = __webpack_require__(34)('IE_PROTO'); -var ObjectProto = Object.prototype; -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } return O instanceof Object ? ObjectProto : null; -}; +function takeLatest(patternOrChannel, worker) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } + + var yTake = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["q" /* take */])(patternOrChannel) }; + var yFork = function yFork(ac) { + return { done: false, value: __WEBPACK_IMPORTED_MODULE_1__io__["i" /* fork */].apply(undefined, [worker].concat(args, [ac])) }; + }; + var yCancel = function yCancel(task) { + return { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["e" /* cancel */])(task) }; + }; + + var task = void 0, + action = void 0; + var setTask = function setTask(t) { + return task = t; + }; + var setAction = function setAction(ac) { + return action = ac; + }; + return Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["a" /* default */])({ + q1: function q1() { + return ['q2', yTake, setAction]; + }, + q2: function q2() { + return action === __WEBPACK_IMPORTED_MODULE_2__channel__["a" /* END */] ? [__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["b" /* qEnd */]] : task ? ['q3', yCancel(task)] : ['q1', yFork(action), setTask]; + }, + q3: function q3() { + return ['q1', yFork(action), setTask]; + } + }, 'q1', 'takeLatest(' + Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["c" /* safeName */])(patternOrChannel) + ', ' + worker.name + ')'); +} /***/ }), -/* 97 */ -/***/ (function(module, exports, __webpack_require__) { +/* 116 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* harmony export (immutable) */ __webpack_exports__["a"] = throttle; +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(42); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(26); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(43); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__buffers__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(13); -var ctx = __webpack_require__(50); -var $export = __webpack_require__(12); -var toObject = __webpack_require__(38); -var call = __webpack_require__(98); -var isArrayIter = __webpack_require__(99); -var toLength = __webpack_require__(55); -var createProperty = __webpack_require__(100); -var getIterFn = __webpack_require__(101); -$export($export.S + $export.F * !__webpack_require__(103)(function (iter) { Array.from(iter); }), 'Array', { - // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) - from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { - var O = toObject(arrayLike); - var C = typeof this == 'function' ? this : Array; - var aLen = arguments.length; - var mapfn = aLen > 1 ? arguments[1] : undefined; - var mapping = mapfn !== undefined; - var index = 0; - var iterFn = getIterFn(O); - var length, result, step, iterator; - if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); - // if object isn't iterable or it's array with default iterator - use simple case - if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { - for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { - createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); - } - } else { - length = toLength(O.length); - for (result = new C(length); length > index; index++) { - createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); - } - } - result.length = index; - return result; - } -}); -/***/ }), -/* 98 */ -/***/ (function(module, exports, __webpack_require__) { -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(13); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; +function throttle(delayLength, pattern, worker) { + for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) { + args[_key - 3] = arguments[_key]; + } -/***/ }), -/* 99 */ -/***/ (function(module, exports, __webpack_require__) { + var action = void 0, + channel = void 0; -// check on default Array iterator -var Iterators = __webpack_require__(17); -var ITERATOR = __webpack_require__(0)('iterator'); -var ArrayProto = Array.prototype; + var yActionChannel = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["a" /* actionChannel */])(pattern, __WEBPACK_IMPORTED_MODULE_3__buffers__["a" /* buffers */].sliding(1)) }; + var yTake = function yTake() { + return { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["q" /* take */])(channel) }; + }; + var yFork = function yFork(ac) { + return { done: false, value: __WEBPACK_IMPORTED_MODULE_1__io__["i" /* fork */].apply(undefined, [worker].concat(args, [ac])) }; + }; + var yDelay = { done: false, value: Object(__WEBPACK_IMPORTED_MODULE_1__io__["d" /* call */])(__WEBPACK_IMPORTED_MODULE_4__utils__["f" /* delay */], delayLength) }; -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; + var setAction = function setAction(ac) { + return action = ac; + }; + var setChannel = function setChannel(ch) { + return channel = ch; + }; + return Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["a" /* default */])({ + q1: function q1() { + return ['q2', yActionChannel, setChannel]; + }, + q2: function q2() { + return ['q3', yTake(), setAction]; + }, + q3: function q3() { + return action === __WEBPACK_IMPORTED_MODULE_2__channel__["a" /* END */] ? [__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["b" /* qEnd */]] : ['q4', yFork(action)]; + }, + q4: function q4() { + return ['q2', yDelay]; + } + }, 'q1', 'throttle(' + Object(__WEBPACK_IMPORTED_MODULE_0__fsmIterator__["c" /* safeName */])(pattern) + ', ' + worker.name + ')'); +} /***/ }), -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var $defineProperty = __webpack_require__(3); -var createDesc = __webpack_require__(16); - -module.exports = function (object, index, value) { - if (index in object) $defineProperty.f(object, index, createDesc(0, value)); - else object[index] = value; -}; +/* 117 */ +/***/ (function(module, exports) { +module.exports = __WEBPACK_EXTERNAL_MODULE_117__; /***/ }), -/* 101 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { -var classof = __webpack_require__(102); -var ITERATOR = __webpack_require__(0)('iterator'); -var Iterators = __webpack_require__(17); -module.exports = __webpack_require__(2).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - +__webpack_require__(119); +module.exports = __webpack_require__(2).Object.assign; + /***/ }), -/* 102 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(31); -var TAG = __webpack_require__(0)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; - -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; +// 19.1.3.1 Object.assign(target, source) +var $export = __webpack_require__(4); -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(120) }); /***/ }), -/* 103 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { -var ITERATOR = __webpack_require__(0)('iterator'); -var SAFE_CLOSING = false; +"use strict"; -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = __webpack_require__(22); +var gOPS = __webpack_require__(46); +var pIE = __webpack_require__(29); +var toObject = __webpack_require__(40); +var IObject = __webpack_require__(58); +var $assign = Object.assign; -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || __webpack_require__(16)(function () { + var A = {}; + var B = {}; + // eslint-disable-next-line no-undef + var S = Symbol(); + var K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function (k) { B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars + var T = toObject(target); + var aLen = arguments.length; + var index = 1; + var getSymbols = gOPS.f; + var isEnum = pIE.f; + while (aLen > index) { + var S = IObject(arguments[index++]); + var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; + } return T; +} : $assign; /***/ }), -/* 104 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(105), __esModule: true }; +module.exports = { "default": __webpack_require__(122), __esModule: true }; /***/ }), -/* 105 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(56); -__webpack_require__(106); -module.exports = __webpack_require__(41).f('iterator'); +__webpack_require__(31); +__webpack_require__(123); +module.exports = __webpack_require__(2).Array.from; /***/ }), -/* 106 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(107); -var global = __webpack_require__(1); -var hide = __webpack_require__(9); -var Iterators = __webpack_require__(17); -var TO_STRING_TAG = __webpack_require__(0)('toStringTag'); +"use strict"; -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); +var ctx = __webpack_require__(15); +var $export = __webpack_require__(4); +var toObject = __webpack_require__(40); +var call = __webpack_require__(62); +var isArrayIter = __webpack_require__(63); +var toLength = __webpack_require__(36); +var createProperty = __webpack_require__(124); +var getIterFn = __webpack_require__(64); -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} +$export($export.S + $export.F * !__webpack_require__(69)(function (iter) { Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var C = typeof this == 'function' ? this : Array; + var aLen = arguments.length; + var mapfn = aLen > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var index = 0; + var iterFn = getIterFn(O); + var length, result, step, iterator; + if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { + for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for (result = new C(length); length > index; index++) { + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); /***/ }), -/* 107 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(108); -var step = __webpack_require__(109); -var Iterators = __webpack_require__(17); -var toIObject = __webpack_require__(10); - -// 22.1.3.4 Array.prototype.entries() -// 22.1.3.13 Array.prototype.keys() -// 22.1.3.29 Array.prototype.values() -// 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(57)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); // target - this._i = 0; // next index - this._k = kind; // kind -// 22.1.5.2.1 %ArrayIteratorPrototype%.next() -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); - -// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) -Iterators.Arguments = Iterators.Array; +var $defineProperty = __webpack_require__(3); +var createDesc = __webpack_require__(17); -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); +module.exports = function (object, index, value) { + if (index in object) $defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; /***/ }), -/* 108 */ -/***/ (function(module, exports) { - -module.exports = function () { /* empty */ }; +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { +module.exports = { "default": __webpack_require__(126), __esModule: true }; /***/ }), -/* 109 */ -/***/ (function(module, exports) { +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { -module.exports = function (done, value) { - return { value: value, done: !!done }; -}; +__webpack_require__(31); +__webpack_require__(60); +module.exports = __webpack_require__(47).f('iterator'); /***/ }), -/* 110 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(111), __esModule: true }; +module.exports = { "default": __webpack_require__(128), __esModule: true }; /***/ }), -/* 111 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(112); -__webpack_require__(118); -__webpack_require__(119); -__webpack_require__(120); +__webpack_require__(129); +__webpack_require__(52); +__webpack_require__(135); +__webpack_require__(136); module.exports = __webpack_require__(2).Symbol; /***/ }), -/* 112 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // ECMAScript 6 symbols shim -var global = __webpack_require__(1); -var has = __webpack_require__(7); +var global = __webpack_require__(0); +var has = __webpack_require__(9); var DESCRIPTORS = __webpack_require__(6); -var $export = __webpack_require__(12); -var redefine = __webpack_require__(58); -var META = __webpack_require__(113).KEY; -var $fails = __webpack_require__(15); -var shared = __webpack_require__(35); -var setToStringTag = __webpack_require__(40); +var $export = __webpack_require__(4); +var redefine = __webpack_require__(55); +var META = __webpack_require__(130).KEY; +var $fails = __webpack_require__(16); +var shared = __webpack_require__(38); +var setToStringTag = __webpack_require__(24); var uid = __webpack_require__(23); -var wks = __webpack_require__(0); -var wksExt = __webpack_require__(41); -var wksDefine = __webpack_require__(42); -var enumKeys = __webpack_require__(114); -var isArray = __webpack_require__(115); -var anObject = __webpack_require__(13); -var isObject = __webpack_require__(14); -var toIObject = __webpack_require__(10); -var toPrimitive = __webpack_require__(30); -var createDesc = __webpack_require__(16); -var _create = __webpack_require__(59); -var gOPNExt = __webpack_require__(116); -var $GOPD = __webpack_require__(117); +var wks = __webpack_require__(1); +var wksExt = __webpack_require__(47); +var wksDefine = __webpack_require__(48); +var enumKeys = __webpack_require__(131); +var isArray = __webpack_require__(132); +var anObject = __webpack_require__(5); +var isObject = __webpack_require__(8); +var toIObject = __webpack_require__(12); +var toPrimitive = __webpack_require__(35); +var createDesc = __webpack_require__(17); +var _create = __webpack_require__(56); +var gOPNExt = __webpack_require__(133); +var $GOPD = __webpack_require__(134); var $DP = __webpack_require__(3); var $keys = __webpack_require__(22); var gOPD = $GOPD.f; @@ -6120,11 +6816,11 @@ if (!USE_NATIVE) { $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; - __webpack_require__(61).f = gOPNExt.f = $getOwnPropertyNames; - __webpack_require__(24).f = $propertyIsEnumerable; - __webpack_require__(37).f = $getOwnPropertySymbols; + __webpack_require__(75).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(29).f = $propertyIsEnumerable; + __webpack_require__(46).f = $getOwnPropertySymbols; - if (DESCRIPTORS && !__webpack_require__(39)) { + if (DESCRIPTORS && !__webpack_require__(20)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } @@ -6198,7 +6894,7 @@ $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(9)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(7)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] @@ -6208,18 +6904,18 @@ setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 113 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(23)('meta'); -var isObject = __webpack_require__(14); -var has = __webpack_require__(7); +var isObject = __webpack_require__(8); +var has = __webpack_require__(9); var setDesc = __webpack_require__(3).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; -var FREEZE = !__webpack_require__(15)(function () { +var FREEZE = !__webpack_require__(16)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { @@ -6267,13 +6963,13 @@ var meta = module.exports = { /***/ }), -/* 114 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(22); -var gOPS = __webpack_require__(37); -var pIE = __webpack_require__(24); +var gOPS = __webpack_require__(46); +var pIE = __webpack_require__(29); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; @@ -6288,23 +6984,23 @@ module.exports = function (it) { /***/ }), -/* 115 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) -var cof = __webpack_require__(31); +var cof = __webpack_require__(19); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), -/* 116 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window -var toIObject = __webpack_require__(10); -var gOPN = __webpack_require__(61).f; +var toIObject = __webpack_require__(12); +var gOPN = __webpack_require__(75).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames @@ -6324,15 +7020,15 @@ module.exports.f = function getOwnPropertyNames(it) { /***/ }), -/* 117 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { -var pIE = __webpack_require__(24); -var createDesc = __webpack_require__(16); -var toIObject = __webpack_require__(10); -var toPrimitive = __webpack_require__(30); -var has = __webpack_require__(7); -var IE8_DOM_DEFINE = __webpack_require__(51); +var pIE = __webpack_require__(29); +var createDesc = __webpack_require__(17); +var toIObject = __webpack_require__(12); +var toPrimitive = __webpack_require__(35); +var has = __webpack_require__(9); +var IE8_DOM_DEFINE = __webpack_require__(54); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, P) { @@ -6346,27 +7042,21 @@ exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, /***/ }), -/* 118 */ -/***/ (function(module, exports) { - - - -/***/ }), -/* 119 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(42)('asyncIterator'); +__webpack_require__(48)('asyncIterator'); /***/ }), -/* 120 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(42)('observable'); +__webpack_require__(48)('observable'); /***/ }), -/* 121 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6376,23 +7066,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _stringify = __webpack_require__(122); +var _stringify = __webpack_require__(138); var _stringify2 = _interopRequireDefault(_stringify); -var _typeof2 = __webpack_require__(60); +var _typeof2 = __webpack_require__(74); var _typeof3 = _interopRequireDefault(_typeof2); -var _assign = __webpack_require__(21); +var _assign = __webpack_require__(28); var _assign2 = _interopRequireDefault(_assign); -var _classCallCheck2 = __webpack_require__(45); +var _classCallCheck2 = __webpack_require__(51); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(124); +var _createClass2 = __webpack_require__(140); var _createClass3 = _interopRequireDefault(_createClass2); @@ -6528,13 +7218,13 @@ var DrizzleContract = function () { exports.default = DrizzleContract; /***/ }), -/* 122 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(123), __esModule: true }; +module.exports = { "default": __webpack_require__(139), __esModule: true }; /***/ }), -/* 123 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(2); @@ -6545,7 +7235,7 @@ module.exports = function stringify(it) { // eslint-disable-line no-unused-vars /***/ }), -/* 124 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6553,7 +7243,7 @@ module.exports = function stringify(it) { // eslint-disable-line no-unused-vars exports.__esModule = true; -var _defineProperty = __webpack_require__(62); +var _defineProperty = __webpack_require__(76); var _defineProperty2 = _interopRequireDefault(_defineProperty); @@ -6578,10 +7268,10 @@ exports.default = function () { }(); /***/ }), -/* 125 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(126); +__webpack_require__(142); var $Object = __webpack_require__(2).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); @@ -6589,16 +7279,16 @@ module.exports = function defineProperty(it, key, desc) { /***/ }), -/* 126 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { -var $export = __webpack_require__(12); +var $export = __webpack_require__(4); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(3).f }); /***/ }), -/* 127 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6627,7 +7317,32 @@ var defaultOptions = { exports.default = defaultOptions; /***/ }), -/* 128 */ +/* 144 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +exports.default = function (defaultOptions, newOptions) { + return (0, _deepmerge2.default)(defaultOptions, newOptions, { + isMergeableObject: isPlainObject + }); +}; + +var _deepmerge = __webpack_require__(145); + +var _deepmerge2 = _interopRequireDefault(_deepmerge); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isPlainObject = __webpack_require__(146); + +/***/ }), +/* 145 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6724,13 +7439,76 @@ var deepmerge_1 = deepmerge; /***/ }), -/* 129 */ +/* 146 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +var isObject = __webpack_require__(147); + +function isObjectObject(o) { + return isObject(o) === true + && Object.prototype.toString.call(o) === '[object Object]'; +} + +module.exports = function isPlainObject(o) { + var ctor,prot; + + if (isObjectObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (typeof ctor !== 'function') return false; + + // If has modified prototype + prot = ctor.prototype; + if (isObjectObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +}; + + +/***/ }), +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * isobject + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + + + +module.exports = function isObject(val) { + return val != null && typeof val === 'object' && Array.isArray(val) === false; +}; + + +/***/ }), +/* 148 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_129__; +module.exports = __WEBPACK_EXTERNAL_MODULE_148__; /***/ }), -/* 130 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6740,33 +7518,33 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _redux = __webpack_require__(46); +var _redux = __webpack_require__(70); -var _accountsReducer = __webpack_require__(64); +var _accountsReducer = __webpack_require__(78); var _accountsReducer2 = _interopRequireDefault(_accountsReducer); -var _accountBalancesReducer = __webpack_require__(65); +var _accountBalancesReducer = __webpack_require__(79); var _accountBalancesReducer2 = _interopRequireDefault(_accountBalancesReducer); -var _contractsReducer = __webpack_require__(66); +var _contractsReducer = __webpack_require__(80); var _contractsReducer2 = _interopRequireDefault(_contractsReducer); -var _drizzleStatusReducer = __webpack_require__(67); +var _drizzleStatusReducer = __webpack_require__(81); var _drizzleStatusReducer2 = _interopRequireDefault(_drizzleStatusReducer); -var _transactionsReducer = __webpack_require__(68); +var _transactionsReducer = __webpack_require__(82); var _transactionsReducer2 = _interopRequireDefault(_transactionsReducer); -var _transactionStackReducer = __webpack_require__(69); +var _transactionStackReducer = __webpack_require__(83); var _transactionStackReducer2 = _interopRequireDefault(_transactionStackReducer); -var _web3Reducer = __webpack_require__(70); +var _web3Reducer = __webpack_require__(84); var _web3Reducer2 = _interopRequireDefault(_web3Reducer); @@ -6785,13 +7563,13 @@ var reducer = (0, _redux.combineReducers)({ exports.default = reducer; /***/ }), -/* 131 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _getAbi = __webpack_require__(71); +var _getAbi = __webpack_require__(85); var _getAbi2 = _interopRequireDefault(_getAbi); @@ -6828,4 +7606,4 @@ module.exports = generateContractsInitialState; /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCA4YzgwNzYzZDBlOWY5NDA2NjY0NiIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVs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SW5kZXg7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3VibGVkTGltaXQ7XG4gICAgICAgICAgICBsaW1pdCA9IGRvdWJsZWRMaW1pdDtcblxuICAgICAgICAgICAgcHVzaChpdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIC8vIERST1BcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgdGFrZTogdGFrZSxcbiAgICBmbHVzaDogZmx1c2hcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBidWZmZXJzID0ge1xuICBub25lOiBmdW5jdGlvbiBub25lKCkge1xuICAgIHJldHVybiB6ZXJvQnVmZmVyO1xuICB9LFxuICBmaXhlZDogZnVuY3Rpb24gZml4ZWQobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfVEhST1cpO1xuICB9LFxuICBkcm9wcGluZzogZnVuY3Rpb24gZHJvcHBpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfRFJPUCk7XG4gIH0sXG4gIHNsaWRpbmc6IGZ1bmN0aW9uIHNsaWRpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfU0xJREUpO1xuICB9LFxuICBleHBhbmRpbmc6IGZ1bmN0aW9uI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kaW5nJyxcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfQ09ORklSTUFJVE9OJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtcbiAgICAgICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0uY29uZmlybWF0aW9ucyxcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uLmNvbmZpcm1hdGlvblJlY2VpcHRcbiAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9TVUNDRVNTRlVMJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLFxuICAgICAgICAgICAgICAgIHN0YXR1czogJ3N1Y2Nlc3MnLFxuICAgICAgICAgICAgICAgIHJlY2VpcHQ6IGFjdGlvbi5yZWNlaXB0XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0VSUk9SJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2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9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi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iAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9IHJlY29yZC5hcmc7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciBpbmZvID0gcmVjb3JkLmFyZztcblxuICAgIGlmICghIGluZm8pIHtcbiAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgY29udGV4dC5hcmcgPSBuZXcgVHlwZUVycm9yKFwiaXRlcmF0b3IgcmVzdWx0IGlzIG5vdCBhbiBvYmplY3RcIik7XG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIGlmIChpbmZvLmRvbmUpIHtcbiAgICAgIC8vIEFzc2lnbiB0a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AgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0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WxTdGF0ZShvcHRpb25zKSB7XG4gIC8vIFByZWxvYWRlZCBzdGF0ZVxuICB2YXIgY29udHJhY3RzSW5pdGlhbFN0YXRlID0ge31cblxuICBmb3IgKHZhciBpID0gMDsgaSA8IG9wdGlvbnMuY29udHJhY3RzLmxlbmd0aDsgaSsrKSB7XG4gICAgLy8gSW5pdGlhbCBjb250cmFjdCBkZXRhaWxzXG4gICAgdmFyIGNvbnRyYWN0TmFtZSA9IG9wdGlvbnMuY29udHJhY3RzW2ldLmNvbnRyYWN0TmFtZVxuXG4gICAgY29udHJhY3RzSW5pdGlhbFN0YXRlW2NvbnRyYWN0TmFtZV0gPSB7XG4gICAgICBpbml0aWFsaXplZDogZmFsc2UsXG4gICAgICBzeW5jZWQ6IGZhbHNlXG4gICAgfVxuXG4gICAgLy8gQ29uc3RhbnQgZ2V0dGVyc1xuICAgIHZhciBhYmkgPSBnZXRBYmkob3B0aW9ucy5jb250cmFjdHNbaV0pXG4gICAgZm9yICh2YXIgaTIgPSAwOyBpMiA8IGFiaS5sZW5ndGg7IGkyKyspIHtcbiAgICAgIHZhciBpdGVtID0gYWJpW2kyXTtcblxuICAgICAgaWYgKGl0ZW0udHlwZSA9PSBcImZ1bmN0aW9uXCIgJiYgaXRlbS5jb25zdGFudCA9PT0gdHJ1ZSkge1xuICAgICAgICBjb250cmFjdHNJbml0aWFsU3RhdGVbY29udHJhY3ROYW1lXVtpdGVtLm5hbWVdID0ge31cbiAgICAgIH1cbiAgICB9XG4gIH1cblxuICByZXR1cm4gY29udHJhY3RzSW5pdGlhbFN0YXRlXG59XG5cbm1vZHVsZS5leHBvcnRzID0gZ2VuZXJhdGVDb250cmFjdHNJbml0aWFsU3RhdGVcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9nZW5lcmF0ZUNvbnRyYWN0c0luaXRpYWxTdGF0ZS5qcyJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file +//# sourceMappingURL=data:application/json;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haztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3VibGVkTGltaXQ7XG4gICAgICAgICAgICBsaW1pdCA9IGRvdWJsZWRMaW1pdDtcblxuICAgICAgICAgICAgcHVzaChpdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIC8vIERST1BcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgdGFrZTogdGFrZSxcbiAgICBmbHVzaDogZmx1c2hcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBidWZmZXJzID0ge1xuICBub25lOiBmdW5jdGlvbiBub25lKCkge1xuICAgIHJldHVybiB6ZXJvQnVmZmVyO1xuICB9LFxuICBmaXhlZDogZnVuY3Rpb24gZml4ZWQobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfVEhST1cpO1xuICB9LFxuICBkcm9wcGluZzogZnVuY3Rpb24gZHJvcHBpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfRFJPUCk7XG4gIH0sXG4gIHNsaWRpbmc6IGZ1bmN0aW9uIHNsaWRpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfU0xJREUpO1xuICB9LFxuICBleHBhbmRpbmc6IGZ1bmN0aW9uIGV4cGFuZGluZyhpbml0aWFsU2l6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ZGVmYXVsdCBkcml6emxlU3RhdHVzUmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2RyaXp6bGVTdGF0dXMvZHJpenpsZVN0YXR1c1JlZHVjZXIuanMiLCJjb25zdCBpbml0aWFsU3RhdGUgPSB7fVxuICBcbmNvbnN0IHRyYW5zYWN0aW9uc1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0JST0FEQ0FTVEVEJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ3BlbmRpbmcnLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9DT05GSVJNQUlUT04nKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxuICAgIHtcbiAgICAgICAgcmV0dX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ZCA9IG1ldGhvZDtcbiAgICAgIGNvbnRleHQuYXJnID0gYXJnO1xuXG4gICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICB2YXIgZGVsZWdhdGUgPSBjb250ZXh0LmRlbGVnYXRlO1xuICAgICAgICBpZiAoZGVsZWdhdGUpIHtcbiAgICAgICAgICB2YXIgZGVsZWdhdGVSZXN1bHQgPSBtYXliZUludm9rZURlbGVnYXRlKGRlbGVnYXRlLCBjb250ZXh0KTtcbiAgICAgICAgICBpZiAoZGVsZWdhdGVSZXN1bHQpIHtcbiAgICAgICAgICAgIGlmIChkZWxlZ2F0ZVJlc3VsdCA9PT0gQ29udGludWVTZW50aW5lbCkgY29udGludWU7XG4gICAgICAgICAgICByZXR1cm4gZGVsZWdhdGVSZXN1bHQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcIm5leHRcIikge1xuICAgICAgICAgIC8vIFNldHRpbmcgY29udGV4dC5fc2VudCBmb3IgbGVnYWN5IHN1cHBvcnQgb2YgQmFiZWwnc1xuICAgICAgICAgIC8vIGZ1bmN0aW9uLnNlbnQgaW1wbGVtZW50YXRpb24uXG4gICAgICAgICAgY29udGV4dC5zZW50ID0gY29udGV4dC5fc2VudCA9IGNvbnRleHQuYXJnO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09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ICAgICAgLy8gSWYgdGhlIGRlbGVnYXRlIGl0ZXJhdG9yIGhhcyBhIHJldHVybiBtZXRob2QsIGdpdmUgaXQgYVxuICAgICAgICAgIC8vIGNoYW5jZSB0byBjbGVhbiB1cC5cbiAgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbWF5YmVJbnZva2VEZWxlZ2F0ZShkZWxlZ2F0ZSwgY29udGV4dCk7XG5cbiAgICAgICAgICBpZiAoY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgLy8gSWYgbWF5YmVJbnZva2VEZWxlZ2F0ZShjb250ZXh0KSBjaGFuZ2VkIGNvbnRleHQubWV0aG9kIGZyb21cbiAgICAgICAgICAgIC8vIFwicmV0dXJuXCIgdG8gXCJ0aHJvd1wiLCBsZXQgdGhhdCBvdmVycmlkZSB0aGUgVHlwZUVycm9yIGJlbG93LlxuICAgICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgIGNvbnRleHQuYXJnID0gbmV3IFR5cGVFcnJvcihcbiAgICAgICAgICBcIlRoZSBpdGVyYXRvciBkb2VzIG5vdCBwcm92aWRlIGEgJ3Rocm93JyBtZXRob2RcIik7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgIH1cblxuICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChtZXRob2QsIGRlbGVnYXRlLml0ZXJhdG9yLCBjb250ZXh0LmFyZyk7XG5cbiAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICBjb250ZXh0LmFyZyA9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nVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgcnVudGltZS52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250ZXh0LnByb3RvdHlwZSA9IHtcbiAgICBjb25zdHJ1Y3RvcjogQ29udGV4dCxcblxuICAgIHJlc2V0OiBmdW5jdGlvbihza2lwVGVtcFJlc2V0KSB7XG4gICAgICB0aGlzLnByZXYgPSAwO1xuICAgICAgdGhpcy5uZXh0ID0gMDtcbiAgICAgIC8vIFJlc2V0dGluZyBjb250ZXh0Ll9zZW50IGZvciBsZWdhY3kgc3VwcG9ydCBvZiBCYWJlbCdzXG4gICAgICAvLyBmdW5jdGlvbi5zZW50IGltcGxlbWVudGF0aW9uLlxuICAgICAgdGhpcy5zZW50ID0gd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W9uIHRvXG4gICAgICAgICAgLy8gdGhyb3cgdGhlIGV4Y2VwdGlvbi5cbiAgICAgICAgICByZXR1cm4gaGFuZGxlKFwiZW5kXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYpIHtcbiAgICAgICAgICB2YXIgaGFzQ2F0Y2ggPSBoYXNPd24uY2FsbChlbnRyeSwgXCJjYXRjaExvY1wiKTtcbiAgICAgICAgICB2YXIgaGFzRmluYWxseSA9IGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIik7XG5cbiAgICAgICAgICBpZiAoaGFzQ2F0Y2ggJiYgaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9IHJlY29yZC5hcmc7XG4gICAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRocm93bjtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBUaGUgY29udGV4dC5jYXRjaCBtZXRob2QgbXVzdCBvbmx5IGJlIGNhbGxlZCB3aXRoIGEgbG9jYXRpb25cbiAgICAgIC8vIGFyZ3VtZW50IHRoYXQgY29ycmVzcG9uZHMgdG8gYSBrbm93biBjYXRjaCBibG9jay5cbiAgICAgIHRocm93IG5ldyBFcn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V0dXJuIGNvbnRyYWN0c0luaXRpYWxTdGF0ZVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGdlbmVyYXRlQ29udHJhY3RzSW5pdGlhbFN0YXRlXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvZ2VuZXJhdGVDb250cmFjdHNJbml0aWFsU3RhdGUuanMiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/dist/package.json b/dist/package.json deleted file mode 100644 index 01c3a34a..00000000 --- a/dist/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "author": { - "name": "Josh Quintal", - "email": "josh@trufflesuite.com", - "url": "http://truffleframework.com/drizzle" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A reactive data store for web3 and smart contracts.", - "keywords": [ - "ethereum", - "redux", - "redux-saga" - ], - "license": "ISC", - "main": "drizzle.js", - "name": "drizzle", - "repository": { - "type": "git", - "url": "https://github.com/trufflesuite/drizzle" - }, - "version": "1.1.5" -} From e31088b090b77d1d3b54125171e71d670635caee Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Wed, 16 May 2018 09:23:07 -0700 Subject: [PATCH 09/13] Added ability to dynamically add contracts --- dist/drizzle.js | 4000 ++++++++++++------------ src/Drizzle.js | 17 + src/DrizzleContract.js | 1 + src/blocks/blocksSaga.js | 37 +- src/contracts/contractsReducer.js | 9 + src/contracts/contractsSaga.js | 10 + src/drizzleStatus/drizzleStatusSaga.js | 27 +- src/generateContractInitialState.js | 20 + src/generateContractsInitialState.js | 18 +- src/generateStore.js | 25 +- src/getAddress.js | 5 + 11 files changed, 2116 insertions(+), 2053 deletions(-) create mode 100644 src/generateContractInitialState.js create mode 100644 src/getAddress.js diff --git a/dist/drizzle.js b/dist/drizzle.js index a123ffe0..1f153f2a 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -7,7 +7,7 @@ exports["drizzle"] = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("web3")); else root["drizzle"] = factory(root["redux-saga"], root["redux"], root["eth-block-tracker-es5"], root["web3"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_25__, __WEBPACK_EXTERNAL_MODULE_70__, __WEBPACK_EXTERNAL_MODULE_117__, __WEBPACK_EXTERNAL_MODULE_148__) { +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_25__, __WEBPACK_EXTERNAL_MODULE_71__, __WEBPACK_EXTERNAL_MODULE_122__, __WEBPACK_EXTERNAL_MODULE_150__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 86); +/******/ return __webpack_require__(__webpack_require__.s = 89); /******/ }) /************************************************************************/ /******/ ([ @@ -115,8 +115,8 @@ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(5); -var IE8_DOM_DEFINE = __webpack_require__(54); -var toPrimitive = __webpack_require__(35); +var IE8_DOM_DEFINE = __webpack_require__(53); +var toPrimitive = __webpack_require__(32); var dP = Object.defineProperty; exports.f = __webpack_require__(6) ? Object.defineProperty : function defineProperty(O, P, Attributes) { @@ -257,7 +257,7 @@ module.exports = function (it, key) { /* 10 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(110); +module.exports = __webpack_require__(115); /***/ }), @@ -295,8 +295,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings -var IObject = __webpack_require__(58); -var defined = __webpack_require__(33); +var IObject = __webpack_require__(59); +var defined = __webpack_require__(35); module.exports = function (it) { return IObject(defined(it)); }; @@ -621,7 +621,7 @@ var cloneableGenerator = function cloneableGenerator(generatorFunc) { }; }; }; -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(71))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(72))) /***/ }), /* 14 */ @@ -657,7 +657,7 @@ exports.default = _assign2.default || function (target) { /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding -var aFunction = __webpack_require__(21); +var aFunction = __webpack_require__(20); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; @@ -727,17 +727,17 @@ module.exports = function (it) { /* 20 */ /***/ (function(module, exports) { -module.exports = true; +module.exports = function (it) { + if (typeof it != 'function') throw TypeError(it + ' is not a function!'); + return it; +}; /***/ }), /* 21 */ /***/ (function(module, exports) { -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; +module.exports = true; /***/ }), @@ -745,7 +745,7 @@ module.exports = function (it) { /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) -var $keys = __webpack_require__(57); +var $keys = __webpack_require__(58); var enumBugKeys = __webpack_require__(39); module.exports = Object.keys || function keys(O) { @@ -811,7 +811,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE_25__; /* harmony export (immutable) */ __webpack_exports__["u"] = throttle; /* unused harmony export asEffect */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(112); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__sagaHelpers__ = __webpack_require__(117); @@ -1197,7 +1197,7 @@ exports.default = accountBalancesSaga; /* 28 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(118), __esModule: true }; +module.exports = { "default": __webpack_require__(123), __esModule: true }; /***/ }), /* 29 */ @@ -1215,7 +1215,7 @@ exports.f = {}.propertyIsEnumerable; exports.__esModule = true; -var _from = __webpack_require__(121); +var _from = __webpack_require__(126); var _from2 = _interopRequireDefault(_from); @@ -1237,12 +1237,43 @@ exports.default = function (arr) { /* 31 */ /***/ (function(module, exports, __webpack_require__) { +var isObject = __webpack_require__(8); +var document = __webpack_require__(0).document; +// typeof document.createElement is 'object' in old IE +var is = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return is ? document.createElement(it) : {}; +}; + + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = __webpack_require__(8); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function (it, S) { + if (!isObject(it)) return it; + var fn, val; + if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; + if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; -var $at = __webpack_require__(90)(true); +var $at = __webpack_require__(95)(true); // 21.1.3.27 String.prototype[@@iterator]() -__webpack_require__(53)(String, 'String', function (iterated) { +__webpack_require__(55)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() @@ -1258,7 +1289,7 @@ __webpack_require__(53)(String, 'String', function (iterated) { /***/ }), -/* 32 */ +/* 34 */ /***/ (function(module, exports) { // 7.1.4 ToInteger @@ -1270,7 +1301,7 @@ module.exports = function (it) { /***/ }), -/* 33 */ +/* 35 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) @@ -1280,43 +1311,12 @@ module.exports = function (it) { }; -/***/ }), -/* 34 */ -/***/ (function(module, exports, __webpack_require__) { - -var isObject = __webpack_require__(8); -var document = __webpack_require__(0).document; -// typeof document.createElement is 'object' in old IE -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.1.1 ToPrimitive(input [, PreferredType]) -var isObject = __webpack_require__(8); -// instead of the ES6 spec version, we didn't implement @@toPrimitive case -// and the second argument - flag - preferred type is a string -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - - /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength -var toInteger = __webpack_require__(32); +var toInteger = __webpack_require__(34); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 @@ -1361,7 +1361,7 @@ module.exports = ( /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) -var defined = __webpack_require__(33); +var defined = __webpack_require__(35); module.exports = function (it) { return Object(defined(it)); }; @@ -1374,7 +1374,7 @@ module.exports = function (it) { "use strict"; // 25.4.1.5 NewPromiseCapability(C) -var aFunction = __webpack_require__(21); +var aFunction = __webpack_require__(20); function PromiseCapability(C) { var resolve, reject; @@ -1465,8 +1465,8 @@ function fsmIterator(fsm, q0) { /* unused harmony export eventChannel */ /* unused harmony export stdChannel */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffers__ = __webpack_require__(72); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(114); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__buffers__ = __webpack_require__(73); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__scheduler__ = __webpack_require__(119); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; @@ -1667,7 +1667,7 @@ function stdChannel(subscribe) { } }); } -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(71))) +/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(72))) /***/ }), /* 44 */ @@ -1868,73 +1868,133 @@ exports.default = accountsSaga; /***/ }), /* 45 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { -"use strict"; +exports.f = Object.getOwnPropertySymbols; -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { -var _assign = __webpack_require__(28); +exports.f = __webpack_require__(1); -var _assign2 = _interopRequireDefault(_assign); -var _extends2 = __webpack_require__(14); +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { -var _extends3 = _interopRequireDefault(_extends2); +var global = __webpack_require__(0); +var core = __webpack_require__(2); +var LIBRARY = __webpack_require__(21); +var wksExt = __webpack_require__(46); +var defineProperty = __webpack_require__(3).f; +module.exports = function (name) { + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +}; -var _toConsumableArray2 = __webpack_require__(30); -var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { -var _typeof2 = __webpack_require__(74); +"use strict"; -var _typeof3 = _interopRequireDefault(_typeof2); + +Object.defineProperty(exports, "__esModule", { + value: true +}); var _regenerator = __webpack_require__(10); var _regenerator2 = _interopRequireDefault(_regenerator); -exports.instantiateWeb3Contract = instantiateWeb3Contract; -exports.instantiateContract = instantiateContract; - -var _reduxSaga = __webpack_require__(25); +exports.initializeWeb3 = initializeWeb3; +exports.getNetworkId = getNetworkId; var _effects = __webpack_require__(11); -var _DrizzleContract = __webpack_require__(137); - -var _DrizzleContract2 = _interopRequireDefault(_DrizzleContract); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _marked = /*#__PURE__*/_regenerator2.default.mark(instantiateWeb3Contract), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(instantiateContract), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(callListenForContractEvent), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendContractTx), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(callCallContractFn), - _marked6 = /*#__PURE__*/_regenerator2.default.mark(callSyncContract), - _marked7 = /*#__PURE__*/_regenerator2.default.mark(contractsSaga); +var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), + _marked2 = /*#__PURE__*/_regenerator2.default.mark(callInitializeWeb3), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(getNetworkId), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), + _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); + +var Web3 = __webpack_require__(150); /* - * Instantiation + * Initialization */ -function instantiateWeb3Contract(_ref) { - var web3Contract = _ref.web3Contract, - name = _ref.name, - events = _ref.events, - store = _ref.store, - web3 = _ref.web3; - return _regenerator2.default.wrap(function instantiateWeb3Contract$(_context) { +function initializeWeb3(_ref) { + var options = _ref.options; + var web3, provider; + return _regenerator2.default.wrap(function initializeWeb3$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: - return _context.abrupt('return', new _DrizzleContract2.default(web3Contract, web3, name, store, events)); + web3 = {}; - case 1: + // Checking if Web3 has been injected by the browser (Mist/MetaMask) + + if (!(typeof window.web3 !== 'undefined')) { + _context.next = 10; + break; + } + + // Use Mist/MetaMask's provider. + web3 = new Web3(window.web3.currentProvider); + web3.eth.cacheSendTransaction = function (txObject) { + return (0, _effects.put)({ type: 'SEND_WEB3_TX', txObject: txObject, stackId: stackId, web3: web3 }); + }; + + console.log('Injected web3 detected.'); + + _context.next = 7; + return (0, _effects.put)({ type: 'WEB3_INITIALIZED' }); + + case 7: + return _context.abrupt('return', web3); + + case 10: + if (!options.fallback) { + _context.next = 23; + break; + } + + // Attempt fallback if no web3 injection. + console.log('No web3 instance injected, using fallback.'); + + _context.t0 = options.fallback.type; + _context.next = _context.t0 === 'ws' ? 15 : 22; + break; + + case 15: + provider = new Web3.providers.WebsocketProvider(options.fallback.url); + + web3 = new Web3(provider); + + // Attach drizzle functions + web3.eth['cacheSendTransaction'] = function (txObject) { + return (0, _effects.put)({ type: 'SEND_WEB3_TX', txObject: txObject, stackId: stackId, web3: web3 }); + }; + + _context.next = 20; + return (0, _effects.put)({ type: 'WEB3_INITIALIZED' }); + + case 20: + return _context.abrupt('return', web3); + + case 22: + throw "Invalid web3 fallback provided."; + + case 23: + throw "Cannot find injected web3 or valid fallback."; + + case 24: case 'end': return _context.stop(); } @@ -1942,133 +2002,104 @@ function instantiateWeb3Contract(_ref) { }, _marked, this); } -function instantiateContract(_ref2) { - var contractArtifact = _ref2.contractArtifact, - events = _ref2.events, - store = _ref2.store, - web3 = _ref2.web3; - var networkId, web3Contract; - return _regenerator2.default.wrap(function instantiateContract$(_context2) { +function callInitializeWeb3(action) { + var web3; + return _regenerator2.default.wrap(function callInitializeWeb3$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: - _context2.next = 2; - return (0, _effects.select)(getNetworkId); + _context2.prev = 0; + _context2.next = 3; + return (0, _effects.call)(initializeWeb3, { options: action.options }); - case 2: - networkId = _context2.sent; + case 3: + web3 = _context2.sent; + return _context2.abrupt('return', web3); + case 7: + _context2.prev = 7; + _context2.t0 = _context2['catch'](0); - // Instantiate the contract. - web3Contract = new web3.eth.Contract(contractArtifact.abi, contractArtifact.networks[networkId].address, { - from: store.getState().accounts[0], - data: contractArtifact.deployedBytecode - }); - return _context2.abrupt('return', new _DrizzleContract2.default(web3Contract, web3, contractArtifact.contractName, store, events)); + store.dispatch({ type: 'WEB3_FAILED', error: _context2.t0 }); + console.error('Error intializing web3:'); + console.error(_context2.t0); - case 5: + case 12: case 'end': return _context2.stop(); } } - }, _marked2, this); + }, _marked2, this, [[0, 7]]); } /* - * Events + * Network ID */ -function createContractEventChannel(_ref3) { - var contract = _ref3.contract, - eventName = _ref3.eventName; - - var name = contract.contractName; - - return (0, _reduxSaga.eventChannel)(function (emit) { - var eventListener = contract.events[eventName]().on('data', function (event) { - emit({ type: 'EVENT_FIRED', name: name, event: event }); - }).on('changed', function (event) { - emit({ type: 'EVENT_CHANGED', name: name, event: event }); - }).on('error', function (error) { - emit({ type: 'EVENT_ERROR', name: name, error: error }); - emit(_reduxSaga.END); - }); - - var unsubscribe = function unsubscribe() { - eventListener.removeListener(eventName); - }; - - return unsubscribe; - }); -} - -function callListenForContractEvent(_ref4) { - var contract = _ref4.contract, - eventName = _ref4.eventName; - var contractEventChannel, event; - return _regenerator2.default.wrap(function callListenForContractEvent$(_context3) { +function getNetworkId(_ref2) { + var web3 = _ref2.web3; + var networkId; + return _regenerator2.default.wrap(function getNetworkId$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: - _context3.next = 2; - return (0, _effects.call)(createContractEventChannel, { contract: contract, eventName: eventName }); - - case 2: - contractEventChannel = _context3.sent; + _context3.prev = 0; + _context3.next = 3; + return (0, _effects.call)(web3.eth.net.getId); case 3: - if (false) { - _context3.next = 11; - break; - } - + networkId = _context3.sent; _context3.next = 6; - return (0, _effects.take)(contractEventChannel); + return (0, _effects.put)({ type: 'NETWORK_ID_FETCHED', networkId: networkId }); case 6: - event = _context3.sent; - _context3.next = 9; - return (0, _effects.put)(event); + return _context3.abrupt('return', networkId); case 9: - _context3.next = 3; - break; + _context3.prev = 9; + _context3.t0 = _context3['catch'](0); + _context3.next = 13; + return (0, _effects.put)({ type: 'NETWORK_ID_FAILED', error: _context3.t0 }); - case 11: + case 13: + + console.error('Error fetching network ID:'); + console.error(_context3.t0); + + return _context3.abrupt('return'); + + case 16: case 'end': return _context3.stop(); } } - }, _marked3, this); + }, _marked3, this, [[0, 9]]); } /* - * Send and Cache + * Send Transaction */ -function createTxChannel(_ref5) { - var txObject = _ref5.txObject, - stackId = _ref5.stackId, - _ref5$sendArgs = _ref5.sendArgs, - sendArgs = _ref5$sendArgs === undefined ? {} : _ref5$sendArgs, - contractName = _ref5.contractName; +function createTxChannel(_ref3) { + var txObject = _ref3.txObject, + stackId = _ref3.stackId, + web3 = _ref3.web3; var persistTxHash; - return (0, _reduxSaga.eventChannel)(function (emit) { - var txPromiEvent = txObject.send(sendArgs).on('transactionHash', function (txHash) { + return eventChannel(function (emit) { + var txPromiEvent = web3.eth.sendTransaction(txObject).on('transactionHash', function (txHash) { persistTxHash = txHash; - emit({ type: 'TX_BROADCASTED', txHash: txHash, stackId: stackId }); - emit({ type: 'CONTRACT_SYNC_IND', contractName: contractName }); + emit({ type: 'W3TX_BROADCASTED', txHash: txHash, stackId: stackId }); }).on('confirmation', function (confirmationNumber, receipt) { - emit({ type: 'TX_CONFIRMAITON', confirmationReceipt: receipt, txHash: persistTxHash }); + emit({ type: 'W3TX_CONFIRMAITON', confirmationReceipt: receipt, txHash: persistTxHash }); }).on('receipt', function (receipt) { - emit({ type: 'TX_SUCCESSFUL', receipt: receipt, txHash: persistTxHash }); - emit(_reduxSaga.END); + emit({ type: 'W3TX_SUCCESSFUL', receipt: receipt, txHash: persistTxHash }); + emit(END); }).on('error', function (error) { - emit({ type: 'TX_ERROR', error: error, txHash: persistTxHash }); - emit(_reduxSaga.END); + emit({ type: 'W3TX_ERROR', error: error, txHash: persistTxHash }); + emit(END); }); var unsubscribe = function unsubscribe() { @@ -2079,1431 +2110,1268 @@ function createTxChannel(_ref5) { }); } -function callSendContractTx(_ref6) { - var contract = _ref6.contract, - fnName = _ref6.fnName, - fnIndex = _ref6.fnIndex, - args = _ref6.args, - stackId = _ref6.stackId; - var finalArg, sendArgs, finalArgTest, contractName, txObject, txChannel, event; - return _regenerator2.default.wrap(function callSendContractTx$(_context4) { +function callSendTx(_ref4) { + var txObject = _ref4.txObject, + stackId = _ref4.stackId, + web3 = _ref4.web3; + var txChannel, event; + return _regenerator2.default.wrap(function callSendTx$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: - // Check for type of object and properties indicative of call/send options. - if (args.length) { - finalArg = args.length > 1 ? args[args.length - 1] : args[0]; - sendArgs = {}; - finalArgTest = false; - - - if ((typeof finalArg === 'undefined' ? 'undefined' : (0, _typeof3.default)(finalArg)) === 'object') { - finalArgTest = (0, _effects.call)(isSendOrCallOptions, finalArg); - } - - if (finalArgTest) { - sendArgs = finalArg; - - args.length > 1 ? delete args[args.length - 1] : delete args[0]; - args.length = args.length - 1; - } - } - - // Get name to mark as desynchronized on tx creation - contractName = contract.contractName; - - // Create the transaction object and execute the tx. - - _context4.next = 4; - return _effects.call.apply(undefined, [contract.methods[fnName]].concat((0, _toConsumableArray3.default)(args))); - - case 4: - txObject = _context4.sent; - _context4.next = 7; - return (0, _effects.call)(createTxChannel, { txObject: txObject, stackId: stackId, sendArgs: sendArgs, contractName: contractName }); + _context4.next = 2; + return (0, _effects.call)(createTxChannel, { txObject: txObject, stackId: stackId, web3: web3 }); - case 7: + case 2: txChannel = _context4.sent; - _context4.prev = 8; + _context4.prev = 3; - case 9: + case 4: if (false) { - _context4.next = 17; + _context4.next = 12; break; } - _context4.next = 12; - return (0, _effects.take)(txChannel); + _context4.next = 7; + return take(txChannel); - case 12: + case 7: event = _context4.sent; - _context4.next = 15; + _context4.next = 10; return (0, _effects.put)(event); - case 15: - _context4.next = 9; + case 10: + _context4.next = 4; break; - case 17: - _context4.prev = 17; + case 12: + _context4.prev = 12; txChannel.close(); - return _context4.finish(17); + return _context4.finish(12); - case 20: + case 15: case 'end': return _context4.stop(); } } - }, _marked4, this, [[8,, 17, 20]]); + }, _marked4, this, [[3,, 12, 15]]); } -/* - * Call and Cache - */ - -function callCallContractFn(_ref7) { - var contract = _ref7.contract, - fnName = _ref7.fnName, - fnIndex = _ref7.fnIndex, - args = _ref7.args, - argsHash = _ref7.argsHash, - _ref7$sync = _ref7.sync, - sync = _ref7$sync === undefined ? false : _ref7$sync; - var finalArg, callArgs, finalArgTest, txObject, callResult, dispatchArgs, errorArgs; - return _regenerator2.default.wrap(function callCallContractFn$(_context5) { +function web3Saga() { + return _regenerator2.default.wrap(function web3Saga$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: - if (!sync) { - _context5.next = 2; - break; - } - - return _context5.abrupt('return'); + _context5.next = 2; + return (0, _effects.takeLatest)('WEB3_INITIALIZING', callInitializeWeb3); case 2: + _context5.next = 4; + return (0, _effects.takeLatest)('NETWORK_ID_FETCHING', getNetworkId); - // Check for type of object and properties indicative of call/send options. - if (args.length) { - finalArg = args.length > 1 ? args[args.length - 1] : args[0]; - callArgs = {}; - finalArgTest = false; + case 4: + _context5.next = 6; + return (0, _effects.takeEvery)('SEND_WEB3_TX', callSendTx); + case 6: + case 'end': + return _context5.stop(); + } + } + }, _marked5, this); +} - if ((typeof finalArg === 'undefined' ? 'undefined' : (0, _typeof3.default)(finalArg)) === 'object') { - finalArgTest = (0, _effects.call)(isSendOrCallOptions, finalArg); - } +exports.default = web3Saga; - if (finalArgTest) { - callArgs = finalArg; +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { - args.length > 1 ? delete args[args.length - 1] : delete args[0]; - args.length = args.length - 1; - } - } +"use strict"; - // Create the transaction object and execute the call. - _context5.next = 5; - return _effects.call.apply(undefined, [contract.methods[fnName]].concat((0, _toConsumableArray3.default)(args))); - case 5: - txObject = _context5.sent; - _context5.prev = 6; - _context5.next = 9; - return (0, _effects.call)(txObject.call, callArgs); +exports.__esModule = true; - case 9: - callResult = _context5.sent; - dispatchArgs = { - name: contract.contractName, - variable: contract.abi[fnIndex].name, - argsHash: argsHash, - args: args, - value: callResult, - fnIndex: fnIndex - }; - _context5.next = 13; - return (0, _effects.put)((0, _extends3.default)({ type: 'GOT_CONTRACT_VAR' }, dispatchArgs)); +var _defineProperty = __webpack_require__(52); - case 13: - _context5.next = 21; - break; +var _defineProperty2 = _interopRequireDefault(_defineProperty); - case 15: - _context5.prev = 15; - _context5.t0 = _context5['catch'](6); +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - console.error(_context5.t0); +exports.default = function (obj, key, value) { + if (key in obj) { + (0, _defineProperty2.default)(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } - errorArgs = { - name: contract.contractName, - variable: contract.abi[fnIndex].name, - argsHash: argsHash, - args: args, - error: _context5.t0, - fnIndex: fnIndex - }; - _context5.next = 21; - return (0, _effects.put)((0, _extends3.default)({ type: 'ERROR_CONTRACT_VAR' }, errorArgs)); + return obj; +}; - case 21: - case 'end': - return _context5.stop(); - } - } - }, _marked5, this, [[6, 15]]); -} +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { -/* - * Sync Contract - */ +"use strict"; -function callSyncContract(action) { - var contract, contractName, contractsState, contractFnsState, fnName, argsHash, fnIndex, args; - return _regenerator2.default.wrap(function callSyncContract$(_context6) { - while (1) { - switch (_context6.prev = _context6.next) { - case 0: - // Get contract state from store - contract = action.contract; - contractName = contract.contractName; - _context6.next = 4; - return (0, _effects.select)(getContractsState); - case 4: - contractsState = _context6.sent; - contractFnsState = (0, _assign2.default)({}, contractsState[contractName]); +exports.__esModule = true; - // Remove unnecessary keys +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; - delete contractFnsState.initialized; - delete contractFnsState.synced; - delete contractFnsState.events; +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { - // Iterate over functions and hashes - _context6.t0 = _regenerator2.default.keys(contractFnsState); +"use strict"; - case 10: - if ((_context6.t1 = _context6.t0()).done) { - _context6.next = 25; - break; - } - fnName = _context6.t1.value; - _context6.t2 = _regenerator2.default.keys(contractFnsState[fnName]); +exports.__esModule = true; - case 13: - if ((_context6.t3 = _context6.t2()).done) { - _context6.next = 23; - break; - } +var _defineProperty = __webpack_require__(52); - argsHash = _context6.t3.value; - fnIndex = contractFnsState[fnName][argsHash].fnIndex; - args = contractFnsState[fnName][argsHash].args; +var _defineProperty2 = _interopRequireDefault(_defineProperty); - // Pull args and call fn for each given function - // keeping for pre-v1.1.5 compatibility with CALL_CONTRACT_FN event. +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - _context6.next = 19; - return (0, _effects.put)({ type: 'CALL_CONTRACT_FN', contract: contract, fnName: fnName, fnIndex: fnIndex, args: args, argsHash: argsHash, sync: true }); +exports.default = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + (0, _defineProperty2.default)(target, descriptor.key, descriptor); + } + } - case 19: - _context6.next = 21; - return (0, _effects.call)(callCallContractFn, { contract: contract, fnName: fnName, fnIndex: fnIndex, args: args, argsHash: argsHash }); + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; +}(); - case 21: - _context6.next = 13; - break; +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { - case 23: - _context6.next = 10; - break; +module.exports = { "default": __webpack_require__(91), __esModule: true }; - case 25: - _context6.next = 27; - return (0, _effects.put)({ type: 'CONTRACT_SYNCED', contractName: contractName }); +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { - case 27: - case 'end': - return _context6.stop(); - } - } - }, _marked6, this); -} +module.exports = !__webpack_require__(6) && !__webpack_require__(16)(function () { + return Object.defineProperty(__webpack_require__(31)('div'), 'a', { get: function () { return 7; } }).a != 7; +}); -var getContractsState = function getContractsState(state) { - return state.contracts; -}; -var getNetworkId = function getNetworkId(state) { - return state.web3.networkId; -}; -function isSendOrCallOptions(options) { - if ('from' in options) return true; - if ('gas' in options) return true; - if ('gasPrice' in options) return true; - if ('value' in options) return true; +/***/ }), +/* 54 */ +/***/ (function(module, exports) { - return false; -} -function contractsSaga() { - return _regenerator2.default.wrap(function contractsSaga$(_context7) { - while (1) { - switch (_context7.prev = _context7.next) { - case 0: - _context7.next = 2; - return (0, _effects.takeEvery)('SEND_CONTRACT_TX', callSendContractTx); - case 2: - _context7.next = 4; - return (0, _effects.takeEvery)('CALL_CONTRACT_FN', callCallContractFn); +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { - case 4: - _context7.next = 6; - return (0, _effects.takeEvery)('CONTRACT_SYNCING', callSyncContract); +"use strict"; - case 6: - _context7.next = 8; - return (0, _effects.takeEvery)('LISTEN_FOR_EVENT', callListenForContractEvent); +var LIBRARY = __webpack_require__(21); +var $export = __webpack_require__(4); +var redefine = __webpack_require__(56); +var hide = __webpack_require__(7); +var has = __webpack_require__(9); +var Iterators = __webpack_require__(18); +var $iterCreate = __webpack_require__(96); +var setToStringTag = __webpack_require__(24); +var getPrototypeOf = __webpack_require__(100); +var ITERATOR = __webpack_require__(1)('iterator'); +var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` +var FF_ITERATOR = '@@iterator'; +var KEYS = 'keys'; +var VALUES = 'values'; - case 8: - case 'end': - return _context7.stop(); - } +var returnThis = function () { return this; }; + +module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { + $iterCreate(Constructor, NAME, next); + var getMethod = function (kind) { + if (!BUGGY && kind in proto) return proto[kind]; + switch (kind) { + case KEYS: return function keys() { return new Constructor(this, kind); }; + case VALUES: return function values() { return new Constructor(this, kind); }; + } return function entries() { return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator'; + var DEF_VALUES = DEFAULT == VALUES; + var VALUES_BUG = false; + var proto = Base.prototype; + var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; + var $default = (!BUGGY && $native) || getMethod(DEFAULT); + var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; + var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; + var methods, key, IteratorPrototype; + // Fix native + if ($anyNative) { + IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); + if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); } - }, _marked7, this); -} + } + // fix Array#{values, @@iterator}.name in V8 / FF + if (DEF_VALUES && $native && $native.name !== VALUES) { + VALUES_BUG = true; + $default = function values() { return $native.call(this); }; + } + // Define iterator + if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if (DEFAULT) { + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if (FORCED) for (key in methods) { + if (!(key in proto)) redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; -exports.default = contractsSaga; /***/ }), -/* 46 */ -/***/ (function(module, exports) { +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { -exports.f = Object.getOwnPropertySymbols; +module.exports = __webpack_require__(7); /***/ }), -/* 47 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { -exports.f = __webpack_require__(1); +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = __webpack_require__(5); +var dPs = __webpack_require__(97); +var enumBugKeys = __webpack_require__(39); +var IE_PROTO = __webpack_require__(37)('IE_PROTO'); +var Empty = function () { /* empty */ }; +var PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(31)('iframe'); + var i = enumBugKeys.length; + var lt = '<'; + var gt = '>'; + var iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(60).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + Empty[PROTOTYPE] = anObject(O); + result = new Empty(); + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; /***/ }), -/* 48 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { -var global = __webpack_require__(0); -var core = __webpack_require__(2); -var LIBRARY = __webpack_require__(20); -var wksExt = __webpack_require__(47); -var defineProperty = __webpack_require__(3).f; -module.exports = function (name) { - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); +var has = __webpack_require__(9); +var toIObject = __webpack_require__(12); +var arrayIndexOf = __webpack_require__(98)(false); +var IE_PROTO = __webpack_require__(37)('IE_PROTO'); + +module.exports = function (object, names) { + var O = toIObject(object); + var i = 0; + var result = []; + var key; + for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while (names.length > i) if (has(O, key = names[i++])) { + ~arrayIndexOf(result, key) || result.push(key); + } + return result; }; /***/ }), -/* 49 */ +/* 59 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = __webpack_require__(19); +// eslint-disable-next-line no-prototype-builtins +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { + return cof(it) == 'String' ? it.split('') : Object(it); +}; -Object.defineProperty(exports, "__esModule", { - value: true -}); +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { -var _regenerator = __webpack_require__(10); +var document = __webpack_require__(0).document; +module.exports = document && document.documentElement; -var _regenerator2 = _interopRequireDefault(_regenerator); -exports.initializeWeb3 = initializeWeb3; -exports.getNetworkId = getNetworkId; +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { -var _effects = __webpack_require__(11); +__webpack_require__(101); +var global = __webpack_require__(0); +var hide = __webpack_require__(7); +var Iterators = __webpack_require__(18); +var TO_STRING_TAG = __webpack_require__(1)('toStringTag'); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + + 'TextTrackList,TouchList').split(','); -var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(callInitializeWeb3), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(getNetworkId), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); +for (var i = 0; i < DOMIterables.length; i++) { + var NAME = DOMIterables[i]; + var Collection = global[NAME]; + var proto = Collection && Collection.prototype; + if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} -var Web3 = __webpack_require__(148); -/* - * Initialization - */ +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { -function initializeWeb3(_ref) { - var options = _ref.options; - var web3, provider; - return _regenerator2.default.wrap(function initializeWeb3$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - web3 = {}; +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = __webpack_require__(19); +var TAG = __webpack_require__(1)('toStringTag'); +// ES3 wrong here +var ARG = cof(function () { return arguments; }()) == 'Arguments'; - // Checking if Web3 has been injected by the browser (Mist/MetaMask) +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (e) { /* empty */ } +}; - if (!(typeof window.web3 !== 'undefined')) { - _context.next = 10; - break; - } +module.exports = function (it) { + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; - // Use Mist/MetaMask's provider. - web3 = new Web3(window.web3.currentProvider); - web3.eth.cacheSendTransaction = function (txObject) { - return (0, _effects.put)({ type: 'SEND_WEB3_TX', txObject: txObject, stackId: stackId, web3: web3 }); - }; - console.log('Injected web3 detected.'); +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { - _context.next = 7; - return (0, _effects.put)({ type: 'WEB3_INITIALIZED' }); +// call something on iterator step with safe closing on error +var anObject = __webpack_require__(5); +module.exports = function (iterator, fn, value, entries) { + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch (e) { + var ret = iterator['return']; + if (ret !== undefined) anObject(ret.call(iterator)); + throw e; + } +}; - case 7: - return _context.abrupt('return', web3); - case 10: - if (!options.fallback) { - _context.next = 23; - break; - } +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { - // Attempt fallback if no web3 injection. - console.log('No web3 instance injected, using fallback.'); +// check on default Array iterator +var Iterators = __webpack_require__(18); +var ITERATOR = __webpack_require__(1)('iterator'); +var ArrayProto = Array.prototype; - _context.t0 = options.fallback.type; - _context.next = _context.t0 === 'ws' ? 15 : 22; - break; +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; - case 15: - provider = new Web3.providers.WebsocketProvider(options.fallback.url); - web3 = new Web3(provider); +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { - // Attach drizzle functions - web3.eth['cacheSendTransaction'] = function (txObject) { - return (0, _effects.put)({ type: 'SEND_WEB3_TX', txObject: txObject, stackId: stackId, web3: web3 }); - }; +var classof = __webpack_require__(62); +var ITERATOR = __webpack_require__(1)('iterator'); +var Iterators = __webpack_require__(18); +module.exports = __webpack_require__(2).getIteratorMethod = function (it) { + if (it != undefined) return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; - _context.next = 20; - return (0, _effects.put)({ type: 'WEB3_INITIALIZED' }); - case 20: - return _context.abrupt('return', web3); +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { - case 22: - throw "Invalid web3 fallback provided."; +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = __webpack_require__(5); +var aFunction = __webpack_require__(20); +var SPECIES = __webpack_require__(1)('species'); +module.exports = function (O, D) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; - case 23: - throw "Cannot find injected web3 or valid fallback."; - case 24: - case 'end': - return _context.stop(); - } - } - }, _marked, this); +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +var ctx = __webpack_require__(15); +var invoke = __webpack_require__(107); +var html = __webpack_require__(60); +var cel = __webpack_require__(31); +var global = __webpack_require__(0); +var process = global.process; +var setTask = global.setImmediate; +var clearTask = global.clearImmediate; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function () { + var id = +this; + // eslint-disable-next-line no-prototype-builtins + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function (event) { + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!setTask || !clearTask) { + setTask = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) args.push(arguments[i++]); + queue[++counter] = function () { + // eslint-disable-next-line no-new-func + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (__webpack_require__(19)(process) == 'process') { + defer = function (id) { + process.nextTick(ctx(run, id, 1)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if (MessageChannel) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { + defer = function (id) { + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in cel('script')) { + defer = function (id) { + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(ctx(run, id, 1), 0); + }; + } } +module.exports = { + set: setTask, + clear: clearTask +}; -function callInitializeWeb3(action) { - var web3; - return _regenerator2.default.wrap(function callInitializeWeb3$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.prev = 0; - _context2.next = 3; - return (0, _effects.call)(initializeWeb3, { options: action.options }); - case 3: - web3 = _context2.sent; - return _context2.abrupt('return', web3); +/***/ }), +/* 68 */ +/***/ (function(module, exports) { - case 7: - _context2.prev = 7; - _context2.t0 = _context2['catch'](0); +module.exports = function (exec) { + try { + return { e: false, v: exec() }; + } catch (e) { + return { e: true, v: e }; + } +}; - store.dispatch({ type: 'WEB3_FAILED', error: _context2.t0 }); - console.error('Error intializing web3:'); - console.error(_context2.t0); - case 12: - case 'end': - return _context2.stop(); - } - } - }, _marked2, this, [[0, 7]]); -} - -/* - * Network ID - */ +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { -function getNetworkId(_ref2) { - var web3 = _ref2.web3; - var networkId; - return _regenerator2.default.wrap(function getNetworkId$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.prev = 0; - _context3.next = 3; - return (0, _effects.call)(web3.eth.net.getId); +var anObject = __webpack_require__(5); +var isObject = __webpack_require__(8); +var newPromiseCapability = __webpack_require__(41); - case 3: - networkId = _context3.sent; - _context3.next = 6; - return (0, _effects.put)({ type: 'NETWORK_ID_FETCHED', networkId: networkId }); +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; - case 6: - return _context3.abrupt('return', networkId); - case 9: - _context3.prev = 9; - _context3.t0 = _context3['catch'](0); - _context3.next = 13; - return (0, _effects.put)({ type: 'NETWORK_ID_FAILED', error: _context3.t0 }); +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { - case 13: +var ITERATOR = __webpack_require__(1)('iterator'); +var SAFE_CLOSING = false; - console.error('Error fetching network ID:'); - console.error(_context3.t0); +try { + var riter = [7][ITERATOR](); + riter['return'] = function () { SAFE_CLOSING = true; }; + // eslint-disable-next-line no-throw-literal + Array.from(riter, function () { throw 2; }); +} catch (e) { /* empty */ } - return _context3.abrupt('return'); +module.exports = function (exec, skipClosing) { + if (!skipClosing && !SAFE_CLOSING) return false; + var safe = false; + try { + var arr = [7]; + var iter = arr[ITERATOR](); + iter.next = function () { return { done: safe = true }; }; + arr[ITERATOR] = function () { return iter; }; + exec(arr); + } catch (e) { /* empty */ } + return safe; +}; - case 16: - case 'end': - return _context3.stop(); - } - } - }, _marked3, this, [[0, 9]]); -} -/* - * Send Transaction - */ +/***/ }), +/* 71 */ +/***/ (function(module, exports) { -function createTxChannel(_ref3) { - var txObject = _ref3.txObject, - stackId = _ref3.stackId, - web3 = _ref3.web3; +module.exports = __WEBPACK_EXTERNAL_MODULE_71__; - var persistTxHash; +/***/ }), +/* 72 */ +/***/ (function(module, exports) { - return eventChannel(function (emit) { - var txPromiEvent = web3.eth.sendTransaction(txObject).on('transactionHash', function (txHash) { - persistTxHash = txHash; +// shim for using process in browser +var process = module.exports = {}; - emit({ type: 'W3TX_BROADCASTED', txHash: txHash, stackId: stackId }); - }).on('confirmation', function (confirmationNumber, receipt) { - emit({ type: 'W3TX_CONFIRMAITON', confirmationReceipt: receipt, txHash: persistTxHash }); - }).on('receipt', function (receipt) { - emit({ type: 'W3TX_SUCCESSFUL', receipt: receipt, txHash: persistTxHash }); - emit(END); - }).on('error', function (error) { - emit({ type: 'W3TX_ERROR', error: error, txHash: persistTxHash }); - emit(END); - }); +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. - var unsubscribe = function unsubscribe() { - txPromiEvent.off(); - }; +var cachedSetTimeout; +var cachedClearTimeout; - return unsubscribe; - }); +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); } +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } -function callSendTx(_ref4) { - var txObject = _ref4.txObject, - stackId = _ref4.stackId, - web3 = _ref4.web3; - var txChannel, event; - return _regenerator2.default.wrap(function callSendTx$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - _context4.next = 2; - return (0, _effects.call)(createTxChannel, { txObject: txObject, stackId: stackId, web3: web3 }); - - case 2: - txChannel = _context4.sent; - _context4.prev = 3; - - case 4: - if (false) { - _context4.next = 12; - break; - } - - _context4.next = 7; - return take(txChannel); - case 7: - event = _context4.sent; - _context4.next = 10; - return (0, _effects.put)(event); +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } - case 10: - _context4.next = 4; - break; - case 12: - _context4.prev = 12; - txChannel.close(); - return _context4.finish(12); +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; - case 15: - case 'end': - return _context4.stop(); - } +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); } - }, _marked4, this, [[3,, 12, 15]]); } -function web3Saga() { - return _regenerator2.default.wrap(function web3Saga$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - _context5.next = 2; - return (0, _effects.takeLatest)('WEB3_INITIALIZING', callInitializeWeb3); +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; - case 2: - _context5.next = 4; - return (0, _effects.takeLatest)('NETWORK_ID_FETCHING', getNetworkId); - - case 4: - _context5.next = 6; - return (0, _effects.takeEvery)('SEND_WEB3_TX', callSendTx); + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} - case 6: - case 'end': - return _context5.stop(); - } +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } } - }, _marked5, this); + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; } +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; -exports.default = web3Saga; /***/ }), -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { +/* 73 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; +/* unused harmony export BUFFER_OVERFLOW */ +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buffers; }); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); -exports.__esModule = true; +var BUFFER_OVERFLOW = "Channel's Buffer overflow!"; -var _defineProperty = __webpack_require__(76); +var ON_OVERFLOW_THROW = 1; +var ON_OVERFLOW_DROP = 2; +var ON_OVERFLOW_SLIDE = 3; +var ON_OVERFLOW_EXPAND = 4; -var _defineProperty2 = _interopRequireDefault(_defineProperty); +var zeroBuffer = { isEmpty: __WEBPACK_IMPORTED_MODULE_0__utils__["k" /* kTrue */], put: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */], take: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */] }; -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function ringBuffer() { + var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; + var overflowAction = arguments[1]; -exports.default = function (obj, key, value) { - if (key in obj) { - (0, _defineProperty2.default)(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - } else { - obj[key] = value; - } + var arr = new Array(limit); + var length = 0; + var pushIndex = 0; + var popIndex = 0; - return obj; + var push = function push(it) { + arr[pushIndex] = it; + pushIndex = (pushIndex + 1) % limit; + length++; + }; + + var take = function take() { + if (length != 0) { + var it = arr[popIndex]; + arr[popIndex] = null; + length--; + popIndex = (popIndex + 1) % limit; + return it; + } + }; + + var flush = function flush() { + var items = []; + while (length) { + items.push(take()); + } + return items; + }; + + return { + isEmpty: function isEmpty() { + return length == 0; + }, + put: function put(it) { + if (length < limit) { + push(it); + } else { + var doubledLimit = void 0; + switch (overflowAction) { + case ON_OVERFLOW_THROW: + throw new Error(BUFFER_OVERFLOW); + case ON_OVERFLOW_SLIDE: + arr[pushIndex] = it; + pushIndex = (pushIndex + 1) % limit; + popIndex = pushIndex; + break; + case ON_OVERFLOW_EXPAND: + doubledLimit = 2 * limit; + + arr = flush(); + + length = arr.length; + pushIndex = arr.length; + popIndex = 0; + + arr.length = doubledLimit; + limit = doubledLimit; + + push(it); + break; + default: + // DROP + } + } + }, + take: take, + flush: flush + }; +} + +var buffers = { + none: function none() { + return zeroBuffer; + }, + fixed: function fixed(limit) { + return ringBuffer(limit, ON_OVERFLOW_THROW); + }, + dropping: function dropping(limit) { + return ringBuffer(limit, ON_OVERFLOW_DROP); + }, + sliding: function sliding(limit) { + return ringBuffer(limit, ON_OVERFLOW_SLIDE); + }, + expanding: function expanding(initialSize) { + return ringBuffer(initialSize, ON_OVERFLOW_EXPAND); + } }; /***/ }), -/* 51 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.__esModule = true; +Object.defineProperty(exports, "__esModule", { + value: true +}); -exports.default = function (instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } -}; +var _regenerator = __webpack_require__(10); -/***/ }), -/* 52 */ -/***/ (function(module, exports) { +var _regenerator2 = _interopRequireDefault(_regenerator); +var _reduxSaga = __webpack_require__(25); +var _effects = __webpack_require__(11); -/***/ }), -/* 53 */ -/***/ (function(module, exports, __webpack_require__) { +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -"use strict"; +var _marked = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockChannel), + _marked2 = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockPollChannel), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(processBlockHeader), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(processBlock), + _marked5 = /*#__PURE__*/_regenerator2.default.mark(blocksSaga); -var LIBRARY = __webpack_require__(20); -var $export = __webpack_require__(4); -var redefine = __webpack_require__(55); -var hide = __webpack_require__(7); -var has = __webpack_require__(9); -var Iterators = __webpack_require__(18); -var $iterCreate = __webpack_require__(91); -var setToStringTag = __webpack_require__(24); -var getPrototypeOf = __webpack_require__(95); -var ITERATOR = __webpack_require__(1)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; +var BlockTracker = __webpack_require__(122); -var returnThis = function () { return this; }; - -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function (kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: return function keys() { return new Constructor(this, kind); }; - case VALUES: return function values() { return new Constructor(this, kind); }; - } return function entries() { return new Constructor(this, kind); }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = (!BUGGY && $native) || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - // Fix native - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - // Set @@toStringTag to native iterators - setToStringTag(IteratorPrototype, TAG, true); - // fix for some old engines - if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis); - } - } - // fix Array#{values, @@iterator}.name in V8 / FF - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { return $native.call(this); }; - } - // Define iterator - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - // Plug for library - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; +/* + * Listen for Blocks + */ +function createBlockChannel(_ref) { + var drizzle = _ref.drizzle, + web3 = _ref.web3; -/***/ }), -/* 54 */ -/***/ (function(module, exports, __webpack_require__) { + return (0, _reduxSaga.eventChannel)(function (emit) { + var blockEvents = web3.eth.subscribe('newBlockHeaders', function (error, result) { + if (error) { + emit({ type: 'BLOCKS_FAILED', error: error }); -module.exports = !__webpack_require__(6) && !__webpack_require__(16)(function () { - return Object.defineProperty(__webpack_require__(34)('div'), 'a', { get: function () { return 7; } }).a != 7; -}); + console.error('Error in block header subscription:'); + console.error(error); + emit(_reduxSaga.END); + } + }).on('data', function (blockHeader) { + emit({ type: 'BLOCK_RECEIVED', blockHeader: blockHeader, drizzle: drizzle, web3: web3 }); + }).on('error', function (error) { + emit({ type: 'BLOCKS_FAILED', error: error }); + emit(_reduxSaga.END); + }); -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { + var unsubscribe = function unsubscribe() { + blockEvents.off(); + }; -module.exports = __webpack_require__(7); + return unsubscribe; + }); +} +function callCreateBlockChannel(_ref2) { + var drizzle = _ref2.drizzle, + web3 = _ref2.web3; + var blockChannel, event; + return _regenerator2.default.wrap(function callCreateBlockChannel$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return (0, _effects.call)(createBlockChannel, { drizzle: drizzle, web3: web3 }); -/***/ }), -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { + case 2: + blockChannel = _context.sent; + _context.prev = 3; -// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) -var anObject = __webpack_require__(5); -var dPs = __webpack_require__(92); -var enumBugKeys = __webpack_require__(39); -var IE_PROTO = __webpack_require__(37)('IE_PROTO'); -var Empty = function () { /* empty */ }; -var PROTOTYPE = 'prototype'; + case 4: + if (false) { + _context.next = 12; + break; + } -// Create object with fake `null` prototype: use iframe Object with cleared prototype -var createDict = function () { - // Thrash, waste and sodomy: IE GC bug - var iframe = __webpack_require__(34)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __webpack_require__(59).appendChild(iframe); - iframe.src = 'javascript:'; // eslint-disable-line no-script-url - // createDict = iframe.contentWindow.Object; - // html.removeChild(iframe); - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - createDict = iframeDocument.F; - while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; - return createDict(); -}; + _context.next = 7; + return (0, _effects.take)(blockChannel); -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - // add "__proto__" for Object.getPrototypeOf polyfill - result[IE_PROTO] = O; - } else result = createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; + case 7: + event = _context.sent; + _context.next = 10; + return (0, _effects.put)(event); + case 10: + _context.next = 4; + break; -/***/ }), -/* 57 */ -/***/ (function(module, exports, __webpack_require__) { + case 12: + _context.prev = 12; -var has = __webpack_require__(9); -var toIObject = __webpack_require__(12); -var arrayIndexOf = __webpack_require__(93)(false); -var IE_PROTO = __webpack_require__(37)('IE_PROTO'); + blockChannel.close(); + return _context.finish(12); -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key); - // Don't enum bug & hidden keys - while (names.length > i) if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - return result; -}; + case 15: + case 'end': + return _context.stop(); + } + } + }, _marked, this, [[3,, 12, 15]]); +} +/* + * Poll for Blocks + */ -/***/ }), -/* 58 */ -/***/ (function(module, exports, __webpack_require__) { +function createBlockPollChannel(_ref3) { + var drizzle = _ref3.drizzle, + interval = _ref3.interval, + web3 = _ref3.web3; -// fallback for non-array-like ES3 and non-enumerable old V8 strings -var cof = __webpack_require__(19); -// eslint-disable-next-line no-prototype-builtins -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; + return (0, _reduxSaga.eventChannel)(function (emit) { + var blockTracker = new BlockTracker({ provider: web3.currentProvider, pollingInterval: interval }); + blockTracker.on('latest', function (block) { + emit({ type: 'BLOCK_FOUND', block: block, drizzle: drizzle, web3: web3 }); + }); -/***/ }), -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { + blockTracker.start().catch(function (error) { + emit({ type: 'BLOCKS_FAILED', error: error }); + emit(_reduxSaga.END); + }); -var document = __webpack_require__(0).document; -module.exports = document && document.documentElement; + var unsubscribe = function unsubscribe() { + blockTracker.stop(); + }; + return unsubscribe; + }); +} -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { +function callCreateBlockPollChannel(_ref4) { + var drizzle = _ref4.drizzle, + interval = _ref4.interval, + web3 = _ref4.web3; + var blockChannel, event; + return _regenerator2.default.wrap(function callCreateBlockPollChannel$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return (0, _effects.call)(createBlockPollChannel, { drizzle: drizzle, interval: interval, web3: web3 }); -__webpack_require__(96); -var global = __webpack_require__(0); -var hide = __webpack_require__(7); -var Iterators = __webpack_require__(18); -var TO_STRING_TAG = __webpack_require__(1)('toStringTag'); + case 2: + blockChannel = _context2.sent; + _context2.prev = 3; -var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + - 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + - 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + - 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + - 'TextTrackList,TouchList').split(','); + case 4: + if (false) { + _context2.next = 12; + break; + } -for (var i = 0; i < DOMIterables.length; i++) { - var NAME = DOMIterables[i]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = Iterators.Array; -} + _context2.next = 7; + return (0, _effects.take)(blockChannel); + case 7: + event = _context2.sent; + _context2.next = 10; + return (0, _effects.put)(event); -/***/ }), -/* 61 */ -/***/ (function(module, exports, __webpack_require__) { + case 10: + _context2.next = 4; + break; -// getting tag from 19.1.3.6 Object.prototype.toString() -var cof = __webpack_require__(19); -var TAG = __webpack_require__(1)('toStringTag'); -// ES3 wrong here -var ARG = cof(function () { return arguments; }()) == 'Arguments'; + case 12: + _context2.prev = 12; -// fallback for IE11 Script Access Denied error -var tryGet = function (it, key) { - try { - return it[key]; - } catch (e) { /* empty */ } -}; + blockChannel.close(); + return _context2.finish(12); -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' - // @@toStringTag case - : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T - // builtinTag case - : ARG ? cof(O) - // ES3 arguments fallback - : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __webpack_require__) { - -// call something on iterator step with safe closing on error -var anObject = __webpack_require__(5); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - // 7.4.6 IteratorClose(iterator, completion) - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; - - -/***/ }), -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { - -// check on default Array iterator -var Iterators = __webpack_require__(18); -var ITERATOR = __webpack_require__(1)('iterator'); -var ArrayProto = Array.prototype; - -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -var classof = __webpack_require__(61); -var ITERATOR = __webpack_require__(1)('iterator'); -var Iterators = __webpack_require__(18); -module.exports = __webpack_require__(2).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] - || it['@@iterator'] - || Iterators[classof(it)]; -}; - - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -// 7.3.20 SpeciesConstructor(O, defaultConstructor) -var anObject = __webpack_require__(5); -var aFunction = __webpack_require__(21); -var SPECIES = __webpack_require__(1)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -var ctx = __webpack_require__(15); -var invoke = __webpack_require__(102); -var html = __webpack_require__(59); -var cel = __webpack_require__(34); -var global = __webpack_require__(0); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function () { - var id = +this; - // eslint-disable-next-line no-prototype-builtins - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function (event) { - run.call(event.data); -}; -// Node.js 0.9+ & IE10+ has setImmediate, otherwise: -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) args.push(arguments[i++]); - queue[++counter] = function () { - // eslint-disable-next-line no-new-func - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - // Node.js 0.8- - if (__webpack_require__(19)(process) == 'process') { - defer = function (id) { - process.nextTick(ctx(run, id, 1)); - }; - // Sphere (JS game engine) Dispatch API - } else if (Dispatch && Dispatch.now) { - defer = function (id) { - Dispatch.now(ctx(run, id, 1)); - }; - // Browsers with MessageChannel, includes WebWorkers - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - // Browsers with postMessage, skip WebWorkers - // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function (id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - // IE8- - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function (id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - // Rest old browsers - } else { - defer = function (id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; - - -/***/ }), -/* 67 */ -/***/ (function(module, exports) { - -module.exports = function (exec) { - try { - return { e: false, v: exec() }; - } catch (e) { - return { e: true, v: e }; - } -}; - - -/***/ }), -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { - -var anObject = __webpack_require__(5); -var isObject = __webpack_require__(8); -var newPromiseCapability = __webpack_require__(41); - -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - - -/***/ }), -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - -var ITERATOR = __webpack_require__(1)('iterator'); -var SAFE_CLOSING = false; - -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { SAFE_CLOSING = true; }; - // eslint-disable-next-line no-throw-literal - Array.from(riter, function () { throw 2; }); -} catch (e) { /* empty */ } - -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { return { done: safe = true }; }; - arr[ITERATOR] = function () { return iter; }; - exec(arr); - } catch (e) { /* empty */ } - return safe; -}; - - -/***/ }), -/* 70 */ -/***/ (function(module, exports) { - -module.exports = __WEBPACK_EXTERNAL_MODULE_70__; - -/***/ }), -/* 71 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } + case 15: + case 'end': + return _context2.stop(); + } } + }, _marked2, this, [[3,, 12, 15]]); +} +/* + * Process Blocks + */ -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } +function processBlockHeader(_ref5) { + var blockHeader = _ref5.blockHeader, + drizzle = _ref5.drizzle, + web3 = _ref5.web3; + var blockNumber, block; + return _regenerator2.default.wrap(function processBlockHeader$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + blockNumber = blockHeader.number; + _context3.prev = 1; + _context3.next = 4; + return (0, _effects.call)(web3.eth.getBlock, blockNumber, true); + case 4: + block = _context3.sent; + _context3.next = 7; + return (0, _effects.call)(processBlock, { block: block, drizzle: drizzle, web3: web3 }); + case 7: + _context3.next = 16; + break; -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; + case 9: + _context3.prev = 9; + _context3.t0 = _context3['catch'](1); -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} + console.error('Error in block processing:'); + console.error(_context3.t0); -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; + _context3.next = 15; + return (0, _effects.put)({ type: 'BLOCK_FAILED', error: _context3.t0 }); - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} + case 15: + return _context3.abrupt('return'); -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); + case 16: + case 'end': + return _context3.stop(); + } } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; + }, _marked3, this, [[1, 9]]); } -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; -function noop() {} +function processBlock(_ref6) { + var block = _ref6.block, + drizzle = _ref6.drizzle, + web3 = _ref6.web3; + var txs, i, from, fromContract, to, toContract; + return _regenerator2.default.wrap(function processBlock$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.prev = 0; + txs = block.transactions; -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; -process.prependListener = noop; -process.prependOnceListener = noop; + if (!(txs.length > 0)) { + _context4.next = 18; + break; + } -process.listeners = function (name) { return [] } + i = 0; -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; + case 4: + if (!(i < txs.length)) { + _context4.next = 18; + break; + } -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; + from = txs[i].from || ''; + fromContract = drizzle.findContractByAddress(from.toLowerCase()); + if (!fromContract) { + _context4.next = 10; + break; + } -/***/ }), -/* 72 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + _context4.next = 10; + return (0, _effects.put)({ type: 'CONTRACT_SYNCING', contract: fromContract }); -"use strict"; -/* unused harmony export BUFFER_OVERFLOW */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return buffers; }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(13); + case 10: + to = txs[i].to || ''; + toContract = drizzle.findContractByAddress(to.toLowerCase()); + if (!toContract) { + _context4.next = 15; + break; + } -var BUFFER_OVERFLOW = "Channel's Buffer overflow!"; + _context4.next = 15; + return (0, _effects.put)({ type: 'CONTRACT_SYNCING', contract: toContract }); -var ON_OVERFLOW_THROW = 1; -var ON_OVERFLOW_DROP = 2; -var ON_OVERFLOW_SLIDE = 3; -var ON_OVERFLOW_EXPAND = 4; + case 15: + i++; + _context4.next = 4; + break; -var zeroBuffer = { isEmpty: __WEBPACK_IMPORTED_MODULE_0__utils__["k" /* kTrue */], put: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */], take: __WEBPACK_IMPORTED_MODULE_0__utils__["m" /* noop */] }; + case 18: + _context4.next = 27; + break; -function ringBuffer() { - var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10; - var overflowAction = arguments[1]; + case 20: + _context4.prev = 20; + _context4.t0 = _context4['catch'](0); - var arr = new Array(limit); - var length = 0; - var pushIndex = 0; - var popIndex = 0; + console.error('Error in block processing:'); + console.error(_context4.t0); - var push = function push(it) { - arr[pushIndex] = it; - pushIndex = (pushIndex + 1) % limit; - length++; - }; + _context4.next = 26; + return (0, _effects.put)({ type: 'BLOCK_FAILED', error: _context4.t0 }); - var take = function take() { - if (length != 0) { - var it = arr[popIndex]; - arr[popIndex] = null; - length--; - popIndex = (popIndex + 1) % limit; - return it; - } - }; + case 26: + return _context4.abrupt('return'); - var flush = function flush() { - var items = []; - while (length) { - items.push(take()); + case 27: + case 'end': + return _context4.stop(); + } } - return items; - }; + }, _marked4, this, [[0, 20]]); +} - return { - isEmpty: function isEmpty() { - return length == 0; - }, - put: function put(it) { - if (length < limit) { - push(it); - } else { - var doubledLimit = void 0; - switch (overflowAction) { - case ON_OVERFLOW_THROW: - throw new Error(BUFFER_OVERFLOW); - case ON_OVERFLOW_SLIDE: - arr[pushIndex] = it; - pushIndex = (pushIndex + 1) % limit; - popIndex = pushIndex; - break; - case ON_OVERFLOW_EXPAND: - doubledLimit = 2 * limit; +function blocksSaga() { + return _regenerator2.default.wrap(function blocksSaga$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return (0, _effects.takeLatest)('BLOCKS_LISTENING', callCreateBlockChannel); - arr = flush(); + case 2: + _context5.next = 4; + return (0, _effects.takeEvery)('BLOCK_RECEIVED', processBlockHeader); - length = arr.length; - pushIndex = arr.length; - popIndex = 0; + case 4: + _context5.next = 6; + return (0, _effects.takeLatest)('BLOCKS_POLLING', callCreateBlockPollChannel); - arr.length = doubledLimit; - limit = doubledLimit; + case 6: + _context5.next = 8; + return (0, _effects.takeEvery)('BLOCK_FOUND', processBlock); - push(it); - break; - default: - // DROP - } + case 8: + case 'end': + return _context5.stop(); } - }, - take: take, - flush: flush - }; + } + }, _marked5, this); } -var buffers = { - none: function none() { - return zeroBuffer; - }, - fixed: function fixed(limit) { - return ringBuffer(limit, ON_OVERFLOW_THROW); - }, - dropping: function dropping(limit) { - return ringBuffer(limit, ON_OVERFLOW_DROP); - }, - sliding: function sliding(limit) { - return ringBuffer(limit, ON_OVERFLOW_SLIDE); - }, - expanding: function expanding(initialSize) { - return ringBuffer(initialSize, ON_OVERFLOW_EXPAND); - } -}; +exports.default = blocksSaga; /***/ }), -/* 73 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3513,341 +3381,557 @@ Object.defineProperty(exports, "__esModule", { value: true }); +var _assign = __webpack_require__(28); + +var _assign2 = _interopRequireDefault(_assign); + +var _extends2 = __webpack_require__(14); + +var _extends3 = _interopRequireDefault(_extends2); + +var _toConsumableArray2 = __webpack_require__(30); + +var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); + +var _typeof2 = __webpack_require__(76); + +var _typeof3 = _interopRequireDefault(_typeof2); + var _regenerator = __webpack_require__(10); var _regenerator2 = _interopRequireDefault(_regenerator); +exports.addContract = addContract; +exports.instantiateWeb3Contract = instantiateWeb3Contract; +exports.instantiateContract = instantiateContract; + var _reduxSaga = __webpack_require__(25); var _effects = __webpack_require__(11); +var _DrizzleContract = __webpack_require__(142); + +var _DrizzleContract2 = _interopRequireDefault(_DrizzleContract); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _marked = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockChannel), - _marked2 = /*#__PURE__*/_regenerator2.default.mark(callCreateBlockPollChannel), - _marked3 = /*#__PURE__*/_regenerator2.default.mark(processBlockHeader), - _marked4 = /*#__PURE__*/_regenerator2.default.mark(processBlock), - _marked5 = /*#__PURE__*/_regenerator2.default.mark(blocksSaga); +var _marked = /*#__PURE__*/_regenerator2.default.mark(addContract), + _marked2 = /*#__PURE__*/_regenerator2.default.mark(instantiateWeb3Contract), + _marked3 = /*#__PURE__*/_regenerator2.default.mark(instantiateContract), + _marked4 = /*#__PURE__*/_regenerator2.default.mark(callListenForContractEvent), + _marked5 = /*#__PURE__*/_regenerator2.default.mark(callSendContractTx), + _marked6 = /*#__PURE__*/_regenerator2.default.mark(callCallContractFn), + _marked7 = /*#__PURE__*/_regenerator2.default.mark(callSyncContract), + _marked8 = /*#__PURE__*/_regenerator2.default.mark(contractsSaga); + +function addContract(_ref) { + var drizzle = _ref.drizzle, + contractConfig = _ref.contractConfig, + events = _ref.events, + web3 = _ref.web3; + var drizzleContract; + return _regenerator2.default.wrap(function addContract$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!contractConfig.web3Contract) { + _context.next = 6; + break; + } + + _context.next = 3; + return (0, _effects.call)(instantiateWeb3Contract, { web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events: events, store: drizzle.store, web3: web3 }); + + case 3: + drizzleContract = _context.sent; + _context.next = 9; + break; + + case 6: + _context.next = 8; + return (0, _effects.call)(instantiateContract, { contractArtifact: contractConfig, events: events, store: drizzle.store, web3: web3 }); + + case 8: + drizzleContract = _context.sent; + + case 9: + drizzle._addContract(drizzleContract); + + case 10: + case 'end': + return _context.stop(); + } + } + }, _marked, this); +} + +/* + * Instantiation + */ + +function instantiateWeb3Contract(_ref2) { + var web3Contract = _ref2.web3Contract, + name = _ref2.name, + events = _ref2.events, + store = _ref2.store, + web3 = _ref2.web3; + return _regenerator2.default.wrap(function instantiateWeb3Contract$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt('return', new _DrizzleContract2.default(web3Contract, web3, name, store, events)); + + case 1: + case 'end': + return _context2.stop(); + } + } + }, _marked2, this); +} + +function instantiateContract(_ref3) { + var contractArtifact = _ref3.contractArtifact, + events = _ref3.events, + store = _ref3.store, + web3 = _ref3.web3; + var networkId, web3Contract; + return _regenerator2.default.wrap(function instantiateContract$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return (0, _effects.select)(getNetworkId); + + case 2: + networkId = _context3.sent; + + + // Instantiate the contract. + web3Contract = new web3.eth.Contract(contractArtifact.abi, contractArtifact.networks[networkId].address, { + from: store.getState().accounts[0], + data: contractArtifact.deployedBytecode + }); + return _context3.abrupt('return', new _DrizzleContract2.default(web3Contract, web3, contractArtifact.contractName, store, events)); -var BlockTracker = __webpack_require__(117); + case 5: + case 'end': + return _context3.stop(); + } + } + }, _marked3, this); +} /* - * Listen for Blocks + * Events */ -function createBlockChannel(_ref) { - var contracts = _ref.contracts, - contractAddresses = _ref.contractAddresses, - contractNames = _ref.contractNames, - web3 = _ref.web3; - - return (0, _reduxSaga.eventChannel)(function (emit) { - var blockEvents = web3.eth.subscribe('newBlockHeaders', function (error, result) { - if (error) { - emit({ type: 'BLOCKS_FAILED', error: error }); +function createContractEventChannel(_ref4) { + var contract = _ref4.contract, + eventName = _ref4.eventName; - console.error('Error in block header subscription:'); - console.error(error); + var name = contract.contractName; - emit(_reduxSaga.END); - } - }).on('data', function (blockHeader) { - emit({ type: 'BLOCK_RECEIVED', blockHeader: blockHeader, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + return (0, _reduxSaga.eventChannel)(function (emit) { + var eventListener = contract.events[eventName]().on('data', function (event) { + emit({ type: 'EVENT_FIRED', name: name, event: event }); + }).on('changed', function (event) { + emit({ type: 'EVENT_CHANGED', name: name, event: event }); }).on('error', function (error) { - emit({ type: 'BLOCKS_FAILED', error: error }); + emit({ type: 'EVENT_ERROR', name: name, error: error }); emit(_reduxSaga.END); }); var unsubscribe = function unsubscribe() { - blockEvents.off(); + eventListener.removeListener(eventName); }; return unsubscribe; }); } -function callCreateBlockChannel(_ref2) { - var contracts = _ref2.contracts, - contractAddresses = _ref2.contractAddresses, - contractNames = _ref2.contractNames, - web3 = _ref2.web3; - var blockChannel, event; - return _regenerator2.default.wrap(function callCreateBlockChannel$(_context) { +function callListenForContractEvent(_ref5) { + var contract = _ref5.contract, + eventName = _ref5.eventName; + var contractEventChannel, event; + return _regenerator2.default.wrap(function callListenForContractEvent$(_context4) { while (1) { - switch (_context.prev = _context.next) { + switch (_context4.prev = _context4.next) { case 0: - _context.next = 2; - return (0, _effects.call)(createBlockChannel, { contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + _context4.next = 2; + return (0, _effects.call)(createContractEventChannel, { contract: contract, eventName: eventName }); case 2: - blockChannel = _context.sent; - _context.prev = 3; + contractEventChannel = _context4.sent; - case 4: + case 3: if (false) { - _context.next = 12; + _context4.next = 11; break; } - _context.next = 7; - return (0, _effects.take)(blockChannel); + _context4.next = 6; + return (0, _effects.take)(contractEventChannel); - case 7: - event = _context.sent; - _context.next = 10; + case 6: + event = _context4.sent; + _context4.next = 9; return (0, _effects.put)(event); - case 10: - _context.next = 4; + case 9: + _context4.next = 3; break; - case 12: - _context.prev = 12; - - blockChannel.close(); - return _context.finish(12); - - case 15: + case 11: case 'end': - return _context.stop(); + return _context4.stop(); } } - }, _marked, this, [[3,, 12, 15]]); + }, _marked4, this); } /* - * Poll for Blocks + * Send and Cache */ -function createBlockPollChannel(_ref3) { - var contracts = _ref3.contracts, - contractAddresses = _ref3.contractAddresses, - contractNames = _ref3.contractNames, - interval = _ref3.interval, - web3 = _ref3.web3; +function createTxChannel(_ref6) { + var txObject = _ref6.txObject, + stackId = _ref6.stackId, + _ref6$sendArgs = _ref6.sendArgs, + sendArgs = _ref6$sendArgs === undefined ? {} : _ref6$sendArgs, + contractName = _ref6.contractName; - return (0, _reduxSaga.eventChannel)(function (emit) { - var blockTracker = new BlockTracker({ provider: web3.currentProvider, pollingInterval: interval }); + var persistTxHash; - blockTracker.on('latest', function (block) { - emit({ type: 'BLOCK_FOUND', block: block, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); - }); + return (0, _reduxSaga.eventChannel)(function (emit) { + var txPromiEvent = txObject.send(sendArgs).on('transactionHash', function (txHash) { + persistTxHash = txHash; - blockTracker.start().catch(function (error) { - emit({ type: 'BLOCKS_FAILED', error: error }); + emit({ type: 'TX_BROADCASTED', txHash: txHash, stackId: stackId }); + emit({ type: 'CONTRACT_SYNC_IND', contractName: contractName }); + }).on('confirmation', function (confirmationNumber, receipt) { + emit({ type: 'TX_CONFIRMAITON', confirmationReceipt: receipt, txHash: persistTxHash }); + }).on('receipt', function (receipt) { + emit({ type: 'TX_SUCCESSFUL', receipt: receipt, txHash: persistTxHash }); + emit(_reduxSaga.END); + }).on('error', function (error) { + emit({ type: 'TX_ERROR', error: error, txHash: persistTxHash }); emit(_reduxSaga.END); }); var unsubscribe = function unsubscribe() { - blockTracker.stop(); + txPromiEvent.off(); }; return unsubscribe; }); } -function callCreateBlockPollChannel(_ref4) { - var contracts = _ref4.contracts, - contractAddresses = _ref4.contractAddresses, - contractNames = _ref4.contractNames, - interval = _ref4.interval, - web3 = _ref4.web3; - var blockChannel, event; - return _regenerator2.default.wrap(function callCreateBlockPollChannel$(_context2) { +function callSendContractTx(_ref7) { + var contract = _ref7.contract, + fnName = _ref7.fnName, + fnIndex = _ref7.fnIndex, + args = _ref7.args, + stackId = _ref7.stackId; + var finalArg, sendArgs, finalArgTest, contractName, txObject, txChannel, event; + return _regenerator2.default.wrap(function callSendContractTx$(_context5) { while (1) { - switch (_context2.prev = _context2.next) { + switch (_context5.prev = _context5.next) { case 0: - _context2.next = 2; - return (0, _effects.call)(createBlockPollChannel, { contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, interval: interval, web3: web3 }); + // Check for type of object and properties indicative of call/send options. + if (args.length) { + finalArg = args.length > 1 ? args[args.length - 1] : args[0]; + sendArgs = {}; + finalArgTest = false; - case 2: - blockChannel = _context2.sent; - _context2.prev = 3; + + if ((typeof finalArg === 'undefined' ? 'undefined' : (0, _typeof3.default)(finalArg)) === 'object') { + finalArgTest = (0, _effects.call)(isSendOrCallOptions, finalArg); + } + + if (finalArgTest) { + sendArgs = finalArg; + + args.length > 1 ? delete args[args.length - 1] : delete args[0]; + args.length = args.length - 1; + } + } + + // Get name to mark as desynchronized on tx creation + contractName = contract.contractName; + + // Create the transaction object and execute the tx. + + _context5.next = 4; + return _effects.call.apply(undefined, [contract.methods[fnName]].concat((0, _toConsumableArray3.default)(args))); case 4: + txObject = _context5.sent; + _context5.next = 7; + return (0, _effects.call)(createTxChannel, { txObject: txObject, stackId: stackId, sendArgs: sendArgs, contractName: contractName }); + + case 7: + txChannel = _context5.sent; + _context5.prev = 8; + + case 9: if (false) { - _context2.next = 12; + _context5.next = 17; break; } - _context2.next = 7; - return (0, _effects.take)(blockChannel); + _context5.next = 12; + return (0, _effects.take)(txChannel); - case 7: - event = _context2.sent; - _context2.next = 10; + case 12: + event = _context5.sent; + _context5.next = 15; return (0, _effects.put)(event); - case 10: - _context2.next = 4; + case 15: + _context5.next = 9; break; - case 12: - _context2.prev = 12; + case 17: + _context5.prev = 17; - blockChannel.close(); - return _context2.finish(12); + txChannel.close(); + return _context5.finish(17); - case 15: + case 20: case 'end': - return _context2.stop(); + return _context5.stop(); } } - }, _marked2, this, [[3,, 12, 15]]); + }, _marked5, this, [[8,, 17, 20]]); } /* - * Process Blocks + * Call and Cache */ -function processBlockHeader(_ref5) { - var blockHeader = _ref5.blockHeader, - contracts = _ref5.contracts, - contractAddresses = _ref5.contractAddresses, - contractNames = _ref5.contractNames, - web3 = _ref5.web3; - var blockNumber, block; - return _regenerator2.default.wrap(function processBlockHeader$(_context3) { +function callCallContractFn(_ref8) { + var contract = _ref8.contract, + fnName = _ref8.fnName, + fnIndex = _ref8.fnIndex, + args = _ref8.args, + argsHash = _ref8.argsHash, + _ref8$sync = _ref8.sync, + sync = _ref8$sync === undefined ? false : _ref8$sync; + var finalArg, callArgs, finalArgTest, txObject, callResult, dispatchArgs, errorArgs; + return _regenerator2.default.wrap(function callCallContractFn$(_context6) { while (1) { - switch (_context3.prev = _context3.next) { + switch (_context6.prev = _context6.next) { case 0: - blockNumber = blockHeader.number; - _context3.prev = 1; - _context3.next = 4; - return (0, _effects.call)(web3.eth.getBlock, blockNumber, true); + if (!sync) { + _context6.next = 2; + break; + } - case 4: - block = _context3.sent; - _context3.next = 7; - return (0, _effects.call)(processBlock, { block: block, contracts: contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + return _context6.abrupt('return'); - case 7: - _context3.next = 16; - break; + case 2: - case 9: - _context3.prev = 9; - _context3.t0 = _context3['catch'](1); + // Check for type of object and properties indicative of call/send options. + if (args.length) { + finalArg = args.length > 1 ? args[args.length - 1] : args[0]; + callArgs = {}; + finalArgTest = false; - console.error('Error in block processing:'); - console.error(_context3.t0); - _context3.next = 15; - return (0, _effects.put)({ type: 'BLOCK_FAILED', error: _context3.t0 }); + if ((typeof finalArg === 'undefined' ? 'undefined' : (0, _typeof3.default)(finalArg)) === 'object') { + finalArgTest = (0, _effects.call)(isSendOrCallOptions, finalArg); + } + + if (finalArgTest) { + callArgs = finalArg; + + args.length > 1 ? delete args[args.length - 1] : delete args[0]; + args.length = args.length - 1; + } + } + + // Create the transaction object and execute the call. + _context6.next = 5; + return _effects.call.apply(undefined, [contract.methods[fnName]].concat((0, _toConsumableArray3.default)(args))); + + case 5: + txObject = _context6.sent; + _context6.prev = 6; + _context6.next = 9; + return (0, _effects.call)(txObject.call, callArgs); + + case 9: + callResult = _context6.sent; + dispatchArgs = { + name: contract.contractName, + variable: contract.abi[fnIndex].name, + argsHash: argsHash, + args: args, + value: callResult, + fnIndex: fnIndex + }; + _context6.next = 13; + return (0, _effects.put)((0, _extends3.default)({ type: 'GOT_CONTRACT_VAR' }, dispatchArgs)); + + case 13: + _context6.next = 21; + break; case 15: - return _context3.abrupt('return'); + _context6.prev = 15; + _context6.t0 = _context6['catch'](6); + + console.error(_context6.t0); + + errorArgs = { + name: contract.contractName, + variable: contract.abi[fnIndex].name, + argsHash: argsHash, + args: args, + error: _context6.t0, + fnIndex: fnIndex + }; + _context6.next = 21; + return (0, _effects.put)((0, _extends3.default)({ type: 'ERROR_CONTRACT_VAR' }, errorArgs)); - case 16: + case 21: case 'end': - return _context3.stop(); + return _context6.stop(); } } - }, _marked3, this, [[1, 9]]); + }, _marked6, this, [[6, 15]]); } -function processBlock(_ref6) { - var block = _ref6.block, - contracts = _ref6.contracts, - contractAddresses = _ref6.contractAddresses, - contractNames = _ref6.contractNames, - web3 = _ref6.web3; - var txs, i, from, to, index, contractName; - return _regenerator2.default.wrap(function processBlock$(_context4) { +/* + * Sync Contract + */ + +function callSyncContract(action) { + var contract, contractName, contractsState, contractFnsState, fnName, argsHash, fnIndex, args; + return _regenerator2.default.wrap(function callSyncContract$(_context7) { while (1) { - switch (_context4.prev = _context4.next) { + switch (_context7.prev = _context7.next) { case 0: - _context4.prev = 0; - txs = block.transactions; + // Get contract state from store + contract = action.contract; + contractName = contract.contractName; + _context7.next = 4; + return (0, _effects.select)(getContractsState); - if (!(txs.length > 0)) { - _context4.next = 15; - break; - } + case 4: + contractsState = _context7.sent; + contractFnsState = (0, _assign2.default)({}, contractsState[contractName]); - i = 0; + // Remove unnecessary keys - case 4: - if (!(i < txs.length)) { - _context4.next = 15; + delete contractFnsState.initialized; + delete contractFnsState.synced; + delete contractFnsState.events; + + // Iterate over functions and hashes + _context7.t0 = _regenerator2.default.keys(contractFnsState); + + case 10: + if ((_context7.t1 = _context7.t0()).done) { + _context7.next = 25; break; } - from = txs[i].from || ''; - to = txs[i].to || ''; + fnName = _context7.t1.value; + _context7.t2 = _regenerator2.default.keys(contractFnsState[fnName]); - if (!(contractAddresses.indexOf(from.toLowerCase()) !== -1 || contractAddresses.indexOf(to.toLowerCase()) !== -1)) { - _context4.next = 12; + case 13: + if ((_context7.t3 = _context7.t2()).done) { + _context7.next = 23; break; } - index = contractAddresses.indexOf(txs[i].from.toLowerCase()) !== -1 ? contractAddresses.indexOf(txs[i].from.toLowerCase()) : contractAddresses.indexOf(txs[i].to.toLowerCase()); - contractName = contractNames[index]; - _context4.next = 12; - return (0, _effects.put)({ type: 'CONTRACT_SYNCING', contract: contracts[contractName] }); - - case 12: - i++; - _context4.next = 4; - break; + argsHash = _context7.t3.value; + fnIndex = contractFnsState[fnName][argsHash].fnIndex; + args = contractFnsState[fnName][argsHash].args; - case 15: - _context4.next = 24; - break; + // Pull args and call fn for each given function + // keeping for pre-v1.1.5 compatibility with CALL_CONTRACT_FN event. - case 17: - _context4.prev = 17; - _context4.t0 = _context4['catch'](0); + _context7.next = 19; + return (0, _effects.put)({ type: 'CALL_CONTRACT_FN', contract: contract, fnName: fnName, fnIndex: fnIndex, args: args, argsHash: argsHash, sync: true }); - console.error('Error in block processing:'); - console.error(_context4.t0); + case 19: + _context7.next = 21; + return (0, _effects.call)(callCallContractFn, { contract: contract, fnName: fnName, fnIndex: fnIndex, args: args, argsHash: argsHash }); - _context4.next = 23; - return (0, _effects.put)({ type: 'BLOCK_FAILED', error: _context4.t0 }); + case 21: + _context7.next = 13; + break; case 23: - return _context4.abrupt('return'); + _context7.next = 10; + break; - case 24: + case 25: + _context7.next = 27; + return (0, _effects.put)({ type: 'CONTRACT_SYNCED', contractName: contractName }); + + case 27: case 'end': - return _context4.stop(); + return _context7.stop(); } } - }, _marked4, this, [[0, 17]]); + }, _marked7, this); } -function blocksSaga() { - return _regenerator2.default.wrap(function blocksSaga$(_context5) { +var getContractsState = function getContractsState(state) { + return state.contracts; +}; +var getNetworkId = function getNetworkId(state) { + return state.web3.networkId; +}; + +function isSendOrCallOptions(options) { + if ('from' in options) return true; + if ('gas' in options) return true; + if ('gasPrice' in options) return true; + if ('value' in options) return true; + + return false; +} + +function contractsSaga() { + return _regenerator2.default.wrap(function contractsSaga$(_context8) { while (1) { - switch (_context5.prev = _context5.next) { + switch (_context8.prev = _context8.next) { case 0: - _context5.next = 2; - return (0, _effects.takeLatest)('BLOCKS_LISTENING', callCreateBlockChannel); + _context8.next = 2; + return (0, _effects.takeEvery)('SEND_CONTRACT_TX', callSendContractTx); case 2: - _context5.next = 4; - return (0, _effects.takeEvery)('BLOCK_RECEIVED', processBlockHeader); + _context8.next = 4; + return (0, _effects.takeEvery)('CALL_CONTRACT_FN', callCallContractFn); case 4: - _context5.next = 6; - return (0, _effects.takeLatest)('BLOCKS_POLLING', callCreateBlockPollChannel); + _context8.next = 6; + return (0, _effects.takeEvery)('CONTRACT_SYNCING', callSyncContract); case 6: - _context5.next = 8; - return (0, _effects.takeEvery)('BLOCK_FOUND', processBlock); + _context8.next = 8; + return (0, _effects.takeEvery)('LISTEN_FOR_EVENT', callListenForContractEvent); case 8: + _context8.next = 10; + return (0, _effects.takeEvery)('ADD_CONTRACT', addContract); + + case 10: case 'end': - return _context5.stop(); + return _context8.stop(); } } - }, _marked5, this); + }, _marked8, this); } -exports.default = blocksSaga; +exports.default = contractsSaga; /***/ }), -/* 74 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3855,11 +3939,11 @@ exports.default = blocksSaga; exports.__esModule = true; -var _iterator = __webpack_require__(125); +var _iterator = __webpack_require__(130); var _iterator2 = _interopRequireDefault(_iterator); -var _symbol = __webpack_require__(127); +var _symbol = __webpack_require__(132); var _symbol2 = _interopRequireDefault(_symbol); @@ -3874,11 +3958,11 @@ exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.d }; /***/ }), -/* 75 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) -var $keys = __webpack_require__(57); +var $keys = __webpack_require__(58); var hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { @@ -3887,13 +3971,7 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { /***/ }), -/* 76 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = { "default": __webpack_require__(141), __esModule: true }; - -/***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -3909,22 +3987,20 @@ var _regenerator2 = _interopRequireDefault(_regenerator); var _effects = __webpack_require__(11); -var _defaultOptions = __webpack_require__(143); +var _defaultOptions = __webpack_require__(145); var _defaultOptions2 = _interopRequireDefault(_defaultOptions); -var _mergeOptions = __webpack_require__(144); +var _mergeOptions = __webpack_require__(146); var _mergeOptions2 = _interopRequireDefault(_mergeOptions); -var _web3Saga = __webpack_require__(49); +var _web3Saga = __webpack_require__(48); var _accountsSaga = __webpack_require__(44); var _accountBalancesSaga = __webpack_require__(27); -var _contractsSaga = __webpack_require__(45); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeDrizzle), @@ -3934,7 +4010,7 @@ var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeDrizzle), function initializeDrizzle(action) { - var options, web3Options, web3, i, contractConfig, events, contractName, drizzleContract, contractAddresses, contractNames, contract, interval; + var options, web3Options, drizzle, web3, i, contractConfig, events, contractName, interval; return _regenerator2.default.wrap(function initializeDrizzle$(_context) { while (1) { switch (_context.prev = _context.next) { @@ -3942,34 +4018,35 @@ function initializeDrizzle(action) { _context.prev = 0; options = (0, _mergeOptions2.default)(_defaultOptions2.default, action.options); web3Options = options.web3; + drizzle = action.drizzle; // Initialize web3 and get the current network ID. - _context.next = 5; + _context.next = 6; return (0, _effects.call)(_web3Saga.initializeWeb3, { options: web3Options }); - case 5: + case 6: web3 = _context.sent; - action.drizzle.web3 = web3; + drizzle.web3 = web3; - _context.next = 9; + _context.next = 10; return (0, _effects.call)(_web3Saga.getNetworkId, { web3: web3 }); - case 9: - _context.next = 11; + case 10: + _context.next = 12; return (0, _effects.call)(_accountsSaga.getAccounts, { web3: web3 }); - case 11: - _context.next = 13; + case 12: + _context.next = 14; return (0, _effects.call)(_accountBalancesSaga.getAccountBalances, { web3: web3 }); - case 13: + case 14: i = 0; - case 14: + case 15: if (!(i < options.contracts.length)) { - _context.next = 32; + _context.next = 25; break; } @@ -3982,104 +4059,72 @@ function initializeDrizzle(action) { events = options.events[contractName]; } - if (!contractConfig.web3Contract) { - _context.next = 25; - break; - } - _context.next = 22; - return (0, _effects.call)(_contractsSaga.instantiateWeb3Contract, { web3Contract: contractConfig.web3Contract, name: contractName, events: events, store: action.drizzle.store, web3: web3 }); + return (0, _effects.put)({ type: 'ADD_CONTRACT', drizzle: drizzle, contractConfig: contractConfig, events: events, web3: web3 }); case 22: - drizzleContract = _context.sent; - _context.next = 28; - break; - - case 25: - _context.next = 27; - return (0, _effects.call)(_contractsSaga.instantiateContract, { contractArtifact: contractConfig, events: events, store: action.drizzle.store, web3: web3 }); - - case 27: - drizzleContract = _context.sent; - - case 28: - - action.drizzle.contracts[contractName] = drizzleContract; - - case 29: i++; - _context.next = 14; + _context.next = 15; break; - case 32: - - // Collect contract addresses in an array for later comparison in txs. - contractAddresses = []; - contractNames = []; - - - for (contract in action.drizzle.contracts) { - contractNames.push(action.drizzle.contracts[contract].contractName); - contractAddresses.push(action.drizzle.contracts[contract].options.address.toLowerCase()); - } - + case 25: if (!web3.currentProvider.isMetaMask) { - _context.next = 41; + _context.next = 31; break; } // Using MetaMask, attempt block polling. interval = options.polls.blocks; - _context.next = 39; - return (0, _effects.put)({ type: 'BLOCKS_POLLING', contracts: action.drizzle.contracts, interval: interval, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + _context.next = 29; + return (0, _effects.put)({ type: 'BLOCKS_POLLING', drizzle: drizzle, interval: interval, web3: web3 }); - case 39: - _context.next = 43; + case 29: + _context.next = 33; break; - case 41: - _context.next = 43; - return (0, _effects.put)({ type: 'BLOCKS_LISTENING', contracts: action.drizzle.contracts, contractAddresses: contractAddresses, contractNames: contractNames, web3: web3 }); + case 31: + _context.next = 33; + return (0, _effects.put)({ type: 'BLOCKS_LISTENING', drizzle: drizzle, web3: web3 }); - case 43: + case 33: if (!('accounts' in options.polls)) { - _context.next = 46; + _context.next = 36; break; } - _context.next = 46; + _context.next = 36; return (0, _effects.put)({ type: 'ACCOUNTS_POLLING', interval: options.polls.accounts, web3: web3 }); - case 46: - _context.next = 55; + case 36: + _context.next = 45; break; - case 48: - _context.prev = 48; + case 38: + _context.prev = 38; _context.t0 = _context['catch'](0); - _context.next = 52; + _context.next = 42; return (0, _effects.put)({ type: 'DRIZZLE_FAILED', error: _context.t0 }); - case 52: + case 42: console.error('Error initializing Drizzle:'); console.error(_context.t0); return _context.abrupt('return'); - case 55: - _context.next = 57; + case 45: + _context.next = 47; return (0, _effects.put)({ type: 'DRIZZLE_INITIALIZED' }); - case 57: + case 47: return _context.abrupt('return'); - case 58: + case 48: case 'end': return _context.stop(); } } - }, _marked, this, [[0, 48]]); + }, _marked, this, [[0, 38]]); } function drizzleStatusSaga() { @@ -4101,7 +4146,7 @@ function drizzleStatusSaga() { exports.default = drizzleStatusSaga; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4137,7 +4182,7 @@ var accountsReducer = function accountsReducer() { exports.default = accountsReducer; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4147,7 +4192,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _defineProperty2 = __webpack_require__(50); +var _defineProperty2 = __webpack_require__(49); var _defineProperty3 = _interopRequireDefault(_defineProperty2); @@ -4173,7 +4218,7 @@ var accountBalancesReducer = function accountBalancesReducer() { exports.default = accountBalancesReducer; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4187,13 +4232,15 @@ var _toConsumableArray2 = __webpack_require__(30); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); -var _defineProperty2 = __webpack_require__(50); +var _defineProperty2 = __webpack_require__(49); var _defineProperty3 = _interopRequireDefault(_defineProperty2); -var _extends13 = __webpack_require__(14); +var _extends14 = __webpack_require__(14); + +var _extends15 = _interopRequireDefault(_extends14); -var _extends14 = _interopRequireDefault(_extends13); +var _generateContractInitialState = __webpack_require__(82); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -4207,8 +4254,12 @@ var contractsReducer = function contractsReducer() { * Contract Status */ + if (action.type === 'ADD_CONTRACT') { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.contractConfig.contractName, (0, _generateContractInitialState.generateContractInitialState)(action.contractConfig))); + } + if (action.type === 'CONTRACT_INITIALIZED') { - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends14.default)({}, state[action.name], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends15.default)({}, state[action.name], { initialized: true, synced: true, events: [] @@ -4218,19 +4269,19 @@ var contractsReducer = function contractsReducer() { if (action.type === 'CONTRACT_SYNCING') { var contractName = action.contract.contractName; - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, contractName, (0, _extends14.default)({}, state[contractName], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, contractName, (0, _extends15.default)({}, state[contractName], { synced: false }))); } if (action.type === 'CONTRACT_SYNCED') { - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, action.contractName, (0, _extends14.default)({}, state[action.contractName], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.contractName, (0, _extends15.default)({}, state[action.contractName], { synced: true }))); } if (action.type === 'CONTRACT_SYNC_IND') { - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, action.contractName, (0, _extends14.default)({}, state[action.contractName], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.contractName, (0, _extends15.default)({}, state[action.contractName], { synced: false }))); } @@ -4240,7 +4291,7 @@ var contractsReducer = function contractsReducer() { */ if (action.type === 'GOT_CONTRACT_VAR') { - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends14.default)({}, state[action.name], (0, _defineProperty3.default)({}, action.variable, (0, _extends14.default)({}, state[action.name][action.variable], (0, _defineProperty3.default)({}, action.argsHash, (0, _extends14.default)({}, state[action.name][action.variable][action.argsHash], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends15.default)({}, state[action.name], (0, _defineProperty3.default)({}, action.variable, (0, _extends15.default)({}, state[action.name][action.variable], (0, _defineProperty3.default)({}, action.argsHash, (0, _extends15.default)({}, state[action.name][action.variable][action.argsHash], { args: action.args, fnIndex: action.fnIndex, value: action.value @@ -4248,7 +4299,7 @@ var contractsReducer = function contractsReducer() { } if (action.type === 'ERROR_CONTRACT_VAR') { - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends14.default)({}, state[action.name], (0, _defineProperty3.default)({}, action.variable, (0, _extends14.default)({}, state[action.name][action.variable], (0, _defineProperty3.default)({}, action.argsHash, (0, _extends14.default)({}, state[action.name][action.variable][action.argsHash], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends15.default)({}, state[action.name], (0, _defineProperty3.default)({}, action.variable, (0, _extends15.default)({}, state[action.name][action.variable], (0, _defineProperty3.default)({}, action.argsHash, (0, _extends15.default)({}, state[action.name][action.variable][action.argsHash], { args: action.args, fnIndex: action.fnIndex, error: action.error @@ -4260,7 +4311,7 @@ var contractsReducer = function contractsReducer() { */ if (action.type === 'EVENT_FIRED') { - return (0, _extends14.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends14.default)({}, state[action.name], { + return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.name, (0, _extends15.default)({}, state[action.name], { events: [].concat((0, _toConsumableArray3.default)(state[action.name].events), [action.event]) }))); } @@ -4271,7 +4322,62 @@ var contractsReducer = function contractsReducer() { exports.default = contractsReducer; /***/ }), -/* 81 */ +/* 82 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.generateContractInitialState = generateContractInitialState; + +var _getAbi = __webpack_require__(83); + +var _getAbi2 = _interopRequireDefault(_getAbi); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function generateContractInitialState(contractConfig) { + var state = { + initialized: false, + synced: false + + // Constant getters + };var abi = (0, _getAbi2.default)(contractConfig); + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; + + if (item.type == "function" && item.constant === true) { + state[item.name] = {}; + } + } + + return state; +} + +/***/ }), +/* 83 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = getAbi; +function getAbi(contractEntry) { + if (contractEntry.web3Contract) { + return contractEntry.web3Contract.options.jsonInterface; + } else { + return contractEntry.abi; + } +} + +/***/ }), +/* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4310,7 +4416,7 @@ var drizzleStatusReducer = function drizzleStatusReducer() { exports.default = drizzleStatusReducer; /***/ }), -/* 82 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4324,7 +4430,7 @@ var _toConsumableArray2 = __webpack_require__(30); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); -var _defineProperty2 = __webpack_require__(50); +var _defineProperty2 = __webpack_require__(49); var _defineProperty3 = _interopRequireDefault(_defineProperty2); @@ -4373,7 +4479,7 @@ var transactionsReducer = function transactionsReducer() { exports.default = transactionsReducer; /***/ }), -/* 83 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4419,7 +4525,7 @@ var transactionStackReducer = function transactionStackReducer() { exports.default = transactionStackReducer; /***/ }), -/* 84 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4479,26 +4585,31 @@ var web3Reducer = function web3Reducer() { exports.default = web3Reducer; /***/ }), -/* 85 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = getAbi; -function getAbi(contractEntry) { - if (contractEntry.web3Contract) { - return contractEntry.web3Contract.options.jsonInterface; - } else { - return contractEntry.abi; +var _generateContractInitialState = __webpack_require__(82); + +function generateContractsInitialState(options) { + // Preloaded state + var contractsInitialState = {}; + + for (var i = 0; i < options.contracts.length; i++) { + // Initial contract details + var contractName = options.contracts[i].contractName; + contractsInitialState[contractName] = (0, _generateContractInitialState.generateContractInitialState)(options.contracts[i]); } + + return contractsInitialState; } +module.exports = generateContractsInitialState; + /***/ }), -/* 86 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4509,43 +4620,43 @@ Object.defineProperty(exports, "__esModule", { }); exports.drizzleSagas = exports.drizzleReducers = exports.generateStore = exports.generateContractsInitialState = exports.Drizzle = undefined; -var _Drizzle = __webpack_require__(87); +var _Drizzle = __webpack_require__(90); var _Drizzle2 = _interopRequireDefault(_Drizzle); -var _generateStore = __webpack_require__(108); +var _generateStore = __webpack_require__(113); var _generateStore2 = _interopRequireDefault(_generateStore); -var _generateContractsInitialState = __webpack_require__(150); +var _generateContractsInitialState = __webpack_require__(88); var _generateContractsInitialState2 = _interopRequireDefault(_generateContractsInitialState); -var _accountsReducer = __webpack_require__(78); +var _accountsReducer = __webpack_require__(79); var _accountsReducer2 = _interopRequireDefault(_accountsReducer); -var _accountBalancesReducer = __webpack_require__(79); +var _accountBalancesReducer = __webpack_require__(80); var _accountBalancesReducer2 = _interopRequireDefault(_accountBalancesReducer); -var _contractsReducer = __webpack_require__(80); +var _contractsReducer = __webpack_require__(81); var _contractsReducer2 = _interopRequireDefault(_contractsReducer); -var _drizzleStatusReducer = __webpack_require__(81); +var _drizzleStatusReducer = __webpack_require__(84); var _drizzleStatusReducer2 = _interopRequireDefault(_drizzleStatusReducer); -var _transactionsReducer = __webpack_require__(82); +var _transactionsReducer = __webpack_require__(85); var _transactionsReducer2 = _interopRequireDefault(_transactionsReducer); -var _transactionStackReducer = __webpack_require__(83); +var _transactionStackReducer = __webpack_require__(86); var _transactionStackReducer2 = _interopRequireDefault(_transactionStackReducer); -var _web3Reducer = __webpack_require__(84); +var _web3Reducer = __webpack_require__(87); var _web3Reducer2 = _interopRequireDefault(_web3Reducer); @@ -4557,19 +4668,19 @@ var _accountBalancesSaga = __webpack_require__(27); var _accountBalancesSaga2 = _interopRequireDefault(_accountBalancesSaga); -var _blocksSaga = __webpack_require__(73); +var _blocksSaga = __webpack_require__(74); var _blocksSaga2 = _interopRequireDefault(_blocksSaga); -var _contractsSaga = __webpack_require__(45); +var _contractsSaga = __webpack_require__(75); var _contractsSaga2 = _interopRequireDefault(_contractsSaga); -var _drizzleStatusSaga = __webpack_require__(77); +var _drizzleStatusSaga = __webpack_require__(78); var _drizzleStatusSaga2 = _interopRequireDefault(_drizzleStatusSaga); -var _web3Saga = __webpack_require__(49); +var _web3Saga = __webpack_require__(48); var _web3Saga2 = _interopRequireDefault(_web3Saga); @@ -4599,7 +4710,7 @@ exports.drizzleReducers = drizzleReducers; exports.drizzleSagas = drizzleSagas; /***/ }), -/* 87 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -4609,11 +4720,15 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _classCallCheck2 = __webpack_require__(51); +var _classCallCheck2 = __webpack_require__(50); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _promise = __webpack_require__(88); +var _createClass2 = __webpack_require__(51); + +var _createClass3 = _interopRequireDefault(_createClass2); + +var _promise = __webpack_require__(93); var _promise2 = _interopRequireDefault(_promise); @@ -4624,51 +4739,100 @@ var windowPromise = new _promise2.default(function (resolve, reject) { window.addEventListener('load', resolve); }); -var Drizzle = function Drizzle(options, store) { - var _this = this; +var Drizzle = function () { + function Drizzle(options, store) { + var _this = this; - (0, _classCallCheck3.default)(this, Drizzle); + (0, _classCallCheck3.default)(this, Drizzle); - // Variables - this.contracts = {}; - this.options = options; - this.store = store; - this.web3 = {}; + // Variables + this.contracts = {}; + this.contractList = []; + this.options = options; + this.store = store; + this.web3 = {}; - // Wait for window load event in case of injected web3. - windowPromise.then(function () { - // Begin Drizzle initialization. - store.dispatch({ type: 'DRIZZLE_INITIALIZING', drizzle: _this, options: options }); - }); -}; + // Wait for window load event in case of injected web3. + windowPromise.then(function () { + // Begin Drizzle initialization. + store.dispatch({ type: 'DRIZZLE_INITIALIZING', drizzle: _this, options: options }); + }); + } + + (0, _createClass3.default)(Drizzle, [{ + key: 'addContract', + value: function addContract(contractConfig) { + var events = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + this.store.dispatch({ type: 'ADD_CONTRACT', drizzle: this, contractConfig: contractConfig, events: events, web3: this.web3 }); + } + }, { + key: '_addContract', + value: function _addContract(drizzleContract) { + if (this.contracts[drizzleContract.contractName]) { + throw 'Contract already exists: ' + drizzleContract.contractName; + } + this.contracts[drizzleContract.contractName] = drizzleContract; + this.contractList.push(drizzleContract); + } + }, { + key: 'findContractByAddress', + value: function findContractByAddress(address) { + return this.contractList.find(function (contract) { + return contract.address.toLowerCase() === address.toLowerCase(); + }); + } + }]); + return Drizzle; +}(); exports.default = Drizzle; /***/ }), -/* 88 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(89), __esModule: true }; +__webpack_require__(92); +var $Object = __webpack_require__(2).Object; +module.exports = function defineProperty(it, key, desc) { + return $Object.defineProperty(it, key, desc); +}; + /***/ }), -/* 89 */ +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { + +var $export = __webpack_require__(4); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(3).f }); + + +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { + +module.exports = { "default": __webpack_require__(94), __esModule: true }; + +/***/ }), +/* 94 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(52); -__webpack_require__(31); -__webpack_require__(60); -__webpack_require__(99); -__webpack_require__(106); -__webpack_require__(107); +__webpack_require__(54); +__webpack_require__(33); +__webpack_require__(61); +__webpack_require__(104); +__webpack_require__(111); +__webpack_require__(112); module.exports = __webpack_require__(2).Promise; /***/ }), -/* 90 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(32); -var defined = __webpack_require__(33); +var toInteger = __webpack_require__(34); +var defined = __webpack_require__(35); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { @@ -4687,12 +4851,12 @@ module.exports = function (TO_STRING) { /***/ }), -/* 91 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var create = __webpack_require__(56); +var create = __webpack_require__(57); var descriptor = __webpack_require__(17); var setToStringTag = __webpack_require__(24); var IteratorPrototype = {}; @@ -4707,7 +4871,7 @@ module.exports = function (Constructor, NAME, next) { /***/ }), -/* 92 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(3); @@ -4726,14 +4890,14 @@ module.exports = __webpack_require__(6) ? Object.defineProperties : function def /***/ }), -/* 93 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(12); var toLength = __webpack_require__(36); -var toAbsoluteIndex = __webpack_require__(94); +var toAbsoluteIndex = __webpack_require__(99); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); @@ -4755,10 +4919,10 @@ module.exports = function (IS_INCLUDES) { /***/ }), -/* 94 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(32); +var toInteger = __webpack_require__(34); var max = Math.max; var min = Math.min; module.exports = function (index, length) { @@ -4768,7 +4932,7 @@ module.exports = function (index, length) { /***/ }), -/* 95 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) @@ -4787,13 +4951,13 @@ module.exports = Object.getPrototypeOf || function (O) { /***/ }), -/* 96 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var addToUnscopables = __webpack_require__(97); -var step = __webpack_require__(98); +var addToUnscopables = __webpack_require__(102); +var step = __webpack_require__(103); var Iterators = __webpack_require__(18); var toIObject = __webpack_require__(12); @@ -4801,7 +4965,7 @@ var toIObject = __webpack_require__(12); // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() -module.exports = __webpack_require__(53)(Array, 'Array', function (iterated, kind) { +module.exports = __webpack_require__(55)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind @@ -4828,14 +4992,14 @@ addToUnscopables('entries'); /***/ }), -/* 97 */ +/* 102 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), -/* 98 */ +/* 103 */ /***/ (function(module, exports) { module.exports = function (done, value) { @@ -4844,26 +5008,26 @@ module.exports = function (done, value) { /***/ }), -/* 99 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var LIBRARY = __webpack_require__(20); +var LIBRARY = __webpack_require__(21); var global = __webpack_require__(0); var ctx = __webpack_require__(15); -var classof = __webpack_require__(61); +var classof = __webpack_require__(62); var $export = __webpack_require__(4); var isObject = __webpack_require__(8); -var aFunction = __webpack_require__(21); -var anInstance = __webpack_require__(100); -var forOf = __webpack_require__(101); -var speciesConstructor = __webpack_require__(65); -var task = __webpack_require__(66).set; -var microtask = __webpack_require__(103)(); +var aFunction = __webpack_require__(20); +var anInstance = __webpack_require__(105); +var forOf = __webpack_require__(106); +var speciesConstructor = __webpack_require__(66); +var task = __webpack_require__(67).set; +var microtask = __webpack_require__(108)(); var newPromiseCapabilityModule = __webpack_require__(41); -var perform = __webpack_require__(67); -var promiseResolve = __webpack_require__(68); +var perform = __webpack_require__(68); +var promiseResolve = __webpack_require__(69); var PROMISE = 'Promise'; var TypeError = global.TypeError; var process = global.process; @@ -5026,7 +5190,7 @@ if (!USE_NATIVE) { this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n = false; // <- notify }; - Internal.prototype = __webpack_require__(104)($Promise.prototype, { + Internal.prototype = __webpack_require__(109)($Promise.prototype, { // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then: function then(onFulfilled, onRejected) { var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); @@ -5058,7 +5222,7 @@ if (!USE_NATIVE) { $export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); __webpack_require__(24)($Promise, PROMISE); -__webpack_require__(105)(PROMISE); +__webpack_require__(110)(PROMISE); Wrapper = __webpack_require__(2)[PROMISE]; // statics @@ -5077,7 +5241,7 @@ $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); } }); -$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(69)(function (iter) { +$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(70)(function (iter) { $Promise.all(iter)['catch'](empty); })), PROMISE, { // 25.4.4.1 Promise.all(iterable) @@ -5124,7 +5288,7 @@ $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(69)(function /***/ }), -/* 100 */ +/* 105 */ /***/ (function(module, exports) { module.exports = function (it, Constructor, name, forbiddenField) { @@ -5135,15 +5299,15 @@ module.exports = function (it, Constructor, name, forbiddenField) { /***/ }), -/* 101 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(15); -var call = __webpack_require__(62); -var isArrayIter = __webpack_require__(63); +var call = __webpack_require__(63); +var isArrayIter = __webpack_require__(64); var anObject = __webpack_require__(5); var toLength = __webpack_require__(36); -var getIterFn = __webpack_require__(64); +var getIterFn = __webpack_require__(65); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { @@ -5166,7 +5330,7 @@ exports.RETURN = RETURN; /***/ }), -/* 102 */ +/* 107 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 @@ -5188,11 +5352,11 @@ module.exports = function (fn, args, that) { /***/ }), -/* 103 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(0); -var macrotask = __webpack_require__(66).set; +var macrotask = __webpack_require__(67).set; var Observer = global.MutationObserver || global.WebKitMutationObserver; var process = global.process; var Promise = global.Promise; @@ -5262,7 +5426,7 @@ module.exports = function () { /***/ }), -/* 104 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { var hide = __webpack_require__(7); @@ -5275,7 +5439,7 @@ module.exports = function (target, src, safe) { /***/ }), -/* 105 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5296,7 +5460,7 @@ module.exports = function (KEY) { /***/ }), -/* 106 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5305,8 +5469,8 @@ module.exports = function (KEY) { var $export = __webpack_require__(4); var core = __webpack_require__(2); var global = __webpack_require__(0); -var speciesConstructor = __webpack_require__(65); -var promiseResolve = __webpack_require__(68); +var speciesConstructor = __webpack_require__(66); +var promiseResolve = __webpack_require__(69); $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { var C = speciesConstructor(this, core.Promise || global.Promise); @@ -5323,7 +5487,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { /***/ }), -/* 107 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5331,7 +5495,7 @@ $export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) { // https://github.com/tc39/proposal-promise-try var $export = __webpack_require__(4); var newPromiseCapability = __webpack_require__(41); -var perform = __webpack_require__(67); +var perform = __webpack_require__(68); $export($export.S, 'Promise', { 'try': function (callbackfn) { var promiseCapability = newPromiseCapability.f(this); @@ -5342,27 +5506,29 @@ $export($export.S, 'Promise', { 'try': function (callbackfn) { /***/ }), -/* 108 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _redux = __webpack_require__(70); +var _redux = __webpack_require__(71); var _reduxSaga = __webpack_require__(25); var _reduxSaga2 = _interopRequireDefault(_reduxSaga); -var _rootSaga = __webpack_require__(109); +var _rootSaga = __webpack_require__(114); var _rootSaga2 = _interopRequireDefault(_rootSaga); -var _reducer = __webpack_require__(149); +var _reducer = __webpack_require__(151); var _reducer2 = _interopRequireDefault(_reducer); -var _getAbi = __webpack_require__(85); +var _generateContractsInitialState = __webpack_require__(88); + +var _getAbi = __webpack_require__(83); var _getAbi2 = _interopRequireDefault(_getAbi); @@ -5373,29 +5539,8 @@ function generateStore(options) { var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || _redux.compose; // Preloaded state - var contractsInitialState = {}; - - for (var i = 0; i < options.contracts.length; i++) { - // Initial contract details - var contractName = options.contracts[i].contractName; - - contractsInitialState[contractName] = { - initialized: false, - synced: false - - // Constant getters - };var abi = (0, _getAbi2.default)(options.contracts[i]); - for (var i2 = 0; i2 < abi.length; i2++) { - var item = abi[i2]; - - if (item.type == "function" && item.constant === true) { - contractsInitialState[contractName][item.name] = {}; - } - } - } - var preloadedState = { - contracts: contractsInitialState + contracts: (0, _generateContractsInitialState.generateContractsInitialState)(options) // create the saga middleware };var sagaMiddleware = (0, _reduxSaga2.default)(); @@ -5410,7 +5555,7 @@ function generateStore(options) { module.exports = generateStore; /***/ }), -/* 109 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -5436,19 +5581,19 @@ var _accountBalancesSaga = __webpack_require__(27); var _accountBalancesSaga2 = _interopRequireDefault(_accountBalancesSaga); -var _blocksSaga = __webpack_require__(73); +var _blocksSaga = __webpack_require__(74); var _blocksSaga2 = _interopRequireDefault(_blocksSaga); -var _contractsSaga = __webpack_require__(45); +var _contractsSaga = __webpack_require__(75); var _contractsSaga2 = _interopRequireDefault(_contractsSaga); -var _drizzleStatusSaga = __webpack_require__(77); +var _drizzleStatusSaga = __webpack_require__(78); var _drizzleStatusSaga2 = _interopRequireDefault(_drizzleStatusSaga); -var _web3Saga = __webpack_require__(49); +var _web3Saga = __webpack_require__(48); var _web3Saga2 = _interopRequireDefault(_web3Saga); @@ -5473,7 +5618,7 @@ function root() { } /***/ }), -/* 110 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5498,7 +5643,7 @@ var oldRuntime = hadRuntime && g.regeneratorRuntime; // Force reevalutation of runtime.js. g.regeneratorRuntime = undefined; -module.exports = __webpack_require__(111); +module.exports = __webpack_require__(116); if (hadRuntime) { // Restore the original runtime. @@ -5514,7 +5659,7 @@ if (hadRuntime) { /***/ }), -/* 111 */ +/* 116 */ /***/ (function(module, exports) { /** @@ -6247,16 +6392,16 @@ if (hadRuntime) { /***/ }), -/* 112 */ +/* 117 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export takeEvery */ /* unused harmony export takeLatest */ /* unused harmony export throttle */ -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(113); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(115); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(116); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__takeEvery__ = __webpack_require__(118); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__takeLatest__ = __webpack_require__(120); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__throttle__ = __webpack_require__(121); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils__ = __webpack_require__(13); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__takeEvery__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_1__takeLatest__["a"]; }); @@ -6278,7 +6423,7 @@ var throttle = /*#__PURE__*/Object(__WEBPACK_IMPORTED_MODULE_3__utils__["g" /* d /***/ }), -/* 113 */ +/* 118 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6316,7 +6461,7 @@ function takeEvery(patternOrChannel, worker) { } /***/ }), -/* 114 */ +/* 119 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6387,7 +6532,7 @@ function flush() { } /***/ }), -/* 115 */ +/* 120 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6435,7 +6580,7 @@ function takeLatest(patternOrChannel, worker) { } /***/ }), -/* 116 */ +/* 121 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -6443,7 +6588,7 @@ function takeLatest(patternOrChannel, worker) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__fsmIterator__ = __webpack_require__(42); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__io__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__channel__ = __webpack_require__(43); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__buffers__ = __webpack_require__(72); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__buffers__ = __webpack_require__(73); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils__ = __webpack_require__(13); @@ -6492,41 +6637,41 @@ function throttle(delayLength, pattern, worker) { } /***/ }), -/* 117 */ +/* 122 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_117__; +module.exports = __WEBPACK_EXTERNAL_MODULE_122__; /***/ }), -/* 118 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(119); +__webpack_require__(124); module.exports = __webpack_require__(2).Object.assign; /***/ }), -/* 119 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(4); -$export($export.S + $export.F, 'Object', { assign: __webpack_require__(120) }); +$export($export.S + $export.F, 'Object', { assign: __webpack_require__(125) }); /***/ }), -/* 120 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(22); -var gOPS = __webpack_require__(46); +var gOPS = __webpack_require__(45); var pIE = __webpack_require__(29); var toObject = __webpack_require__(40); -var IObject = __webpack_require__(58); +var IObject = __webpack_require__(59); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) @@ -6557,22 +6702,22 @@ module.exports = !$assign || __webpack_require__(16)(function () { /***/ }), -/* 121 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(122), __esModule: true }; +module.exports = { "default": __webpack_require__(127), __esModule: true }; /***/ }), -/* 122 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(31); -__webpack_require__(123); +__webpack_require__(33); +__webpack_require__(128); module.exports = __webpack_require__(2).Array.from; /***/ }), -/* 123 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6580,13 +6725,13 @@ module.exports = __webpack_require__(2).Array.from; var ctx = __webpack_require__(15); var $export = __webpack_require__(4); var toObject = __webpack_require__(40); -var call = __webpack_require__(62); -var isArrayIter = __webpack_require__(63); +var call = __webpack_require__(63); +var isArrayIter = __webpack_require__(64); var toLength = __webpack_require__(36); -var createProperty = __webpack_require__(124); -var getIterFn = __webpack_require__(64); +var createProperty = __webpack_require__(129); +var getIterFn = __webpack_require__(65); -$export($export.S + $export.F * !__webpack_require__(69)(function (iter) { Array.from(iter); }), 'Array', { +$export($export.S + $export.F * !__webpack_require__(70)(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); @@ -6616,7 +6761,7 @@ $export($export.S + $export.F * !__webpack_require__(69)(function (iter) { Array /***/ }), -/* 124 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6631,39 +6776,39 @@ module.exports = function (object, index, value) { /***/ }), -/* 125 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(126), __esModule: true }; +module.exports = { "default": __webpack_require__(131), __esModule: true }; /***/ }), -/* 126 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(31); -__webpack_require__(60); -module.exports = __webpack_require__(47).f('iterator'); +__webpack_require__(33); +__webpack_require__(61); +module.exports = __webpack_require__(46).f('iterator'); /***/ }), -/* 127 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(128), __esModule: true }; +module.exports = { "default": __webpack_require__(133), __esModule: true }; /***/ }), -/* 128 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(129); -__webpack_require__(52); -__webpack_require__(135); -__webpack_require__(136); +__webpack_require__(134); +__webpack_require__(54); +__webpack_require__(140); +__webpack_require__(141); module.exports = __webpack_require__(2).Symbol; /***/ }), -/* 129 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -6673,25 +6818,25 @@ var global = __webpack_require__(0); var has = __webpack_require__(9); var DESCRIPTORS = __webpack_require__(6); var $export = __webpack_require__(4); -var redefine = __webpack_require__(55); -var META = __webpack_require__(130).KEY; +var redefine = __webpack_require__(56); +var META = __webpack_require__(135).KEY; var $fails = __webpack_require__(16); var shared = __webpack_require__(38); var setToStringTag = __webpack_require__(24); var uid = __webpack_require__(23); var wks = __webpack_require__(1); -var wksExt = __webpack_require__(47); -var wksDefine = __webpack_require__(48); -var enumKeys = __webpack_require__(131); -var isArray = __webpack_require__(132); +var wksExt = __webpack_require__(46); +var wksDefine = __webpack_require__(47); +var enumKeys = __webpack_require__(136); +var isArray = __webpack_require__(137); var anObject = __webpack_require__(5); var isObject = __webpack_require__(8); var toIObject = __webpack_require__(12); -var toPrimitive = __webpack_require__(35); +var toPrimitive = __webpack_require__(32); var createDesc = __webpack_require__(17); -var _create = __webpack_require__(56); -var gOPNExt = __webpack_require__(133); -var $GOPD = __webpack_require__(134); +var _create = __webpack_require__(57); +var gOPNExt = __webpack_require__(138); +var $GOPD = __webpack_require__(139); var $DP = __webpack_require__(3); var $keys = __webpack_require__(22); var gOPD = $GOPD.f; @@ -6816,11 +6961,11 @@ if (!USE_NATIVE) { $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; - __webpack_require__(75).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(77).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(29).f = $propertyIsEnumerable; - __webpack_require__(46).f = $getOwnPropertySymbols; + __webpack_require__(45).f = $getOwnPropertySymbols; - if (DESCRIPTORS && !__webpack_require__(20)) { + if (DESCRIPTORS && !__webpack_require__(21)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } @@ -6904,7 +7049,7 @@ setToStringTag(global.JSON, 'JSON', true); /***/ }), -/* 130 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(23)('meta'); @@ -6963,12 +7108,12 @@ var meta = module.exports = { /***/ }), -/* 131 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(22); -var gOPS = __webpack_require__(46); +var gOPS = __webpack_require__(45); var pIE = __webpack_require__(29); module.exports = function (it) { var result = getKeys(it); @@ -6984,7 +7129,7 @@ module.exports = function (it) { /***/ }), -/* 132 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) @@ -6995,12 +7140,12 @@ module.exports = Array.isArray || function isArray(arg) { /***/ }), -/* 133 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(12); -var gOPN = __webpack_require__(75).f; +var gOPN = __webpack_require__(77).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames @@ -7020,15 +7165,15 @@ module.exports.f = function getOwnPropertyNames(it) { /***/ }), -/* 134 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(29); var createDesc = __webpack_require__(17); var toIObject = __webpack_require__(12); -var toPrimitive = __webpack_require__(35); +var toPrimitive = __webpack_require__(32); var has = __webpack_require__(9); -var IE8_DOM_DEFINE = __webpack_require__(54); +var IE8_DOM_DEFINE = __webpack_require__(53); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, P) { @@ -7042,21 +7187,21 @@ exports.f = __webpack_require__(6) ? gOPD : function getOwnPropertyDescriptor(O, /***/ }), -/* 135 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(48)('asyncIterator'); +__webpack_require__(47)('asyncIterator'); /***/ }), -/* 136 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(48)('observable'); +__webpack_require__(47)('observable'); /***/ }), -/* 137 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7066,11 +7211,11 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _stringify = __webpack_require__(138); +var _stringify = __webpack_require__(143); var _stringify2 = _interopRequireDefault(_stringify); -var _typeof2 = __webpack_require__(74); +var _typeof2 = __webpack_require__(76); var _typeof3 = _interopRequireDefault(_typeof2); @@ -7078,11 +7223,11 @@ var _assign = __webpack_require__(28); var _assign2 = _interopRequireDefault(_assign); -var _classCallCheck2 = __webpack_require__(51); +var _classCallCheck2 = __webpack_require__(50); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); -var _createClass2 = __webpack_require__(140); +var _createClass2 = __webpack_require__(51); var _createClass3 = _interopRequireDefault(_createClass2); @@ -7094,6 +7239,7 @@ var DrizzleContract = function () { (0, _classCallCheck3.default)(this, DrizzleContract); this.abi = web3Contract.options.jsonInterface; + this.address = web3Contract.options.address; this.web3 = web3; this.contractName = name; this.store = store; @@ -7218,13 +7364,13 @@ var DrizzleContract = function () { exports.default = DrizzleContract; /***/ }), -/* 138 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = { "default": __webpack_require__(139), __esModule: true }; +module.exports = { "default": __webpack_require__(144), __esModule: true }; /***/ }), -/* 139 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(2); @@ -7235,60 +7381,7 @@ module.exports = function stringify(it) { // eslint-disable-line no-unused-vars /***/ }), -/* 140 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -exports.__esModule = true; - -var _defineProperty = __webpack_require__(76); - -var _defineProperty2 = _interopRequireDefault(_defineProperty); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -exports.default = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - (0, _defineProperty2.default)(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; -}(); - -/***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - -__webpack_require__(142); -var $Object = __webpack_require__(2).Object; -module.exports = function defineProperty(it, key, desc) { - return $Object.defineProperty(it, key, desc); -}; - - -/***/ }), -/* 142 */ -/***/ (function(module, exports, __webpack_require__) { - -var $export = __webpack_require__(4); -// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) -$export($export.S + $export.F * !__webpack_require__(6), 'Object', { defineProperty: __webpack_require__(3).f }); - - -/***/ }), -/* 143 */ +/* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7317,7 +7410,7 @@ var defaultOptions = { exports.default = defaultOptions; /***/ }), -/* 144 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7333,16 +7426,16 @@ exports.default = function (defaultOptions, newOptions) { }); }; -var _deepmerge = __webpack_require__(145); +var _deepmerge = __webpack_require__(147); var _deepmerge2 = _interopRequireDefault(_deepmerge); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var isPlainObject = __webpack_require__(146); +var isPlainObject = __webpack_require__(148); /***/ }), -/* 145 */ +/* 147 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -7439,7 +7532,7 @@ var deepmerge_1 = deepmerge; /***/ }), -/* 146 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7452,7 +7545,7 @@ var deepmerge_1 = deepmerge; -var isObject = __webpack_require__(147); +var isObject = __webpack_require__(149); function isObjectObject(o) { return isObject(o) === true @@ -7483,7 +7576,7 @@ module.exports = function isPlainObject(o) { /***/ }), -/* 147 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7502,13 +7595,13 @@ module.exports = function isObject(val) { /***/ }), -/* 148 */ +/* 150 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_148__; +module.exports = __WEBPACK_EXTERNAL_MODULE_150__; /***/ }), -/* 149 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7518,33 +7611,33 @@ Object.defineProperty(exports, "__esModule", { value: true }); -var _redux = __webpack_require__(70); +var _redux = __webpack_require__(71); -var _accountsReducer = __webpack_require__(78); +var _accountsReducer = __webpack_require__(79); var _accountsReducer2 = _interopRequireDefault(_accountsReducer); -var _accountBalancesReducer = __webpack_require__(79); +var _accountBalancesReducer = __webpack_require__(80); var _accountBalancesReducer2 = _interopRequireDefault(_accountBalancesReducer); -var _contractsReducer = __webpack_require__(80); +var _contractsReducer = __webpack_require__(81); var _contractsReducer2 = _interopRequireDefault(_contractsReducer); -var _drizzleStatusReducer = __webpack_require__(81); +var _drizzleStatusReducer = __webpack_require__(84); var _drizzleStatusReducer2 = _interopRequireDefault(_drizzleStatusReducer); -var _transactionsReducer = __webpack_require__(82); +var _transactionsReducer = __webpack_require__(85); var _transactionsReducer2 = _interopRequireDefault(_transactionsReducer); -var _transactionStackReducer = __webpack_require__(83); +var _transactionStackReducer = __webpack_require__(86); var _transactionStackReducer2 = _interopRequireDefault(_transactionStackReducer); -var _web3Reducer = __webpack_require__(84); +var _web3Reducer = __webpack_require__(87); var _web3Reducer2 = _interopRequireDefault(_web3Reducer); @@ -7562,48 +7655,7 @@ var reducer = (0, _redux.combineReducers)({ exports.default = reducer; -/***/ }), -/* 150 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _getAbi = __webpack_require__(85); - -var _getAbi2 = _interopRequireDefault(_getAbi); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function generateContractsInitialState(options) { - // Preloaded state - var contractsInitialState = {}; - - for (var i = 0; i < options.contracts.length; i++) { - // Initial contract details - var contractName = options.contracts[i].contractName; - - contractsInitialState[contractName] = { - initialized: false, - synced: false - - // Constant getters - };var abi = (0, _getAbi2.default)(options.contracts[i]); - for (var i2 = 0; i2 < abi.length; i2++) { - var item = abi[i2]; - - if (item.type == "function" && item.constant === true) { - contractsInitialState[contractName][item.name] = {}; - } - } - } - - return contractsInitialState; -} - -module.exports = generateContractsInitialState; - /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCBiNDE4OTFhZGYxOTFhY2VmMDhjMSIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19vYmplY3QtZHAuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19leHBvcnQuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R1bGVzL19hbi1vYmplY3QuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9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FjdGlvbikge1xuICAgICAgICAgIGNhc2UgT05fT1ZFUkZMT1dfVEhST1c6XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoQlVGRkVSX09WRVJGTE9XKTtcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX1NMSURFOlxuICAgICAgICAgICAgYXJyW3B1c2hJbmRleF0gPSBpdDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IChwdXNoSW5kZXggKyAxKSAlIGxpbWl0O1xuICAgICAgICAgICAgcG9wSW5kZXggPSBwdXNoSW5kZXg7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3VibGVkTGltaXQ7XG4gICAgICAgICAgICBsaW1pdCA9IGRvdWJsZWRMaW1pdDtcblxuICAgICAgICAgICAgcHVzaChpdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIC8vIERST1BcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgdGFrZTogdGFrZSxcbiAgICBmbHVzaDogZmx1c2hcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBidWZmZXJzID0ge1xuICBub25lOiBmdW5jdGlvbiBub25lKCkge1xuICAgIHJldHVybiB6ZXJvQnVmZmVyO1xuICB9LFxuICBmaXhlZDogZnVuY3Rpb24gZml4ZWQobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1df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nR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnc3VjY2VzcycsXG4gICAgICAgICAgICAgICAgcmVjZWlwdDogYWN0aW9uLnJlY2VpcHRcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfRVJST1InKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgc3RhdHVzOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgIGVycm9yOiBhY3Rpb24uZXJyb3JcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBzdGF0ZVxufVxuXG5leHBvcnQgZGVmYXVsdCB0cmFuc2FjdGlvbnNSZWR1Y2VyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvdHJhbnNhY3Rpb25zL3R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oY29udGV4dC5tZXRob2QgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIGlmIChzdGF0ZSA9PT0gR2VuU3RhdGVTdXNwZW5kZWRTdGFydCkge1xuICAgICAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUNvbXBsZXRlZDtcbiAgICAgICAgICAgIHRocm93IGNvbnRleHQuYXJnO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpO1xuXG4gICAgICAgIH0gZWxzZSBpZiAoY29udGV4dC5tZXRob2QgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgICBjb250ZXh0LmFicnVwdChcInJldHVyblwiLCBjb250ZXh0LmFyZyk7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0ZSA9IEdlblN0YXRlRXhlY3V0aW5nO1xuXG4gICAgICAgIHZhciByZWNvcmQgPSB0cnlDYXRjaChpbm5lckZuLCBzZWxmLCBjb250ZXh0KTtcbiAgICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiKSB7XG4gICAgICAgICAgLy8gSWYgYW4gZXhjZXB0aW9uIGlzIHRocm93biBmcm9tIGlubmVyRm4sIHdlIGxlYXZlIHN0YXRlID09PVxuICAgICAgICAgIC8vIEdlblN0YXRlRXhlY3V0aW5nIGFuZCBsb29wIGJhY2sgZm9yIGFub3RoZXIgaW52b2NhdGlvbi5cbiAgICAgICAgICBzdGF0ZSA9IGNvbnRleHQuZG9uZVxuICAgICAgICAgICAgPyBHZW5TdGF0ZUNvbXBsZXRlZFxuICAgICAgICAgICAgOiBHZW5TdGF0ZVN1c3BlbmRlZFlpZWxkO1xuXG4gICAgICAgICAgaWYgKHJlY29yZC5hcmcgPT09IENvbnRpbnVlU2VudGluZWwpIHtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB2YWx1ZT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yYXRvclN5bWJvbF07XG4gICAgICBpZiAoaXRlcmF0b3JNZXRob2QpIHtcbiAgICAgICAgcmV0dXJuIGl0ZXJhdG9yTWV0aG9kLmNhbGwoaXRlcmFibGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAodHlwZW9mIGl0ZXJhYmxlLm5leHQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICByZXR1cm4gaXRlcmFibGU7XG4gICAgICB9XG5cbiAgICAgIGlmICghaXNOYU4oaXRlcmFibGUubGVuZ3RoKSkge1xuICAgICAgICB2YXIgaSA9IC0xLCBuZXh0ID0gZnVuY3Rpb24gbmV4dCgpIHtcbiAgICAgICAgICB3aGlsZSAoKytpIDwgaXRlcmFibGUubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaGFzT3duLmNhbGwoaXRlcmFibGUsIGkpKSB7XG4gICAgICAgICAgICAgIG5leHQudmFsdWUgPSBpdGVyYWJsZVtpXTtcbiAgICAgICAgICAgICAgbmV4dC5kb25lID0gZmFsc2U7XG4gICAgICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIG5leHQudmFsdWUgPSB1bmRlZmluZWQ7XG4gICAgICAgICAgbmV4dC5kb25lID0gdHJ1ZTtcblxuICAgICAgICAgIHJldHVybiBuZXh0O1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBuZXh0Lm5leHQgPSBuZXh0O1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFJldHVybiBhbiBpdGVyYXRvciB3aXRoIG5vIHZhbHVlcy5cbiAgICByZXR1cm4geyBuZXh0OiBkb25lUmVzdWx0IH07XG4gIH1cbiAgcnVudGltZS52YWx1ZXMgPSB2YWx1ZXM7XG5cbiAgZnVuY3Rpb24gZG9uZVJlc3VsdCgpIHtcbiAgICByZXR1cm4geyB2YWx1ZTogdW5kZWZpbmVkLCBkb25lOiB0cnVlIH07XG4gIH1cblxuICBDb250Z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Y2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID0gZW50cnkuY29tcGxldGlvbjtcbiAgICAgICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgICAgdmFyIHRocm93biA9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G9wdGlvbnMuY29udHJhY3RzW2ldKVxuICAgIGZvciAodmFyIGkyID0gMDsgaTIgPCBhYmkubGVuZ3RoOyBpMisrKSB7XG4gICAgICB2YXIgaXRlbSA9IGFiaVtpMl07XG5cbiAgICAgIGlmIChpdGVtLnR5cGUgPT0gXCJmdW5jdGlvblwiICYmIGl0ZW0uY29uc3RhbnQgPT09IHRydWUpIHtcbiAgICAgICAgY29udHJhY3RzSW5pdGlhbFN0YXRlW2NvbnRyYWN0TmFtZV1baXRlbS5uYW1lXSA9IHt9XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGNvbnRyYWN0c0luaXRpYWxTdGF0ZVxufVxuXG5tb2R1bGUuZXhwb3J0cyA9IGdlbmVyYXRlQ29udHJhY3RzSW5pdGlhbFN0YXRlXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvZ2VuZXJhdGVDb250cmFjdHNJbml0aWFsU3RhdGUuanMiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAyMDI3ZDY4NjUyOTY5YTE1OWNkYyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2R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FjdGlvbi50eXBlID09PSAnVFhfQlJPQURDQVNURUQnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgc3RhdHVzOiAncGVuZGluZycsXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW11cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0NPTkZJUk1BSVRPTicpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXG4gICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLmNvbmZpcm1hdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5jb25maXJtYXRpb25SZWNlaXB0XG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfU1VDQ0VTU0ZVTCcpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdzdWNjZXNzJyxcbiAgICAgICAgICAgICAgICByZWNlaXB0OiBhY3Rpb24ucmVjZWlwdFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICBpZiAoYWN0aW9uLnR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ChyZWFjdGlvbikge1xuICAgICAgdmFyIGhhbmRsZXIgPSBvayA/IHJlYWN0aW9uLm9rIDogcmVhY3Rpb24uZmFpbDtcbiAgICAgIHZhciByZXNvbHZlID0gcmVhY3Rpb24ucmVzb2x2ZTtcbiAgICAgIHZhciByZWplY3QgPSByZWFjdGlvbi5yZWplY3Q7XG4gICAgICB2YXIgZG9tYWluID0gcmVhY3Rpb24uZG9tYWluO1xuICAgICAgdmFyIHJlc3VsdCwgdGhlbjtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge1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GNvbnRleHQuX3NlbnQgPSBjb250ZXh0LmFyZztcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBpZiAoc3RhdGUgPT09IEdlblN0YXRlU3VzcGVuZGVkU3RhcnQpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51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1ldGhvZF07XG4gICAgaWYgKG1ldGhvZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAvLyBBIC50aHJvdyBvciAucmV0dXJuIHdoZW4gdGhlIGRlbGVnYXRlIGl0ZXJhdG9yIGhhcyBubyAudGhyb3dcbiAgICAgIC8vIG1ldGhvZCBhbHdheXMgdGVybWluYXRlcyB0aGUgeWllbGQqIGxvb3AuXG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcblxuICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgaWYgKGRlbGVnYXRlLml0ZXJhdG9yLnJldHVybikge1xuICAgICAgICAgIC8vIElmIHRoZSBkZWxlZ2F0ZSBpdGVyYXRvciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAvLyBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyBU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AgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIHN0b3A6IGZ1bmN0aW9uKCkge1xuICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgIHJlY29yZC5hcmcgPSBleGNlcHRpb247XG4gICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGRpc3BhdGNoZWQgZXhjZXB0aW9uIHdhcyBjYXVnaHQgYnkgYSBjYXRjaCBibG9jayxcbiAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIGhhbmRsZSB0aGUgZXhjZXB0aW9uIG5vcm1hbGx5LlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gISEgY2F1Z2h0O1xuICAgICAgfVxuXG4g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xuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICByZWNvcmQuYXJnID0gYXJnO1xuXG4gICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgIHRoaXMubmV4dCA9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMuY29tcGxldGUocmVjb3JkKTtcbiAgICB9LFxuXG4gICAgY29tcGxldGU6IGZ1bmN0aW9uKHJlY29yZCwgYWZ0ZXJMb2MpIHtcbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgcmVjb3JkLnR5cGUgPT09IFwiY29udGludWVcIikge1xuICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgfSBlbHNlIGlmIChyZWN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1Y2VyID0gY29tYmluZVJlZHVjZXJzKHtcbiAgYWNjb3VudHM6IGFjY291bnRzUmVkdWNlcixcbiAgYWNjb3VudEJhbGFuY2VzOiBhY2NvdW50QmFsYW5jZXNSZWR1Y2VyLFxuICBjb250cmFjdHM6IGNvbnRyYWN0c1JlZHVjZXIsXG4gIGRyaXp6bGVTdGF0dXM6IGRyaXp6bGVTdGF0dXNSZWR1Y2VyLFxuICB0cmFuc2FjdGlvbnM6IHRyYW5zYWN0aW9uc1JlZHVjZXIsXG4gIHRyYW5zYWN0aW9uU3RhY2s6IHRyYW5zYWN0aW9uU3RhY2tSZWR1Y2VyLFxuICB3ZWIzOiB3ZWIzUmVkdWNlclxufSlcblxuZXhwb3J0IGRlZmF1bHQgcmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3JlZHVjZXIuanMiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/src/Drizzle.js b/src/Drizzle.js index f3970f67..b23bfb58 100644 --- a/src/Drizzle.js +++ b/src/Drizzle.js @@ -7,6 +7,7 @@ class Drizzle { constructor(options, store) { // Variables this.contracts = {} + this.contractList = [] this.options = options this.store = store this.web3 = {} @@ -17,6 +18,22 @@ class Drizzle { store.dispatch({type: 'DRIZZLE_INITIALIZING', drizzle: this, options}) }) } + + addContract (contractConfig, events = []) { + this.store.dispatch({type: 'ADD_CONTRACT', drizzle: this, contractConfig, events, web3: this.web3}) + } + + _addContract (drizzleContract) { + if (this.contracts[drizzleContract.contractName]) { throw `Contract already exists: ${drizzleContract.contractName}` } + this.contracts[drizzleContract.contractName] = drizzleContract + this.contractList.push(drizzleContract) + } + + findContractByAddress (address) { + return this.contractList.find((contract) => { + return contract.address.toLowerCase() === address.toLowerCase() + }) + } } export default Drizzle diff --git a/src/DrizzleContract.js b/src/DrizzleContract.js index 8a8f0fed..67d19de8 100644 --- a/src/DrizzleContract.js +++ b/src/DrizzleContract.js @@ -1,6 +1,7 @@ class DrizzleContract { constructor(web3Contract, web3, name, store, events = []) { this.abi = web3Contract.options.jsonInterface + this.address = web3Contract.options.address this.web3 = web3 this.contractName = name this.store = store diff --git a/src/blocks/blocksSaga.js b/src/blocks/blocksSaga.js index 6db16f2c..2187ad7a 100644 --- a/src/blocks/blocksSaga.js +++ b/src/blocks/blocksSaga.js @@ -6,7 +6,7 @@ const BlockTracker = require('eth-block-tracker') * Listen for Blocks */ -function createBlockChannel({contracts, contractAddresses, contractNames, web3}) { +function createBlockChannel({drizzle, web3}) { return eventChannel(emit => { const blockEvents = web3.eth.subscribe('newBlockHeaders', (error, result) => { if (error) @@ -20,7 +20,7 @@ function createBlockChannel({contracts, contractAddresses, contractNames, web3}) } }) .on('data', (blockHeader) => { - emit({type: 'BLOCK_RECEIVED', blockHeader, contracts, contractAddresses, contractNames, web3}) + emit({type: 'BLOCK_RECEIVED', blockHeader, drizzle, web3}) }) .on('error', error => { emit({type: 'BLOCKS_FAILED', error}) @@ -35,8 +35,8 @@ function createBlockChannel({contracts, contractAddresses, contractNames, web3}) }) } -function* callCreateBlockChannel({contracts, contractAddresses, contractNames, web3}) { - const blockChannel = yield call(createBlockChannel, {contracts, contractAddresses, contractNames, web3}) +function* callCreateBlockChannel({drizzle, web3}) { + const blockChannel = yield call(createBlockChannel, {drizzle, web3}) try { while (true) { @@ -52,12 +52,12 @@ function* callCreateBlockChannel({contracts, contractAddresses, contractNames, w * Poll for Blocks */ -function createBlockPollChannel({contracts, contractAddresses, contractNames, interval, web3}) { +function createBlockPollChannel({drizzle, interval, web3}) { return eventChannel(emit => { const blockTracker = new BlockTracker({ provider: web3.currentProvider, pollingInterval: interval}) blockTracker.on('latest', (block) => { - emit({type: 'BLOCK_FOUND', block, contracts, contractAddresses, contractNames, web3}) + emit({type: 'BLOCK_FOUND', block, drizzle, web3}) }) blockTracker @@ -75,8 +75,8 @@ function createBlockPollChannel({contracts, contractAddresses, contractNames, in }) } -function* callCreateBlockPollChannel({contracts, contractAddresses, contractNames, interval, web3}) { - const blockChannel = yield call(createBlockPollChannel, {contracts, contractAddresses, contractNames, interval, web3}) +function* callCreateBlockPollChannel({drizzle, interval, web3}) { + const blockChannel = yield call(createBlockPollChannel, {drizzle, interval, web3}) try { while (true) { @@ -92,13 +92,13 @@ function* callCreateBlockPollChannel({contracts, contractAddresses, contractName * Process Blocks */ -function* processBlockHeader({blockHeader, contracts, contractAddresses, contractNames, web3}) { +function* processBlockHeader({blockHeader, drizzle, web3}) { const blockNumber = blockHeader.number try { const block = yield call(web3.eth.getBlock, blockNumber, true) - yield call(processBlock, {block, contracts, contractAddresses, contractNames, web3}) + yield call(processBlock, {block, drizzle, web3}) } catch (error) { console.error('Error in block processing:') @@ -110,7 +110,7 @@ function* processBlockHeader({blockHeader, contracts, contractAddresses, contrac } } -function* processBlock({block, contracts, contractAddresses, contractNames, web3}) { +function* processBlock({block, drizzle, web3}) { try { const txs = block.transactions @@ -120,14 +120,15 @@ function* processBlock({block, contracts, contractAddresses, contractNames, web3 for (var i = 0; i < txs.length; i++) { var from = txs[i].from || '' - var to = txs[i].to || '' - - if (contractAddresses.indexOf(from.toLowerCase()) !== -1 || contractAddresses.indexOf(to.toLowerCase()) !== -1) - { - const index = contractAddresses.indexOf(txs[i].from.toLowerCase()) !== -1 ? contractAddresses.indexOf(txs[i].from.toLowerCase()) : contractAddresses.indexOf(txs[i].to.toLowerCase()) - const contractName = contractNames[index] + var fromContract = drizzle.findContractByAddress(from.toLowerCase()) + if (fromContract) { + yield put({type: 'CONTRACT_SYNCING', contract: fromContract}) + } - yield put({type: 'CONTRACT_SYNCING', contract: contracts[contractName]}) + var to = txs[i].to || '' + var toContract = drizzle.findContractByAddress(to.toLowerCase()) + if (toContract) { + yield put({type: 'CONTRACT_SYNCING', contract: toContract}) } } } diff --git a/src/contracts/contractsReducer.js b/src/contracts/contractsReducer.js index 1d8994b5..957eaace 100644 --- a/src/contracts/contractsReducer.js +++ b/src/contracts/contractsReducer.js @@ -1,3 +1,5 @@ +import { generateContractInitialState } from '../generateContractInitialState' + const initialState = {} const contractsReducer = (state = initialState, action) => { @@ -5,6 +7,13 @@ const contractsReducer = (state = initialState, action) => { * Contract Status */ + if (action.type === 'ADD_CONTRACT') { + return { + ...state, + [action.contractConfig.contractName]: generateContractInitialState(action.contractConfig) + } + } + if (action.type === 'CONTRACT_INITIALIZED') { return { diff --git a/src/contracts/contractsSaga.js b/src/contracts/contractsSaga.js index c8737499..f684788e 100644 --- a/src/contracts/contractsSaga.js +++ b/src/contracts/contractsSaga.js @@ -2,6 +2,15 @@ import { END, eventChannel } from 'redux-saga' import { call, put, select, take, takeLatest, takeEvery } from 'redux-saga/effects' import DrizzleContract from '../DrizzleContract' +export function* addContract({drizzle, contractConfig, events, web3}) { + if (contractConfig.web3Contract) { + var drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events, store: drizzle.store, web3}) + } else { + drizzleContract = yield call(instantiateContract, {contractArtifact: contractConfig, events, store: drizzle.store, web3}) + } + drizzle._addContract(drizzleContract) +} + /* * Instantiation */ @@ -246,6 +255,7 @@ function* contractsSaga() { yield takeEvery('CALL_CONTRACT_FN', callCallContractFn) yield takeEvery('CONTRACT_SYNCING', callSyncContract) yield takeEvery('LISTEN_FOR_EVENT', callListenForContractEvent) + yield takeEvery('ADD_CONTRACT', addContract) } export default contractsSaga; diff --git a/src/drizzleStatus/drizzleStatusSaga.js b/src/drizzleStatus/drizzleStatusSaga.js index 060aabd1..fa2511e4 100644 --- a/src/drizzleStatus/drizzleStatusSaga.js +++ b/src/drizzleStatus/drizzleStatusSaga.js @@ -6,16 +6,16 @@ import merge from '../mergeOptions' import { initializeWeb3, getNetworkId } from '../web3/web3Saga' import { getAccounts } from '../accounts/accountsSaga' import { getAccountBalances } from '../accountBalances/accountBalancesSaga' -import { instantiateContract, instantiateWeb3Contract } from '../contracts/contractsSaga' function* initializeDrizzle(action) { try { const options = merge(defaultOptions, action.options) const web3Options = options.web3 + const drizzle = action.drizzle // Initialize web3 and get the current network ID. var web3 = yield call(initializeWeb3, {options: web3Options}) - action.drizzle.web3 = web3 + drizzle.web3 = web3 yield call(getNetworkId, {web3}) @@ -34,34 +34,17 @@ function* initializeDrizzle(action) { events = options.events[contractName] } - if (contractConfig.web3Contract) { - var drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractName, events, store: action.drizzle.store, web3}) - } else { - drizzleContract = yield call(instantiateContract, {contractArtifact: contractConfig, events, store: action.drizzle.store, web3}) - } - - action.drizzle.contracts[contractName] = drizzleContract - } - - // Collect contract addresses in an array for later comparison in txs. - var contractAddresses = [] - var contractNames = [] - - for (var contract in action.drizzle.contracts) - { - contractNames.push(action.drizzle.contracts[contract].contractName) - contractAddresses.push(action.drizzle.contracts[contract].options.address.toLowerCase()) + yield put({type: 'ADD_CONTRACT', drizzle, contractConfig, events, web3}) } if (web3.currentProvider.isMetaMask) { // Using MetaMask, attempt block polling. const interval = options.polls.blocks - - yield put({type: 'BLOCKS_POLLING', contracts: action.drizzle.contracts, interval, contractAddresses, contractNames, web3}) + yield put({type: 'BLOCKS_POLLING', drizzle, interval, web3}) } else { // Not using MetaMask, attempt subscription block listening. - yield put({type: 'BLOCKS_LISTENING', contracts: action.drizzle.contracts, contractAddresses, contractNames, web3}) + yield put({type: 'BLOCKS_LISTENING', drizzle, web3}) } // Accounts Polling diff --git a/src/generateContractInitialState.js b/src/generateContractInitialState.js new file mode 100644 index 00000000..a888a9b1 --- /dev/null +++ b/src/generateContractInitialState.js @@ -0,0 +1,20 @@ +import getAbi from './getAbi' + +export function generateContractInitialState (contractConfig) { + var state = { + initialized: false, + synced: false + } + + // Constant getters + var abi = getAbi(contractConfig) + for (var i2 = 0; i2 < abi.length; i2++) { + var item = abi[i2]; + + if (item.type == "function" && item.constant === true) { + state[item.name] = {} + } + } + + return state +} diff --git a/src/generateContractsInitialState.js b/src/generateContractsInitialState.js index 4ac83437..c608719d 100644 --- a/src/generateContractsInitialState.js +++ b/src/generateContractsInitialState.js @@ -1,4 +1,4 @@ -import getAbi from './getAbi' +import { generateContractInitialState } from './generateContractInitialState' function generateContractsInitialState(options) { // Preloaded state @@ -7,21 +7,7 @@ function generateContractsInitialState(options) { for (var i = 0; i < options.contracts.length; i++) { // Initial contract details var contractName = options.contracts[i].contractName - - contractsInitialState[contractName] = { - initialized: false, - synced: false - } - - // Constant getters - var abi = getAbi(options.contracts[i]) - for (var i2 = 0; i2 < abi.length; i2++) { - var item = abi[i2]; - - if (item.type == "function" && item.constant === true) { - contractsInitialState[contractName][item.name] = {} - } - } + contractsInitialState[contractName] = generateContractInitialState(options.contracts[i]) } return contractsInitialState diff --git a/src/generateStore.js b/src/generateStore.js index b26a9acf..f21856f0 100644 --- a/src/generateStore.js +++ b/src/generateStore.js @@ -2,6 +2,7 @@ import { createStore, applyMiddleware, compose } from 'redux' import createSagaMiddleware from 'redux-saga' import rootSaga from './rootSaga' import reducer from './reducer' +import { generateContractsInitialState } from './generateContractsInitialState' import getAbi from './getAbi' function generateStore(options) { @@ -9,30 +10,8 @@ function generateStore(options) { const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; // Preloaded state - var contractsInitialState = {} - - for (var i = 0; i < options.contracts.length; i++) { - // Initial contract details - var contractName = options.contracts[i].contractName - - contractsInitialState[contractName] = { - initialized: false, - synced: false - } - - // Constant getters - var abi = getAbi(options.contracts[i]) - for (var i2 = 0; i2 < abi.length; i2++) { - var item = abi[i2]; - - if (item.type == "function" && item.constant === true) { - contractsInitialState[contractName][item.name] = {} - } - } - } - var preloadedState = { - contracts: contractsInitialState + contracts: generateContractsInitialState(options) } // create the saga middleware diff --git a/src/getAddress.js b/src/getAddress.js new file mode 100644 index 00000000..001e41a4 --- /dev/null +++ b/src/getAddress.js @@ -0,0 +1,5 @@ +export default function(contractConfig) { + if (contractConfig.web3Contract) { + return web3Contract.options.address + } +} From eb574a31e326bd9aee697ec6d651904f8c9ac139 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Wed, 16 May 2018 11:04:41 -0700 Subject: [PATCH 10/13] Moved DrizzleContract initialize action dispatch to contractsSaga --- dist/drizzle.js | 8 ++++---- src/DrizzleContract.js | 2 -- src/contracts/contractsSaga.js | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dist/drizzle.js b/dist/drizzle.js index 1f153f2a..15f91cce 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -3456,8 +3456,10 @@ function addContract(_ref) { case 9: drizzle._addContract(drizzleContract); + _context.next = 12; + return (0, _effects.put)({ type: 'CONTRACT_INITIALIZED', name: contractConfig.contractName }); - case 10: + case 12: case 'end': return _context.stop(); } @@ -7267,8 +7269,6 @@ var DrizzleContract = function () { store.dispatch({ type: 'LISTEN_FOR_EVENT', contract: this, eventName: eventName }); } } - - store.dispatch({ type: 'CONTRACT_INITIALIZED', name: name }); } (0, _createClass3.default)(DrizzleContract, [{ @@ -7658,4 +7658,4 @@ exports.default = reducer; /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAyMDI3ZDY4NjUyOTY5YTE1OWNkYyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2dsb2JhbC5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX3drcy5qcyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYXJ5L21vZHVsZXMvX2NvcmUuanMiLCJ3ZWJwYWNrOi8vLy4vbm9kZV9tb2R1bGVzL2NvcmUtanMvbGlicmFyeS9tb2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GFjdGlvbi50eXBlID09PSAnVFhfQlJPQURDQVNURUQnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgc3RhdHVzOiAncGVuZGluZycsXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW11cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0NPTkZJUk1BSVRPTicpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXG4gICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLmNvbmZpcm1hdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5jb25maXJtYXRpb25SZWNlaXB0XG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfU1VDQ0VTU0ZVTCcpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdzdWNjZXNzJyxcbiAgICAgICAgICAgICAgICByZWNlaXB0OiBhY3Rpb24ucmVjZWlwdFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICBpZiAoYWN0aW9uLn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IChyZWFjdGlvbikge1xuICAgICAgdmFyIGhhbmRsZXIgPSBvayA/IHJlYWN0aW9uLm9rIDogcmVhY3Rpb24uZmFpbDtcbiAgICAgIHZhciByZXNvbHZlID0gcmVhY3Rpb24ucmVzb2x2ZTtcbiAgICAgIHZhciByZWplY3QgPSByZWFjdGlvbi5yZWplY3Q7XG4gICAgICB2YXIgZG9tYWluID0gcmVhY3Rpb24uZG9tYWluO1xuICAgICAgdmFyIHJlc3VsdCwgdGhlbjtcbiAgICAgIHRyeSB7XG4gICAgICAgIGlmIChoYW5kbGVyKSB7XG4gICAgICAgICAgaWYgKCFvaykge1xuICAgICAgICAgICAgaWYgKHByb21pc2UuX2ggPT0gMikgb25IYW5kbGVVbmhhbmRsZWQocHJvbWlzZSk7XG4gICAgICAgICAgICBwcm9taXNlLl9oID0gMTtcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGhhbmRsZXIgPT09IHRydWUpIHJlc3VsdCA9IHZhbHVlO1xuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRvbWFpbikgZG9tYWluLmVudGVyKCk7XG4gICAgICAgICAgICByZXN1bHQgPSBoYW5kbGVyKHZhbHVlKTtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5leGl0KCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChyZXN1bHQgPT09IHJlYWN0aW9uLnByb21pc2UpIHtcbiAgICAgICAgICAgIHJlamVjdChUeXBlRXJyb3IoJ1Byb21pc2UtY2hhaW4gY3ljbGUnKSk7XG4gICAgICAgICAgfSBlbHNlIGlmICh0aGVuID0gaXNUaGVuYWJsZShyZXN1bHQpKSB7XG4gICAgICAgICAgICB0aGVuLmNhbGwocmVzdWx0LCByZXNvbHZlLCByZWplY3QpO1xuICAgICAgICAgIH0gZWxzZSByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH0gZWxzZSByZWplY3QodmFsdWUpO1xuICAgICAgfSBjYXRjaCAoZSkge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IGNvbnRleHQuX3NlbnQgPSBjb250ZXh0LmFyZztcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBpZiAoc3RhdGUgPT09IEdlblN0YXRlU3VzcGVuZGVkU3RhcnQpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW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m1ldGhvZF07XG4gICAgaWYgKG1ldGhvZCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAvLyBBIC50aHJvdyBvciAucmV0dXJuIHdoZW4gdGhlIGRlbGVnYXRlIGl0ZXJhdG9yIGhhcyBubyAudGhyb3dcbiAgICAgIC8vIG1ldGhvZCBhbHdheXMgdGVybWluYXRlcyB0aGUgeWllbGQqIGxvb3AuXG4gICAgICBjb250ZXh0LmRlbGVnYXRlID0gbnVsbDtcblxuICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgaWYgKGRlbGVnYXRlLml0ZXJhdG9yLnJldHVybikge1xuICAgICAgICAgIC8vIElmIHRoZSBkZWxlZ2F0ZSBpdGVyYXRvciBoYXMgYSByZXR1cm4gbWV0aG9kLCBnaXZlIGl0IGFcbiAgICAgICAgICAvLyBjaGFuY2UgdG8gY2xlYW4gdXAuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICAgIG1heWJlSW52b2tlRGVsZWdhdGUoZGVsZWdhdGUsIGNvbnRleHQpO1xuXG4gICAgICAgICAgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICAgIC8vIElmIG1heWJlSW52b2tlRGVsZWdhdGUoY29udGV4dCkgY2hhbmdlZCBjb250ZXh0Lm1ldGhvZCBmcm9tXG4gICAgICAgICAgICAvLyBcInJldHVyblwiIHRvIFwidGhyb3dcIiwgbGV0IHRoYXQgb3ZlcnJpZGUgdGhlIFR5cGVFcnJvciBiZWxvdy5cbiAgICAgICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICBjb250ZXh0LmFyZyA9IG5ldyB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ICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIHN0b3A6IGZ1bmN0aW9uKCkge1xuICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3JkLnR5cGUgPSBcInRocm93XCI7XG4gICAgICAgIHJlY29yZC5hcmcgPSBleGNlcHRpb247XG4gICAgICAgIGNvbnRleHQubmV4dCA9IGxvYztcblxuICAgICAgICBpZiAoY2F1Z2h0KSB7XG4gICAgICAgICAgLy8gSWYgdGhlIGRpc3BhdGNoZWQgZXhjZXB0aW9uIHdhcyBjYXVnaHQgYnkgYSBjYXRjaCBibG9jayxcbiAgICAgICAgICAvLyB0aGVuIGxldCB0aGF0IGNhdGNoIGJsb2NrIGhhbmRsZSB0aGUgZXhjZXB0aW9uIG5vcm1hbGx5LlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSB1bmRlZmluZWQ7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gISEgY2F1Z2h0O1xuICAgICAgfVxuXG4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VxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICByZWNvcmQuYXJnID0gYXJnO1xuXG4gICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgIHRoaXMubmV4dCA9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jO1xuICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMuY29tcGxldGUocmVjb3JkKTtcbiAgICB9LFxuXG4gICAgY29tcGxldGU6IGZ1bmN0aW9uKHJlY29yZCwgYWZ0ZXJMb2MpIHtcbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJ0aHJvd1wiKSB7XG4gICAgICAgIHRocm93IHJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgcmVjb3JkLnR5cGUgPT09IFwiY29udGludWVcIikge1xuICAgICAgICB0aGlzLm5leHQgPSByZWNvcmQuYXJnO1xuICAgICAgfSBlbHNlIGlmIChyZW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b25zdCBpbml0aWFsU3RhdGUgPSB7fVxuICBcbmNvbnN0IHRyYW5zYWN0aW9uc1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0JST0FEQ0FTVEVEJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ3BlbmRpbmcnLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9DT05GSVJNQUlUT04nKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICA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dmFyIHZhbHVlID0gcHJvbWlzZS5fdjtcbiAgICB2YXIgb2sgPSBwcm9taXNlLl9zID09IDE7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBydW4gPSBmdW5jdGlvbiAocmVhY3Rpb24pIHtcbiAgICAgIHZhciBoYW5kbGVyID0gb2sgPyByZWFjdGlvbi5vayA6IHJlYWN0aW9uLmZhaWw7XG4gICAgICB2YXIgcmVzb2x2ZSA9IHJlYWN0aW9uLnJlc29sdmU7XG4gICAgICB2YXIgcmVqZWN0ID0gcmVhY3Rpb24ucmVqZWN0O1xuICAgICAgdmFyIGRvbWFpbiA9IHJlYWN0aW9uLmRvbWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW47XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChwcm9taXNlLl9oID09IDIpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7XG4gICAgICAgICAgICBpZiAoZG9tYWluKSBkb21haW4uZXhpdCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNoYWluIGN5Y2xlJykpO1xuICAgICAgICAgIH0gZWxzZSBpZiAodGhlbiA9IGlzVGhlbmFibGUocmVzdWx0KSkge1xuICAgICAgICAgICAgdGhlbi5jYWxsKHJlc3VsdCwgcmVzb2x2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NhdWdodDtcbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT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jb3JkLmFyZztcbiAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwicmV0dXJuXCIpIHtcbiAgICAgICAgdGhpcy5ydmFsID0gdGhpcy5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwicmV0dXJuXCI7XG4gICAgICAgIHRoaXMubmV4dCA9IFwiZW5kXCI7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcIm5vcm1hbFwiICYmIGFmdGVyTG9jKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IGFmdGVyTG9jO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICB9LFxuXG4gICAgZmluaXNoOiBmdW5jdGlvbihmaW5hbGx5TG9jKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LmZpbmFsbHlMb2MgPT09IGZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB0aGlzLmNvbXBsZXRlKGVudHJ5LmNvbXBsZXRpb24sIGVudHJ5LmFmdGVyTG9jKTtcbiAgICAgICAgICByZXNldFRyeUVudHJ5KGVudHJ5KTtcbiAgICAgICAgICByZXR1cm4gQ29udGludWVTZW50aW5lbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBcImNhdGNoXCI6IGZ1bmN0aW9uKHRyeUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IHRyeUxvYykge1xuICAgICAgIC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EJhbGFuY2VzUmVkdWNlcixcbiAgY29udHJhY3RzOiBjb250cmFjdHNSZWR1Y2VyLFxuICBkcml6emxlU3RhdHVzOiBkcml6emxlU3RhdHVzUmVkdWNlcixcbiAgdHJhbnNhY3Rpb25zOiB0cmFuc2FjdGlvbnNSZWR1Y2VyLFxuICB0cmFuc2FjdGlvblN0YWNrOiB0cmFuc2FjdGlvblN0YWNrUmVkdWNlcixcbiAgd2ViMzogd2ViM1JlZHVjZXJcbn0pXG5cbmV4cG9ydCBkZWZhdWx0IHJlZHVjZXJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9yZWR1Y2VyLmpzIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/src/DrizzleContract.js b/src/DrizzleContract.js index 67d19de8..b3b0660a 100644 --- a/src/DrizzleContract.js +++ b/src/DrizzleContract.js @@ -29,8 +29,6 @@ class DrizzleContract { store.dispatch({type: 'LISTEN_FOR_EVENT', contract: this, eventName}) } } - - store.dispatch({type: 'CONTRACT_INITIALIZED', name}) } cacheCallFunction(fnName, fnIndex, fn) { diff --git a/src/contracts/contractsSaga.js b/src/contracts/contractsSaga.js index f684788e..44015a37 100644 --- a/src/contracts/contractsSaga.js +++ b/src/contracts/contractsSaga.js @@ -9,6 +9,7 @@ export function* addContract({drizzle, contractConfig, events, web3}) { drizzleContract = yield call(instantiateContract, {contractArtifact: contractConfig, events, store: drizzle.store, web3}) } drizzle._addContract(drizzleContract) + yield put({type: 'CONTRACT_INITIALIZED', name: contractConfig.contractName}) } /* From 4af01195d209fb4b0e2921e2909bec9acd5493b0 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Wed, 16 May 2018 11:48:30 -0700 Subject: [PATCH 11/13] Added code to prevent double-adding contracts --- dist/drizzle.js | 209 ++++++--------------------------- src/Drizzle.js | 2 + src/contracts/contractsSaga.js | 6 +- webpack.config.js | 4 +- 4 files changed, 47 insertions(+), 174 deletions(-) diff --git a/dist/drizzle.js b/dist/drizzle.js index 15f91cce..5a6f05bc 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -1,13 +1,13 @@ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("web3")); + module.exports = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("deepmerge"), require("is-plain-object"), require("web3")); else if(typeof define === 'function' && define.amd) - define(["redux-saga", "redux", "eth-block-tracker-es5", "web3"], factory); + define(["redux-saga", "redux", "eth-block-tracker-es5", "deepmerge", "is-plain-object", "web3"], factory); else if(typeof exports === 'object') - exports["drizzle"] = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("web3")); + exports["drizzle"] = factory(require("redux-saga"), require("redux"), require("eth-block-tracker-es5"), require("deepmerge"), require("is-plain-object"), require("web3")); else - root["drizzle"] = factory(root["redux-saga"], root["redux"], root["eth-block-tracker-es5"], root["web3"]); -})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_25__, __WEBPACK_EXTERNAL_MODULE_71__, __WEBPACK_EXTERNAL_MODULE_122__, __WEBPACK_EXTERNAL_MODULE_150__) { + root["drizzle"] = factory(root["redux-saga"], root["redux"], root["eth-block-tracker-es5"], root["deepmerge"], root["is-plain-object"], root["web3"]); +})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE_25__, __WEBPACK_EXTERNAL_MODULE_71__, __WEBPACK_EXTERNAL_MODULE_122__, __WEBPACK_EXTERNAL_MODULE_147__, __WEBPACK_EXTERNAL_MODULE_148__, __WEBPACK_EXTERNAL_MODULE_149__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -1923,7 +1923,7 @@ var _marked = /*#__PURE__*/_regenerator2.default.mark(initializeWeb3), _marked4 = /*#__PURE__*/_regenerator2.default.mark(callSendTx), _marked5 = /*#__PURE__*/_regenerator2.default.mark(web3Saga); -var Web3 = __webpack_require__(150); +var Web3 = __webpack_require__(149); /* * Initialization @@ -3434,32 +3434,43 @@ function addContract(_ref) { while (1) { switch (_context.prev = _context.next) { case 0: + if (!drizzle.loadingContract[contractConfig.contractName]) { + _context.next = 2; + break; + } + + return _context.abrupt('return', false); + + case 2: + drizzle.loadingContract[contractConfig.contractName] = true; + drizzleContract = void 0; + if (!contractConfig.web3Contract) { - _context.next = 6; + _context.next = 10; break; } - _context.next = 3; + _context.next = 7; return (0, _effects.call)(instantiateWeb3Contract, { web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events: events, store: drizzle.store, web3: web3 }); - case 3: + case 7: drizzleContract = _context.sent; - _context.next = 9; + _context.next = 13; break; - case 6: - _context.next = 8; + case 10: + _context.next = 12; return (0, _effects.call)(instantiateContract, { contractArtifact: contractConfig, events: events, store: drizzle.store, web3: web3 }); - case 8: + case 12: drizzleContract = _context.sent; - case 9: + case 13: drizzle._addContract(drizzleContract); - _context.next = 12; + _context.next = 16; return (0, _effects.put)({ type: 'CONTRACT_INITIALIZED', name: contractConfig.contractName }); - case 12: + case 16: case 'end': return _context.stop(); } @@ -4754,6 +4765,8 @@ var Drizzle = function () { this.store = store; this.web3 = {}; + this.loadingContract = {}; + // Wait for window load event in case of injected web3. windowPromise.then(function () { // Begin Drizzle initialization. @@ -5524,7 +5537,7 @@ var _rootSaga = __webpack_require__(114); var _rootSaga2 = _interopRequireDefault(_rootSaga); -var _reducer = __webpack_require__(151); +var _reducer = __webpack_require__(150); var _reducer2 = _interopRequireDefault(_reducer); @@ -7436,172 +7449,24 @@ var isPlainObject = __webpack_require__(148); /***/ }), /* 147 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -var isMergeableObject = function isMergeableObject(value) { - return isNonNullObject(value) - && !isSpecial(value) -}; - -function isNonNullObject(value) { - return !!value && typeof value === 'object' -} - -function isSpecial(value) { - var stringValue = Object.prototype.toString.call(value); - - return stringValue === '[object RegExp]' - || stringValue === '[object Date]' - || isReactElement(value) -} - -// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 -var canUseSymbol = typeof Symbol === 'function' && Symbol.for; -var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; - -function isReactElement(value) { - return value.$$typeof === REACT_ELEMENT_TYPE -} - -function emptyTarget(val) { - return Array.isArray(val) ? [] : {} -} - -function cloneUnlessOtherwiseSpecified(value, options) { - return (options.clone !== false && options.isMergeableObject(value)) - ? deepmerge(emptyTarget(value), value, options) - : value -} - -function defaultArrayMerge(target, source, options) { - return target.concat(source).map(function(element) { - return cloneUnlessOtherwiseSpecified(element, options) - }) -} - -function mergeObject(target, source, options) { - var destination = {}; - if (options.isMergeableObject(target)) { - Object.keys(target).forEach(function(key) { - destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); - }); - } - Object.keys(source).forEach(function(key) { - if (!options.isMergeableObject(source[key]) || !target[key]) { - destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); - } else { - destination[key] = deepmerge(target[key], source[key], options); - } - }); - return destination -} - -function deepmerge(target, source, options) { - options = options || {}; - options.arrayMerge = options.arrayMerge || defaultArrayMerge; - options.isMergeableObject = options.isMergeableObject || isMergeableObject; - - var sourceIsArray = Array.isArray(source); - var targetIsArray = Array.isArray(target); - var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; - - if (!sourceAndTargetTypesMatch) { - return cloneUnlessOtherwiseSpecified(source, options) - } else if (sourceIsArray) { - return options.arrayMerge(target, source, options) - } else { - return mergeObject(target, source, options) - } -} - -deepmerge.all = function deepmergeAll(array, options) { - if (!Array.isArray(array)) { - throw new Error('first argument should be an array') - } - - return array.reduce(function(prev, next) { - return deepmerge(prev, next, options) - }, {}) -}; - -var deepmerge_1 = deepmerge; - -/* harmony default export */ __webpack_exports__["default"] = (deepmerge_1); +/***/ (function(module, exports) { +module.exports = __WEBPACK_EXTERNAL_MODULE_147__; /***/ }), /* 148 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - - - -var isObject = __webpack_require__(149); - -function isObjectObject(o) { - return isObject(o) === true - && Object.prototype.toString.call(o) === '[object Object]'; -} - -module.exports = function isPlainObject(o) { - var ctor,prot; - - if (isObjectObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (typeof ctor !== 'function') return false; - - // If has modified prototype - prot = ctor.prototype; - if (isObjectObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; - } - - // Most likely a plain Object - return true; -}; +/***/ (function(module, exports) { +module.exports = __WEBPACK_EXTERNAL_MODULE_148__; /***/ }), /* 149 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ - - - -module.exports = function isObject(val) { - return val != null && typeof val === 'object' && Array.isArray(val) === false; -}; - - -/***/ }), -/* 150 */ /***/ (function(module, exports) { -module.exports = __WEBPACK_EXTERNAL_MODULE_150__; +module.exports = __WEBPACK_EXTERNAL_MODULE_149__; /***/ }), -/* 151 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -7658,4 +7523,4 @@ exports.default = reducer; /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAyZjMyMTE5YjJmNDdhMmI2ZDY5YyIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvY29yZS1qcy9saWJyYX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ICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBkb3VibGVkTGltaXQgPSB2b2lkIDA7XG4gICAgICAgIHN3aXRjaCAob3ZlcmZsb3dBY3Rpb24pIHtcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX1RIUk9XOlxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKEJVRkZFUl9PVkVSRkxPVyk7XG4gICAgICAgICAgY2FzZSBPTl9PVkVSRkxPV19TTElERTpcbiAgICAgICAgICAgIGFycltwdXNoSW5kZXhdID0gaXQ7XG4gICAgICAgICAgICBwdXNoSW5kZXggPSAocHVzaEluZGV4ICsgMSkgJSBsaW1pdDtcbiAgICAgICAgICAgIHBvcEluZGV4ID0gcHVzaEluZGV4O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSBPTl9PVkVSRkxPV19FWFBBTkQ6XG4gICAgICAgICAgICBkb3VibGVkTGltaXQgPSAyICogbGltaXQ7XG5cbiAgICAgICAgICAgIGFyciA9IGZsdXNoKCk7XG5cbiAgICAgICAgICAgIGxlbmd0aCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwdXNoSW5kZXggPSBhcnIubGVuZ3RoO1xuICAgICAgICAgICAgcG9wSW5kZXggPSAwO1xuXG4gICAgICAgICAgICBhcnIubGVuZ3RoID0gZG91YmxlZExpbWl0O1xuICAgICAgICAgICAgbGltaXQgPSBkb3VibGVkTGltaXQ7XG5cbiAgICAgICAgICAgIHB1c2goaXQpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAvLyBEUk9QXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuICAgIHRha2U6IHRha2UsXG4gICAgZmx1c2g6IGZsdXNoXG4gIH07XG59XG5cbmV4cG9ydCB2YXIgYnVmZmVycyA9IHtcbiAgbm9uZTogZnVuY3Rpb24gbm9uZSgpIHtcbiAgICByZXR1cm4gemVyb0J1ZmZlcj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GUgPT09ICdEUklaWkxFX0lOSVRJQUxJWkVEJylcbiAge1xuICAgIHJldHVybiB7XG4gICAgICAuLi5zdGF0ZSxcbiAgICAgIGluaXRpYWxpemVkOiB0cnVlXG4gICAgfVxuICB9XG4gIHJldHVybiBzdGF0ZVxufVxuXG5leHBvcnQgZGVmYXVsdCBkcml6emxlU3RhdHVzUmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2RyaXp6bGVTdGF0dXMvZHJpenpsZVN0YXR1c1JlZHVjZXIuanMiLCJjb25zdCBpbml0aWFsU3RhdGUgPSB7fVxuICBcbmNvbnN0IHRyYW5zYWN0aW9uc1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0JST0FEQ0FTVEVEJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ3BlbmRpbmcnLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9DT05GSVJNQUlUT04nKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZm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GZyb20gaW5uZXJGbiwgd2UgbGVhdmUgc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2NvbnRleHQubWV0aG9kXShjb250ZXh0LmFyZykgYW5kIGhhbmRsZSB0aGVcbiAgLy8gcmVzdWx0LCBlaXRoZXIgYnkgcmV0dXJuaW5nIGEgeyB2YWx1ZSwgZG9uZSB9IHJ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ICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJl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ICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3VibGVkTGltaXQ7XG4gICAgICAgICAgICBsaW1pdCA9IGRvdWJsZWRMaW1pdDtcblxuICAgICAgICAgICAgcHVzaChpdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIC8vIERST1BcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgdGFrZTogdGFrZSxcbiAgICBmbHVzaDogZmx1c2hcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBidWZmZXJzID0ge1xuICBub25lOiBmdW5jdGlvbiBub25lKCkge1xuICAgIHJldHVybiB6ZXJvQnVmZmVyO1xuICB9LFxuICBmaXhlZDogZnVuY3Rpb24gZml4ZWQobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfVEhST1cpO1xuICB9LFxuICBkcm9wcGluZzogZnVuY3Rpb24gZHJvcHBpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfRFJPUCk7XG4gIH0sXG4gIHNsaWRpbmc6IGZ1bmN0aW9uIHNsaWRpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfU0xJREUpO1xuICB9LFxuICBleHBhbmRpbmc6IGZ1bmN0aW9uIGV4cGFuZGluZy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UEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2RyaXp6bGVTdGF0dXMvZHJpenpsZVN0YXR1c1JlZHVjZXIuanMiLCJjb25zdCBpbml0aWFsU3RhdGUgPSB7fVxuICBcbmNvbnN0IHRyYW5zYWN0aW9uc1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0JST0FEQ0FTVEVEJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ3BlbmRpbmcnLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9DT05GSVJNQUlUT04nKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX1NVQ0NFU1NGVUwnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2Fjd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KHByb21pc2UuX24pIHJldHVybjtcbiAgcHJvbWlzZS5fbiA9IHRydWU7XG4gIHZhciBjaGFpbiA9IHByb21pc2UuX2M7XG4gIG1pY3JvdGFzayhmdW5jdGlvbiAoKSB7XG4gICAgdmFyIHZhbHVlID0gcHJvbWlzZS5fdjtcbiAgICB2YXIgb2sgPSBwcm9taXNlLl9zID09IDE7XG4gICAgdmFyIGkgPSAwO1xuICAgIHZhciBydW4gPSBmdW5jdGlvbiAocmVhY3Rpb24pIHtcbiAgICAgIHZhciBoYW5kbGVyID0gb2sgPyByZWFjdGlvbi5vayA6IHJlYWN0aW9uLmZhaWw7XG4gICAgICB2YXIgcmVzb2x2ZSA9IHJlYWN0aW9uLnJlc29sdmU7XG4gICAgICB2YXIgcmVqZWN0ID0gcmVhY3Rpb24ucmVqZWN0O1xuICAgICAgdmFyIGRvbWFpbiA9IHJlYWN0aW9uLmRvbWFpbjtcbiAgICAgIHZhciByZXN1bHQsIHRoZW47XG4gICAgICB0cnkge1xuICAgICAgICBpZiAoaGFuZGxlcikge1xuICAgICAgICAgIGlmICghb2spIHtcbiAgICAgICAgICAgIGlmIChwcm9taXNlLl9oID09IDIpIG9uSGFuZGxlVW5oYW5kbGVkKHByb21pc2UpO1xuICAgICAgICAgICAgcHJvbWlzZS5faCA9IDE7XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChoYW5kbGVyID09PSB0cnVlKSByZXN1bHQgPSB2YWx1ZTtcbiAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGlmIChkb21haW4pIGRvbWFpbi5lbnRlcigpO1xuICAgICAgICAgICAgcmVzdWx0ID0gaGFuZGxlcih2YWx1ZSk7XG4gICAgICAgICAgICBpZiAoZG9tYWluKSBkb21haW4uZXhpdCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAocmVzdWx0ID09PSByZWFjdGlvbi5wcm9taXNlKSB7XG4gICAgICAgICAgICByZWplY3QoVHlwZUVycm9yKCdQcm9taXNlLWNo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AgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2NvbnRleHQubWV0aG9kXShjb250ZXh0LmFyZykgYW5kIGhhbmRsZSB0aGVcbiAgLy8gcmVzdWx0LCBlaXRoZXIgYnkgcmV0dXJuaW5nIGEgeyB2YWx1ZSwgZG9uZSB9IHJlc3VsdCBmcm9tIHRoZVxuICAvLyBkZWxlZ2F0ZSBpdGVyYXRvciwgb3IgYnkgbW9kaWZ5aW5nIGNvbnRleHQubWV0aG9kIGFuZCBjb250ZXh0LmFyZyxcbiAgLy8gc2V0dGluZyBjb250ZXh0LmRlbGVnYXRlIHRvIG51bGwsIGFuZC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AgICAgICAgICBjb250ZXh0Lm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gdW5kZWZpbmVkO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuICEhIGNhdWdodDtcbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIHZhciByZWNvcmQgPSBlbnRyeS5jb21wbGV0aW9uO1xuXG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPT09IFwicm9vdFwiKSB7XG4gICAgICAgICAgLy8gRXhjZXB0aW9uIHRocm93biBvdXRzaWRlIG9mIGFueSB0cnkgYmxvY2sgdGhhdCBjb3VsZCBoYW5kbGVcbiAgICAgICAgICAvLyBpdCwgc28gc2V0IHRoZSBjb21wbGV0aW9uIHZhbHVlIG9mIHRoZSBlbnRpcmUgZnVuY3Rpb24gdG9cbiAgICAgICAgICAvLyB0aHJvdyB0aGUgZXhjZXB0aW9uLlxuICAgICAgICAgIHJldHVybiBoYW5kbGUoXCJlbmRcIik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldikge1xuICAgICAgICAgIHZhciBoYXNDYXRjaCA9IGhhc093bi5jYWxsKGVudHJ5LCBcImNhdGNoTG9jXCIpO1xuICAgICAgICAgIHZhciBoYXNGaW5hbGx5ID0gaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKTtcblxuICAgICAgICAgIGlmIChoYXNDYXRjaCAmJiBoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzQ2F0Y2gpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSBpZiAoaGFzRmluYWxseSkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5maW5hbGx5TG9jKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJ0cnkgc3RhdGVtZW50IHdpdGhvdXQgY2F0Y2ggb3IgZmluYWxseVwiKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgYWJydXB0OiBmdW5jdGlvbih0eXBlLCBhcmcpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jIDw9IHRoaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvbXBsZXRlOiBmdW5jdGlvbihyZWNvcmQsIGFmdGVyTG9jKSB7XG4gICAgICBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICB0aHJvdyByZWNvcmQuYXJnO1xuICAgICAgfVxuXG4g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WNlciA9IGNvbWJpbmVSZWR1Y2Vycyh7XG4gIGFjY291bnRzOiBhY2NvdW50c1JlZHVjZXIsXG4gIGFjY291bnRCYWxhbmNlczogYWNjb3VudEJhbGFuY2VzUmVkdWNlcixcbiAgY29udHJhY3RzOiBjb250cmFjdHNSZWR1Y2VyLFxuICBkcml6emxlU3RhdHVzOiBkcml6emxlU3RhdHVzUmVkdWNlcixcbiAgdHJhbnNhY3Rpb25zOiB0cmFuc2FjdGlvbnNSZWR1Y2VyLFxuICB0cmFuc2FjdGlvblN0YWNrOiB0cmFuc2FjdGlvblN0YWNrUmVkdWNlcixcbiAgd2ViMzogd2ViM1JlZHVjZXJcbn0pXG5cbmV4cG9ydCBkZWZhdWx0IHJlZHVjZXJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9yZWR1Y2VyLmpzIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/src/Drizzle.js b/src/Drizzle.js index b23bfb58..dae801b2 100644 --- a/src/Drizzle.js +++ b/src/Drizzle.js @@ -12,6 +12,8 @@ class Drizzle { this.store = store this.web3 = {} + this.loadingContract = {} + // Wait for window load event in case of injected web3. windowPromise.then(() => { // Begin Drizzle initialization. diff --git a/src/contracts/contractsSaga.js b/src/contracts/contractsSaga.js index 44015a37..a0a15028 100644 --- a/src/contracts/contractsSaga.js +++ b/src/contracts/contractsSaga.js @@ -3,8 +3,12 @@ import { call, put, select, take, takeLatest, takeEvery } from 'redux-saga/effec import DrizzleContract from '../DrizzleContract' export function* addContract({drizzle, contractConfig, events, web3}) { + // Prevents double-adding contracts + if (drizzle.loadingContract[contractConfig.contractName]) { return false } + drizzle.loadingContract[contractConfig.contractName] = true + let drizzleContract if (contractConfig.web3Contract) { - var drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events, store: drizzle.store, web3}) + drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events, store: drizzle.store, web3}) } else { drizzleContract = yield call(instantiateContract, {contractArtifact: contractConfig, events, store: drizzle.store, web3}) } diff --git a/webpack.config.js b/webpack.config.js index 832175a1..9c678c06 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -31,6 +31,8 @@ module.exports = { 'eth-block-tracker': 'eth-block-tracker-es5', 'redux': 'redux', 'redux-saga': 'redux-saga', - 'web3': 'web3' + 'web3': 'web3', + 'is-plain-object': 'is-plain-object', + 'deepmerge': 'deepmerge' } }; From eb6b0a5962334be9ace9afe0d12e1ad5546bc8b2 Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Wed, 16 May 2018 11:52:16 -0700 Subject: [PATCH 12/13] Added README for dynamic contrats --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 30daa3ba..1bd80605 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,24 @@ Drizzle is a collection of front-end libraries that make writing dapp frontends drizzle.contracts.SimpleStorage.methods.set(2).send({from: '0x3f...'}) ``` +## Adding contracts dynamically + +You can programmatically add contracts to Drizzle using either Drizzle#addContract or the ADD_CONTRACT action. + +```javascript +var contractConfig = { + contractName: "0x066408929e8d5Ed161e9cAA1876b60e1fBB5DB75", + web3Contract: new web3.eth.Contract(/* ... */) +} +events = ['Mint'] + +// Using an action +dispatch({type: 'ADD_CONTRACT', drizzle, contractConfig, events, web3}) + +// Or using the Drizzle context object +this.context.drizzle.addContract({contractConfig, events}) +``` + ## Options Drizzle has a number of configuration options so it only keeps track of exactly the data you need. Here's the full list of options along with their default values. From 6ccdbe1ccc4014217f4277fb480390717cc519cf Mon Sep 17 00:00:00 2001 From: Brendan Asselstine Date: Thu, 17 May 2018 12:05:06 -0700 Subject: [PATCH 13/13] Added code that prevents double addition of contracts --- dist/drizzle.js | 28 ++++++++++++++++------------ src/contracts/contractsReducer.js | 2 +- src/contracts/contractsSaga.js | 1 + 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/dist/drizzle.js b/dist/drizzle.js index 5a6f05bc..1533cd29 100644 --- a/dist/drizzle.js +++ b/dist/drizzle.js @@ -3443,34 +3443,38 @@ function addContract(_ref) { case 2: drizzle.loadingContract[contractConfig.contractName] = true; + _context.next = 5; + return (0, _effects.put)({ type: 'CONTRACT_INITIALIZING', contractConfig: contractConfig }); + + case 5: drizzleContract = void 0; if (!contractConfig.web3Contract) { - _context.next = 10; + _context.next = 12; break; } - _context.next = 7; + _context.next = 9; return (0, _effects.call)(instantiateWeb3Contract, { web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events: events, store: drizzle.store, web3: web3 }); - case 7: + case 9: drizzleContract = _context.sent; - _context.next = 13; + _context.next = 15; break; - case 10: - _context.next = 12; + case 12: + _context.next = 14; return (0, _effects.call)(instantiateContract, { contractArtifact: contractConfig, events: events, store: drizzle.store, web3: web3 }); - case 12: + case 14: drizzleContract = _context.sent; - case 13: + case 15: drizzle._addContract(drizzleContract); - _context.next = 16; + _context.next = 18; return (0, _effects.put)({ type: 'CONTRACT_INITIALIZED', name: contractConfig.contractName }); - case 16: + case 18: case 'end': return _context.stop(); } @@ -4267,7 +4271,7 @@ var contractsReducer = function contractsReducer() { * Contract Status */ - if (action.type === 'ADD_CONTRACT') { + if (action.type === 'CONTRACT_INITIALIZING') { return (0, _extends15.default)({}, state, (0, _defineProperty3.default)({}, action.contractConfig.contractName, (0, _generateContractInitialState.generateContractInitialState)(action.contractConfig))); } @@ -7523,4 +7527,4 @@ exports.default = reducer; /***/ }) /******/ ]); }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCA0OGRhOWYxMGM1YTM5ZTk3ZjVmZiIsIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZ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ICAgICAgICAgYXJyW3B1c2hJbmRleF0gPSBpdDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IChwdXNoSW5kZXggKyAxKSAlIGxpbWl0O1xuICAgICAgICAgICAgcG9wSW5kZXggPSBwdXNoSW5kZXg7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3VibGVkTGltaXQ7XG4gICAgICAgICAgICBsaW1pdCA9IGRvdWJsZWRMaW1pdDtcblxuICAgICAgICAgICAgcHVzaChpdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIC8vIERST1BcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgdGFrZTogdGFrZSxcbiAgICBmbHVzaDogZmx1c2hcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBidWZmZXJzID0ge1xuICBub25lOiBmdW5jdGlvbiBub25lKCkge1xuICAgIHJldHVybiB6ZXJvQnVmZmVyO1xuICB9LFxuICBmaXhlZDogZnVuY3Rpb24gZml4ZWQobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfVEhST1cpO1xuICB9LFxuICBkcm9wcGluZzogZnVuY3Rpb24gZHJvcHBpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfRFJPUCk7XG4gIH0sXG4gIHNsaWRpbmc6IGZ1b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dGF0ZSxcbiAgICAgIGluaXRpYWxpemVkOiB0cnVlXG4gICAgfVxuICB9XG4gIHJldHVybiBzdGF0ZVxufVxuXG5leHBvcnQgZGVmYXVsdCBkcml6emxlU3RhdHVzUmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2RyaXp6bGVTdGF0dXMvZHJpenpsZVN0YXR1c1JlZHVjZXIuanMiLCJjb25zdCBpbml0aWFsU3RhdGUgPSB7fVxuICBcbmNvbnN0IHRyYW5zYWN0aW9uc1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0JST0FEQ0FTVEVEJylcbiAgICB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5zdGF0ZSxcbiAgICAgICAgICAgIFthY3Rpb24udHhIYXNoXToge1xuICAgICAgICAgICAgICAgIHN0YXR1czogJ3BlbmRpbmcnLFxuICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbnM6IFtdXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9DT05GSVJNQUlUT04nKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgLi4uc3RhdGVbYWN0aW9uLnR4SGFzaF0sXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW1xuICAgICAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXS5jb25maXJtYXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBhY3Rpb24uY29uZmlybWF0aW9uUmVjZWlwdFxuICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVx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gc3RhdGUgPT09XG4gICAgICAgICAgLy8gR2VuU3RhdGVFeGVjdXRpbmcgYW5kIGxvb3AgYmFjayBmb3IgYW5vdGhlciBpbnZvY2F0aW9uLlxuICAgICAgICAgIHN0YXRlID0gY29udGV4dC5kb25lXG4gICAgICAgICAgICA/IEdlblN0YXRlQ29tcGxldGVkXG4gICAgICAgICAgICA6IEdlblN0YXRlU3VzcGVuZGVkWWllbGQ7XG5cbiAgICAgICAgICBpZiAocmVjb3JkLmFyZyA9PT0gQ29udGludWVTZW50aW5lbCkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHZhbHVlOiByZWNvcmQuYXJnLFxuICAgICAgICAgICAgZG9uZTogY29udGV4dC5kb25lXG4gICAgICAgICAgfTtcblxuICAgICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBzdGF0ZSA9IEdlblN0YXRlQ29tcGxldGVkO1xuICAgICAgICAgIC8vIERpc3BhdGNoIHRoZSBleGNlcHRpb24gYnkgbG9vcGluZyBiYWNrIGFyb3VuZCB0byB0aGVcbiAgICAgICAgICAvLyBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKSBjYWxsIGFib3ZlLlxuICAgICAgICAgIGNvbnRleHQubWV0aG9kID0gXCJ0aHJvd1wiO1xuICAgICAgICAgIGNvbnRleHQuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG4gIH1cblxuICAvLyBDYWxsIGRlbGVnYXRlLml0ZXJhdG9yW2NvbnRleHQubWV0aG9kXShjb250ZXh0LmFyZykgYW5kIGhhbmRsZSB0aGVcbiAgLy8gcmVzdWx0LCBlaXRoZXIgYnkgcmV0dXJuaW5nIGEgeyB2YWx1ZSwgZG9uZSB9IHJlc3VsdCBmcm9tIHRoZVxuICAvLyBkZ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oaXMucHJldiAmJlxuICAgICAgICAgICAgaGFzT3duLmNhbGwoZW50cnksIFwiZmluYWxseUxvY1wiKSAmJlxuICAgICAgICAgICAgdGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgIHZhciBmaW5hbGx5RW50cnkgPSBlbnRyeTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoZmluYWxseUVudHJ5ICYmXG4gICAgICAgICAgKHR5cGUgPT09IFwiYnJlYWtcIiB8fFxuICAgICAgICAgICB0eXBlID09PSBcImNvbnRpbnVlXCIpICYmXG4gICAgICAgICAgZmluYWxseUVudHJ5LnRyeUxvYyA8PSBhcmcgJiZcbiAgICAgICAgICBhcmcgPD0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgLy8gSWdub3JlIHRoZSBmaW5hbGx5IGVudHJ5IGlmIGNvbnRyb2wgaXMgbm90IGp1bXBpbmcgdG8gYVxuICAgICAgICAvLyBsb2NhdGlvbiBvdXRzaWRlIHRoZSB0cnkvY2F0Y2ggYmxvY2suXG4gICAgICAgIGZpbmFsbHlFbnRyeSA9IG51bGw7XG4gICAgICB9XG5cbiAgICAgIHZhciByZWNvcmQgPSBmaW5hbGx5RW50cnkgPyBmaW5hbGx5RW50cnkuY29tcGxldGlvbiA6IHt9O1xuICAgICAgcmVjb3JkLnR5cGUgPSB0eXBlO1xuICAgICAgcmVjb3JkLmFyZyA9IGFyZztcblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSkge1xuICAgICAgICB0aGlzLm1ldGhvZCA9IFwibmV4dFwiO1xuICAgICAgICB0aGlzLm5leHQgPSBmaW5hbGx5RW50cnkuZmluYWxseUxvYztcbiAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLmNvbXBsZXRlKHJlY29yZCk7XG4gICAgfSxcblxuICAgIGNvb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AgICAgICAgICAgcG9wSW5kZXggPSBwdXNoSW5kZXg7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIE9OX09WRVJGTE9XX0VYUEFORDpcbiAgICAgICAgICAgIGRvdWJsZWRMaW1pdCA9IDIgKiBsaW1pdDtcblxuICAgICAgICAgICAgYXJyID0gZmx1c2goKTtcblxuICAgICAgICAgICAgbGVuZ3RoID0gYXJyLmxlbmd0aDtcbiAgICAgICAgICAgIHB1c2hJbmRleCA9IGFyci5sZW5ndGg7XG4gICAgICAgICAgICBwb3BJbmRleCA9IDA7XG5cbiAgICAgICAgICAgIGFyci5sZW5ndGggPSBkb3VibGVkTGltaXQ7XG4gICAgICAgICAgICBsaW1pdCA9IGRvdWJsZWRMaW1pdDtcblxuICAgICAgICAgICAgcHVzaChpdCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIC8vIERST1BcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gICAgdGFrZTogdGFrZSxcbiAgICBmbHVzaDogZmx1c2hcbiAgfTtcbn1cblxuZXhwb3J0IHZhciBidWZmZXJzID0ge1xuICBub25lOiBmdW5jdGlvbiBub25lKCkge1xuICAgIHJldHVybiB6ZXJvQnVmZmVyO1xuICB9LFxuICBmaXhlZDogZnVuY3Rpb24gZml4ZWQobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfVEhST1cpO1xuICB9LFxuICBkcm9wcGluZzogZnVuY3Rpb24gZHJvcHBpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfRFJPUCk7XG4gIH0sXG4gIHNsaWRpbmc6IGZ1bmN0aW9uIHNsaWRpbmcobGltaXQpIHtcbiAgICByZXR1cm4gcmluZ0J1ZmZlcihsaW1pdCwgT05fT1ZFUkZMT1dfU0xJREUpO1xuICB9LF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5JVElBTElaRUQnKVxuICB7XG4gICAgcmV0dXJuIHtcbiAgICAgIC4uLnN0YXRlLFxuICAgICAgaW5pdGlhbGl6ZWQ6IHRydWVcbiAgICB9XG4gIH1cbiAgcmV0dXJuIHN0YXRlXG59XG5cbmV4cG9ydCBkZWZhdWx0IGRyaXp6bGVTdGF0dXNSZWR1Y2VyXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvZHJpenpsZVN0YXR1cy9kcml6emxlU3RhdHVzUmVkdWNlci5qcyIsImNvbnN0IGluaXRpYWxTdGF0ZSA9IHt9XG4gIFxuY29uc3QgdHJhbnNhY3Rpb25zUmVkdWNlciA9IChzdGF0ZSA9IGluaXRpYWxTdGF0ZSwgYWN0aW9uKSA9PiB7XG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfQlJPQURDQVNURUQnKVxuICAgIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIC4uLnN0YXRlLFxuICAgICAgICAgICAgW2FjdGlvbi50eEhhc2hdOiB7XG4gICAgICAgICAgICAgICAgc3RhdHVzOiAncGVuZGluZycsXG4gICAgICAgICAgICAgICAgY29uZmlybWF0aW9uczogW11cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChhY3Rpb24udHlwZSA9PT0gJ1RYX0NPTkZJUk1BSVRPTicpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBjb25maXJtYXRpb25zOiBbXG4gICAgICAgICAgICAgICAgICAgIC4uLnN0YXRlW2FjdGlvbi50eEhhc2hdLmNvbmZpcm1hdGlvbnMsXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvbi5jb25maXJtYXRpb25SZWNlaXB0XG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGFjdGlvbi50eXBlID09PSAnVFhfU1VDQ0VTU0ZVTCcpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdzdWNjZXNzJyxcbiAgICAgICAgICAgICAgICByZWNlaXB0OiBhY3Rpb24ucmVjZWlwdFxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG5cbiAgICBpZiAoYWN0aW9uLnR5cGUgPT09ICdUWF9FUlJPUicpXG4gICAge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uc3RhdGUsXG4gICAgICAgICAgICBbYWN0aW9uLnR4SGFzaF06IHtcbiAgICAgICAgICAgICAgICAuLi5zdGF0ZVthY3Rpb24udHhIYXNoXSxcbiAgICAgICAgICAgICAgICBzdGF0dXM6ICdlcnJvcicsXG4gICAgICAgICAgICAgICAgZXJyb3I6IGFjdGlvbi5lcnJvclxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIHN0YXRlXG59XG5cbmV4cG9ydCBkZWZhdWx0IHRyYW5zYWN0aW9uc1JlZHVjZXJcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy90cmFuc2FjdGlvbnMvdHJhbnNhY3Rpb25zUmVkdWNlci5qcyIsImNvbnN0IGluaXRpYWxTdGF0ZSA9IFtdXG4gIFxuY29uc3QgdHJhbnNhY3Rpb25TdGFja1JlZHVjZXIgPSAoc3RhdGUgPSBpbml0aWFsU3RhdGUsIGFjdGlvbikgPT4ge1xuICAgIGlmIChhY3Rpb24udH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VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmFsdWU6IHJlY29yZC5hcmcsXG4gICAgICAgICAgICBkb25lOiBjb250ZXh0LmRvbmVcbiAgICAgICAgICB9O1xuXG4gICAgICAgIH0gZWxzZSBpZiAocmVjb3JkLnR5cGUgPT09IFwidGhyb3dcIikge1xuICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgLy8gRGlzcGF0Y2ggdGhlIGV4Y2VwdGlvbiBieSBsb29waW5nIGJhY2sgYXJvdW5kIHRvIHRoZVxuICAgICAgICAgIC8vIGNvbnRleHQuZGlzcGF0Y2hFeGNlcHRpb24oY29udGV4dC5hcmcpIGNhbGwgYWJvdmUuXG4gICAgICAgICAgY29udGV4dC5tZXRob2QgPSBcInRocm93XCI7XG4gICAgICAgICAgY29udGV4dC5hcmcgPSByZWNvcmQuYXJnO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfTtcbiAgfVxuXG4gIC8vIENhbGwgZGVsZWdhdGUuaXRlcm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PSB1bmRlZmluZWQ7XG5cbiAgICAgIHRoaXMudHJ5RW50cmllcy5mb3JFYWNoKHJlc2V0VHJ5RW50cnkpO1xuXG4gICAgICBpZiAoIXNraXBUZW1wUmVzZXQpIHtcbiAgICAgICAgZm9yICh2YXIgbmFtZSBpbiB0aGlzKSB7XG4gICAgICAgICAgLy8gTm90IHN1cmUgYWJvdXQgdGhlIG9wdGltYWwgb3JkZXIgb2YgdGhlc2UgY29uZGl0aW9uczpcbiAgICAgICAgICBpZiAobmFtZS5jaGFyQXQoMCkgPT09IFwidFwiICYmXG4gICAgICAgICAgICAgIGhhc093bi5jYWxsKHRoaXMsIG5hbWUpICYmXG4gICAgICAgICAgICAgICFpc05hTigrbmFtZS5zbGljZSgxKSkpIHtcbiAgICAgICAgICAgIHRoaXNbbmFtZV0gPSB1bmRlZmluZWQ7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIHN0b3A6IGZ1bmN0aW9uKCkge1xuICAgICAgdGhpcy5kb25lID0gdHJ1ZTtcblxuICAgICAgdmFyIHJvb3RFbnRyeSA9IHRoaXMudHJ5RW50cmllc1swXTtcbiAgICAgIHZhciByb290UmVjb3JkID0gcm9vdEVudHJ5LmNvbXBsZXRpb247XG4gICAgICBpZiAocm9vdFJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcm9vdFJlY29yZC5hcmc7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLnJ2YWw7XG4gICAgfSxcblxuICAgIGRpc3BhdGNoRXhjZXB0aW9uOiBmdW5jdGlvbihleGNlcHRpb24pIHtcbiAgICAgIGlmICh0aGlzLmRvbmUpIHtcbiAgICAgICAgdGhyb3cgZXhjZXB0aW9uO1xuICAgICAgfVxuXG4gICAgICB2YXIgY29udGV4dCA9IHRoaXM7XG4gICAgICBmdW5jdGlvbiBoYW5kbGUobG9jLCBjYXVnaHQpIHtcbiAgICAgICAgcmVjb3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AgdmFyIGhhc0NhdGNoID0gaGFzT3duLmNhbGwoZW50cnksIFwiY2F0Y2hMb2NcIik7XG4gICAgICAgICAgdmFyIGhhc0ZpbmFsbHkgPSBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpO1xuXG4gICAgICAgICAgaWYgKGhhc0NhdGNoICYmIGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5jYXRjaExvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmNhdGNoTG9jLCB0cnVlKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNDYXRjaCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucHJldiA8IGVudHJ5LmNhdGNoTG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuY2F0Y2hMb2MsIHRydWUpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIGlmIChoYXNGaW5hbGx5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAgICAgICByZXR1cm4gaGFuZGxlKGVudHJ5LmZpbmFsbHlMb2MpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcInRyeSBzdGF0ZW1lbnQgd2l0aG91dCBjYXRjaCBvciBmaW5hbGx5XCIpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG5cbiAgICBhYnJ1cHQ6IGZ1bmN0aW9uKHR5cGUsIGFyZykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS50cnlMb2MgPD0gdGhpcy5wcmV2ICYmXG4gICAgICAgICAgICBoYXNPd24uY2FsbChlbnRyeSwgXCJmaW5hbGx5TG9jXCIpICYmXG4gICAgICAgICAgICB0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgdmFyIGZpbmFsbHlFbnRyeSA9IGVudHJ5O1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkgJiZcbiAgICAgICAgICAodHlwZSA9PT0gXCJicmVha1wiIHx8XG4gICAgICAgICAgIHR5cGUgPT09IFwiY29udGludWVcIikgJiZcbiAgICAgICAgICBmaW5hbGx5RW50cnkudHJ5TG9jIDw9IGFyZyAmJlxuICAgICAgICAgIGFyZyA8PSBmaW5hbGx5RW50cnkuZmluYWxseUxvYykge1xuICAgICAgICAvLyBJZ25vcmUgdGhlIGZpbmFsbHkgZW50cnkgaWYgY29udHJvbCBpcyBub3QganVtcGluZyB0byBhXG4gICAgICAgIC8vIGxvY2F0aW9uIG91dHNpZGUgdGhlIHRyeS9jYXRjaCBibG9jay5cbiAgICAgICAgZmluYWxseUVudHJ5ID0gbnVsbDtcbiAgICAgIH1cblxuICAgICAgdmFyIHJlY29yZCA9IGZpbmFsbHlFbnRyeSA/IGZpbmFsbHlFbnRyeS5jb21wbGV0aW9uIDoge307XG4gICAgICByZWNvcmQudHlwZSA9IHR5cGU7XG4gICAgICByZWNvcmQuYXJnID0gYXJnO1xuXG4gICAgICBpZiAoZmluYWxseUVudHJ5KSB7XG4gICAgICAgIHRoaXMubWV0aG9kID0gXCJuZXh0XCI7XG4gICAgICAgIHRoaXMubmV4d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yIGZyb20gJy4vZHJpenpsZVN0YXR1cy9kcml6emxlU3RhdHVzUmVkdWNlcidcbmltcG9ydCB0cmFuc2FjdGlvbnNSZWR1Y2VyIGZyb20gJy4vdHJhbnNhY3Rpb25zL3RyYW5zYWN0aW9uc1JlZHVjZXInXG5pbXBvcnQgdHJhbnNhY3Rpb25TdGFja1JlZHVjZXIgZnJvbSAnLi90cmFuc2FjdGlvbnMvdHJhbnNhY3Rpb25TdGFja1JlZHVjZXInXG5pbXBvcnQgd2ViM1JlZHVjZXIgZnJvbSAnLi93ZWIzL3dlYjNSZWR1Y2VyJ1xuXG5jb25zdCByZWR1Y2VyID0gY29tYmluZVJlZHVjZXJzKHtcbiAgYWNjb3VudHM6IGFjY291bnRzUmVkdWNlcixcbiAgYWNjb3VudEJhbGFuY2VzOiBhY2NvdW50QmFsYW5jZXNSZWR1Y2VyLFxuICBjb250cmFjdHM6IGNvbnRyYWN0c1JlZHVjZXIsXG4gIGRyaXp6bGVTdGF0dXM6IGRyaXp6bGVTdGF0dXNSZWR1Y2VyLFxuICB0cmFuc2FjdGlvbnM6IHRyYW5zYWN0aW9uc1JlZHVjZXIsXG4gIHRyYW5zYWN0aW9uU3RhY2s6IHRyYW5zYWN0aW9uU3RhY2tSZWR1Y2VyLFxuICB3ZWIzOiB3ZWIzUmVkdWNlclxufSlcblxuZXhwb3J0IGRlZmF1bHQgcmVkdWNlclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3JlZHVjZXIuanMiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/src/contracts/contractsReducer.js b/src/contracts/contractsReducer.js index 957eaace..f51e7b1f 100644 --- a/src/contracts/contractsReducer.js +++ b/src/contracts/contractsReducer.js @@ -7,7 +7,7 @@ const contractsReducer = (state = initialState, action) => { * Contract Status */ - if (action.type === 'ADD_CONTRACT') { + if (action.type === 'CONTRACT_INITIALIZING') { return { ...state, [action.contractConfig.contractName]: generateContractInitialState(action.contractConfig) diff --git a/src/contracts/contractsSaga.js b/src/contracts/contractsSaga.js index a0a15028..2b3b9449 100644 --- a/src/contracts/contractsSaga.js +++ b/src/contracts/contractsSaga.js @@ -6,6 +6,7 @@ export function* addContract({drizzle, contractConfig, events, web3}) { // Prevents double-adding contracts if (drizzle.loadingContract[contractConfig.contractName]) { return false } drizzle.loadingContract[contractConfig.contractName] = true + yield put({type: 'CONTRACT_INITIALIZING', contractConfig}) let drizzleContract if (contractConfig.web3Contract) { drizzleContract = yield call(instantiateWeb3Contract, {web3Contract: contractConfig.web3Contract, name: contractConfig.contractName, events, store: drizzle.store, web3})