From 108a8900718475070aa6d88bb5ea4d079e97a814 Mon Sep 17 00:00:00 2001 From: Doug Kent Date: Mon, 11 Dec 2017 18:11:31 -0500 Subject: [PATCH] #151 as well as a a bunch of other stuff required for the new repo (#1) * #151 as well as a a bunch of other stuff required for the new repo * remove a couple things * changed lintignore * changed package name --- .babelrc | 4 + .eslintignore | 2 + .eslintrc.json | 27 + .gitignore | 4 + .travis.yml | 26 + CONTRIBUTING.md | 54 + README.md | 20 + dist/arc.js | 18 +- dist/daostack.js | 54 +- dist/globalconstraintregistrar.js | 2 +- dist/organization.js | 319 +-- dist/schemeregistrar.js | 48 +- dist/settings.js | 34 +- dist/upgradescheme.js | 20 +- dist/utils.js | 60 +- lib/absoluteVote.js | 4 +- lib/arc.d.ts | 206 +- lib/arc.js | 42 +- lib/daostack.js | 53 +- lib/globalconstraintregistrar.js | 20 +- lib/organization.js | 404 +-- lib/schemeregistrar.js | 82 +- lib/settings.js | 23 +- lib/simplecontributionscheme.js | 36 +- lib/tokenCapGC.js | 4 +- lib/upgradescheme.js | 66 +- lib/utils.js | 66 +- lib/wallet.js | 38 +- package-lock.json | 4357 +++++++++++++++++++++++++++++ package.json | 70 + test/globalconstraintregistrar.js | 253 ++ test/helpers.js | 96 + test/organization.js | 119 + test/schemeregistrar.js | 123 + test/simplecontribution.js | 244 ++ test/upgradescheme.js | 138 + test/utils.js | 56 + test/wallet.js | 81 + tsconfig.json | 17 + 39 files changed, 6370 insertions(+), 920 deletions(-) create mode 100644 .babelrc create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 CONTRIBUTING.md create mode 100644 README.md create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 test/globalconstraintregistrar.js create mode 100644 test/helpers.js create mode 100644 test/organization.js create mode 100644 test/schemeregistrar.js create mode 100644 test/simplecontribution.js create mode 100644 test/upgradescheme.js create mode 100644 test/utils.js create mode 100644 test/wallet.js create mode 100644 tsconfig.json diff --git a/.babelrc b/.babelrc new file mode 100644 index 000000000..2d1e93509 --- /dev/null +++ b/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["es2015"], + "plugins": ["syntax-async-functions"] +} diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..b94707787 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules/ +dist/ diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..e2c035849 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,27 @@ +{ + "extends": "eslint:recommended", + "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module" + }, + "rules": { + "semi": 2, + "no-undef": "off", + "object-curly-newline": [ "error", { "multiline": true } ], + "no-trailing-spaces": [ "error", { "skipBlankLines": false, "ignoreComments": false} ], + "no-tabs": 2, + "no-var": 2, + "prefer-const": 2, + "prefer-spread": 2, + "prefer-rest-params": 2, + "prefer-arrow-callback": 2, + "no-duplicate-imports": 2, + "no-dupe-class-members": 2, + "no-const-assign": 2, + "no-confusing-arrow": 2, + "no-lonely-if": 2, + "no-continue": 2, + "indent": ["error", 2] + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..53d28cc12 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +.node-xmlhttprequest-sync* +*.tgz +.vscode/ \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..587377cf7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +dist: trusty + +language: node_js + +node_js: + - "7.10.0" + +before_install: + - sudo apt-get update -qq + - sudo apt-get install software-properties-common -y -qq + - sudo add-apt-repository -y ppa:ethereum/ethereum + - sudo add-apt-repository -y ppa:ethereum/ethereum-dev + - sudo apt-get update -qq + - sudo apt-get install geth -y -qq + +install: + - yarn + - rm -rf build/ # remove any remaining artifacts from a previous build + - nohup yarn run testrpc & + - truffle version + +script: + - yarn test + - yarn lint +notifications: + slack: daostack:fGuaFPsiQiV5mgmzRcSzbYqw diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..d6aa45f86 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ + +# Contributing + +Bug reports and pull requests very much welcomed. + +Please make sure test pass before submitting a PR. + +We try to follow the style guidelines from http://solidity.readthedocs.io/en/develop/style-guide.html + +The development id done on unix based systems. + +# Testing + +These contracts are tested using the truffle framework + +## Installation + +Make sure you have a recent version of [node.js](https://nodejs.org/) (7.6 and above) and [yarn](https://yarnpkg.com) package manager. + +Installation of dependencies. After cloning the repository run: + + yarn + + +## Run tests + +To run the test locally use a local blockchain using testrpc, just run: + + testrpc + +On a second terminal, run the tests: + + yarn run test + + +# Style + +For solidity, we are following the style guide here: http://solidity.readthedocs.io/en/develop/style-guide.html + +A Solidity linter (solium is installed, which can be run with: + + yarn run solium + +Code should survive Javascript linting as well: + + yarn run lint + +# Breakpoints + +if you run tests with: + + node debug ./node_modules/truffle/build/cli.bundled.js test + +it is possible to use `debugger` statemetns and inspect the state diff --git a/README.md b/README.md new file mode 100644 index 000000000..b4243d007 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +master: [![Build Status](https://travis-ci.org/daostack/daostack.svg?branch=master)](https://travis-ci.org/daostack/daostack) + +dev: [![Build Status](https://travis-ci.org/daostack/daostack.svg?branch=dev)](https://travis-ci.org/daostack/daostack) + + +# Mission Statement + +DAOStack is a widely open collaboration to build the basic framework for [Decentralized Autonomous Organizations](https://en.wikipedia.org/wiki/Decentralized_autonomous_organization) (DAO) through bootstrap, or dogfooding. + +Meaning, firstly publish the minimal smart contract that distributes tokens and voting power (AKA reputation) for further token distribution. Then, collectively distribute more tokens and voting power to contributors of code and other contributions, according to the appreciation of current reputation holders. Anyone who disagrees with the current reputation alignment can always open a new contract, with new token and reputation systems (and be the initial reputation holder). + +Gradually, bit by bit, we aim to build the first decentralized corporation, an array of contracts that can hold the tokens and voting power of each other, interact and form a decentralized economy. + + + +# Contributing + +Contributions and pull requests are very welcome. Check out [The DAOStack roadmap](docs/roadmap.md), and join us on [Slack](daostack.slack.com). + +If you want to contribute to the code, check out [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/dist/arc.js b/dist/arc.js index 412480d63..f60af2d72 100644 --- a/dist/arc.js +++ b/dist/arc.js @@ -130,17 +130,17 @@ function configure(options) { options; // for lint // not used at the moment: const network = options && options.network && options.network.name ? options.network.name : 'testrpc'; /** - * TODO: supply testrpc url in options? Problem is that at this point web3 has already been set in utils - * so it's too late at this point to set the url. Would need to somehow effect this initialization before - * any contract imports have been attempted. Need to figure out how to export the modules above somewhere - * else, or separately. - */ + * TODO: supply testrpc url in options? Problem is that at this point web3 has already been set in utils + * so it's too late at this point to set the url. Would need to somehow effect this initialization before + * any contract imports have been attempted. Need to figure out how to export the modules above somewhere + * else, or separately. + */ /** - * TODO: should we specify something here? - * See: https://mikemcl.github.io/bignumber.js/#config - BigNumber.config({...}); - */ + * TODO: should we specify something here? + * See: https://mikemcl.github.io/bignumber.js/#config + BigNumber.config({...}); + */ return (0, _utils.getWeb3)(); } diff --git a/dist/daostack.js b/dist/daostack.js index 61647cf16..7d22af2b2 100644 --- a/dist/daostack.js +++ b/dist/daostack.js @@ -1,7 +1,7 @@ 'use strict'; Object.defineProperty(exports, "__esModule", { - value: true + value: true }); exports.Organization = exports.daostack = undefined; @@ -16,33 +16,33 @@ var _organization = require('./organization.js'); var daostack = function () { - // async function _checkForNecessaryFunds() { - // // TODO: this is not working at all yet: the idea is that we check some precodnitions - // // to be able to give some useful user feedback - // return true; - // - // // check if we have tokens in the schemeregistrar for adding an organization - // const schemeRegistrarTokenAddress = await schemeRegistrar.nativeToken(); - // const schemeRegistrarToken = await DAOToken.at(schemeRegistrarTokenAddress); - // const avatarBalance = await schemeRegistrarToken.balanceOf(avatar.address); - // const fee = await schemeRegistrar.fee(); - // - // // check if we have the funds to pay the fee - // if (avatarBalance.toNumber() < fee.toNumber()) { - // throw new Error('The balance of the controller\'s avatar is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); - // } - // - // const beneficiary = await schemeRegistrar.beneficiary(); - // await controller.ExternalTokenApprove(schemeRegistrarToken, beneficiary, fee.toNumber()); - // // check if externaltokenapprove has indeed approved the right allowance - // // TODO: move this to a separate test on the controller - // const allowance = await schemeRegistrarToken.allowance(avatar.address, beneficiary); - // if (allowance.toNumber() < fee.toNumber()) { - // throw new Error('The allowance of the controllers avatar to the registrars beneficiary is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); - // } - // } + // async function _checkForNecessaryFunds() { + // // TODO: this is not working at all yet: the idea is that we check some precodnitions + // // to be able to give some useful user feedback + // return true; + // + // // check if we have tokens in the schemeregistrar for adding an organization + // const schemeRegistrarTokenAddress = await schemeRegistrar.nativeToken(); + // const schemeRegistrarToken = await DAOToken.at(schemeRegistrarTokenAddress); + // const avatarBalance = await schemeRegistrarToken.balanceOf(avatar.address); + // const fee = await schemeRegistrar.fee(); + // + // // check if we have the funds to pay the fee + // if (avatarBalance.toNumber() < fee.toNumber()) { + // throw new Error('The balance of the controller\'s avatar is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); + // } + // + // const beneficiary = await schemeRegistrar.beneficiary(); + // await controller.ExternalTokenApprove(schemeRegistrarToken, beneficiary, fee.toNumber()); + // // check if externaltokenapprove has indeed approved the right allowance + // // TODO: move this to a separate test on the controller + // const allowance = await schemeRegistrarToken.allowance(avatar.address, beneficiary); + // if (allowance.toNumber() < fee.toNumber()) { + // throw new Error('The allowance of the controllers avatar to the registrars beneficiary is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); + // } + // } - return {}; + return {}; }(); exports.daostack = daostack; diff --git a/dist/globalconstraintregistrar.js b/dist/globalconstraintregistrar.js index 254d14520..bbc666d35 100644 --- a/dist/globalconstraintregistrar.js +++ b/dist/globalconstraintregistrar.js @@ -118,7 +118,7 @@ var GlobalConstraintRegistrar = exports.GlobalConstraintRegistrar = function (_E }, { key: 'getDefaultPermissions', value: function getDefaultPermissions(overrideValue) { - return overrideValue || '0x00000005'; + return overrideValue || '0x00000007'; } }], [{ key: 'new', diff --git a/dist/organization.js b/dist/organization.js index eb45dfd07..6db5a4aa0 100644 --- a/dist/organization.js +++ b/dist/organization.js @@ -26,15 +26,10 @@ var Reputation = (0, _utils.requireContract)("Reputation"); var AbsoluteVote = (0, _utils.requireContract)("AbsoluteVote"); // import { UpgradeScheme } from './upgradescheme.js'; -var promisify = require('promisify'); - -// const SCHEME_PERMISSION_REGISTERING = 2; -// const SCHEME_PERMISSION_GLOBALCONSTRAINT = 4; -// const SCHEME_PERMISSION_UPGRADE = 8; var CONTRACT_SCHEMEREGISTRAR = 'SchemeRegistrar'; var CONTRACT_UPGRADESCHEME = 'UpgradeScheme'; var CONTRACT_GLOBALCONSTRAINTREGISTRAR = 'GlobalConstraintRegistrar'; -var CONTRACT_SIMPLECONTRIBUTIONSCHEME = 'SimpleContributionScheme'; +// const CONTRACT_SIMPLECONTRIBUTIONSCHEME = 'SimpleContributionScheme'; var Organization = exports.Organization = function () { function Organization() { @@ -43,76 +38,107 @@ var Organization = exports.Organization = function () { _createClass(Organization, [{ key: 'schemes', - value: async function schemes(contract) { + + + /** + * returns + * @param name linke "SchemeRegistrar" + */ + value: async function schemes(name) { // return the schemes registered on this controller satisfying the contract spec // return all schems if contract is not given var schemes = await this._getSchemes(); - if (contract) { + if (name) { return schemes.filter(function (s) { - return s.contract === contract; + return s.name === name; }); } else { return schemes; } } + + /** + * returns schemes currently in this Organization as Array + */ + }, { key: '_getSchemes', value: async function _getSchemes() { + var _this = this; + // private method returns all registered schemes. // TODO: this is *expensive*, we need to cache the results (and perhaps poll for latest changes if necessary) - var result = []; + var schemesMap = new Map(); // var controller = this.controller; + var arcTypesMap = new Map(); // var settings = await (0, _settings.getSettings)(); - // TODO: only subscribe to registerScheme events that are registering to this.controller.address - var registerSchemeEvent = controller.RegisterScheme({}, { fromBlock: 0, toBlock: 'latest' }); + /** + * TODO: This should pull in all known versions of the schemes, names + * and versions in one fell swoop. + */ + for (var name in settings.daostackContracts) { + var _contract = settings.daostackContracts[name]; + arcTypesMap.set(_contract.address, name); + } - var logs = await promisify.cb_func()(function (cb) { - registerSchemeEvent.get(cb); - })(); - registerSchemeEvent.stopWatching(); + var registerSchemeEvent = controller.RegisterScheme({}, { fromBlock: 0, toBlock: 'latest' }); - // get scheme address from the logs - var addresses = logs.map(function (log) { - return log.args._scheme; + await new Promise(function (resolve) { + registerSchemeEvent.get(function (err, eventsArray) { + return _this._handleSchemeEvent(err, eventsArray, true, arcTypesMap, schemesMap).then(function () { + resolve(); + }); + }); + registerSchemeEvent.stopWatching(); }); - var permissions = void 0, - i = void 0, - scheme = void 0; - // we derive the type of scheme from its permissions, which is at most approximate. - for (i = 0; i < addresses.length; i++) { - permissions = await controller.getSchemePermissions(addresses[i]); + var unRegisterSchemeEvent = controller.UnregisterScheme({}, { fromBlock: 0, toBlock: 'latest' }); + + await new Promise(function (resolve) { + unRegisterSchemeEvent.get(function (err, eventsArray) { + return _this._handleSchemeEvent(err, eventsArray, false, arcTypesMap, schemesMap).then(function () { + resolve(); + }); + }); + unRegisterSchemeEvent.stopWatching(); + }); - scheme = { - address: addresses[i], - permissions: permissions + return Array.from(schemesMap.values()); + } + }, { + key: '_handleSchemeEvent', + value: async function _handleSchemeEvent(err, eventsArray, adding, arcTypesMap, schemesMap) // : Promise + { + if (!(eventsArray instanceof Array)) { + eventsArray = [eventsArray]; + } + var count = eventsArray.length; + for (var i = 0; i < count; i++) { + var schemeAddress = eventsArray[i].args._scheme; + // will be all zeros if not registered + var permissions = await this.controller.getSchemePermissions(schemeAddress); + + var schemeInfo = { + address: schemeAddress, + permissions: permissions, + // will be undefined if not a known scheme + name: arcTypesMap.get(schemeAddress) }; - if (parseInt(permissions) === 0) { - // contract = 'unregistered' - we ignore it - // } else if ((parseInt(permissions) & SCHEME_PERMISSION_REGISTERING) === SCHEME_PERMISSION_REGISTERING) { - } else if (addresses[i] === String(settings.daostackContracts.SchemeRegistrar.address)) { - scheme['contract'] = CONTRACT_SCHEMEREGISTRAR; - result.push(scheme); - // } else if ((parseInt(permissions) & SCHEME_PERMISSION_UPGRADE) === SCHEME_PERMISSION_UPGRADE) { - } else if (addresses[i] === String(settings.daostackContracts.UpgradeScheme.address)) { - scheme['contract'] = CONTRACT_UPGRADESCHEME; - result.push(scheme); - // } else if ((parseInt(permissions) & SCHEME_PERMISSION_GLOBALCONSTRAINT) === SCHEME_PERMISSION_GLOBALCONSTRAINT) { - } else if (addresses[i] === String(settings.daostackContracts.GlobalConstraintRegistrar.address)) { - scheme['contract'] = CONTRACT_GLOBALCONSTRAINTREGISTRAR; - result.push(scheme); - } else if (addresses[i] === String(settings.daostackContracts.SimpleContributionScheme.address)) { - scheme['contract'] = CONTRACT_SIMPLECONTRIBUTIONSCHEME; - result.push(scheme); - } else { - scheme['contract'] = null; - result.push(scheme); + if (adding) { + schemesMap.set(schemeAddress, schemeInfo); + } else if (schemesMap.has(schemeAddress)) { + schemesMap.delete(schemeAddress); } } - return result; } + + /** + * Returns promise of a scheme as ExtendTruffleScheme, or ? if not found + * @param contract name of scheme, like "SchemeRegistrar" + */ + }, { key: 'scheme', value: async function scheme(contract) { @@ -146,176 +172,6 @@ var Organization = exports.Organization = function () { } return true; } - - // async proposeScheme(opts={}) { - - // const settings = await getSettings(); - - // const defaults = { - // contract: undefined, - // address: null, - // params: {}, - // }; - - // const options = dopts(opts, defaults, { allowUnknown: true }); - - // let tx; - - // const schemeRegistrar = await this.scheme('SchemeRegistrar'); - - // if (options.contract === 'SimpleICO') { - // const scheme = await SimpleICO.at(settings.daostackContracts.SimpleICO.address); - // // TODO: check which default params should be required - // const defaultParams = { - // cap: 0, // uint _cap, - // price: 0, // uint _price, - // startBlock: 0, // uint _startBlock, - // endBlock: 0, // uint _endBlock, - // beneficiary: NULL_ADDRESS, // address _beneficiary, - // admin: NULL_ADDRESS,// address _admin) returns(bytes32) { - // }; - // // tod: all 'null' params are required - // options.params = dopts(options.params, defaultParams); - - // // TODO: create the parameters hash on the basis of the options - // await scheme.setParameters( - // options.params.cap, - // options.params.price, - // options.params.startBlock, - // options.params.endBlock, - // options.params.beneficiary, - // options.params.admin, - // ); - // const parametersHash = await scheme.getParametersHash( - // options.params.cap, - // options.params.price, - // options.params.startBlock, - // options.params.endBlock, - // options.params.beneficiary, - // options.params.admin, - // ); - // const tokenForFee = await scheme.nativeToken(); - // const fee = await scheme.fee(); - // const autoRegister = false; - // tx = await schemeRegistrar.proposeScheme( - // this.avatar.address, // Avatar _avatar, - // scheme.address, //address _scheme, - // parametersHash, // bytes32 _parametersHash, - // false, // bool _isRegistering, - // tokenForFee, // StandardToken _tokenFee, - // fee, // uint _fee - // autoRegister // bool _autoRegister - // ); - // const proposalId = await getValueFromLogs(tx, '_proposalId'); - // return proposalId; - - - // } else if (options.contract === CONTRACT_SIMPLECONTRIBUTIONSCHEME) { - // // get the scheme - // const defaultParams = { - // votePrec: 50, // used for SimpleContributionScheme - // ownerVote: true, - // intVote: this.votingMachine.address, // used for SimpleContributionScheme - // orgNativeTokenFee: 0, // used for SimpleContributionScheme - // schemeNativeTokenFee: 0, // used for SimpleContributionScheme - // }; - // // tod: all 'null' params are required - // options.params = dopts(options.params, defaultParams); - - // const scheme = await SimpleContributionScheme.at(options.address || settings.daostackContracts.SimpleContributionScheme.address); - // const votingMachine = AbsoluteVote.at(options.params.intVote); - // // check if voteApporveParams are known on the votingMachine - // await votingMachine.setParameters(this.reputation.address, options.params.votePrec, options.params.ownerVote); - // const voteApproveParams = await votingMachine.getParametersHash(this.reputation.address, options.params.votePrec, options.params.ownerVote); - - // // const unpackedParams = await votingMachine.parameters(voteApproveParams); - // // let msg = 'it seems your voteApproveParams are not known on this votingMachine'; - // // assert.isOk(unpackedParams[0], msg); - - // const parametersHash = await scheme.getParametersHash( - // options.params.orgNativeTokenFee, - // options.params.schemeNativeTokenFee, - // voteApproveParams, - // votingMachine.address, - // ); - // await scheme.setParameters( - // options.params.orgNativeTokenFee, // uint orgNativeTokenFee; // a fee (in the organization's token) that is to be paid for submitting a contribution - // options.params.schemeNativeTokenFee, // uint schemeNativeTokenFee; // a fee (in the present schemes token) that is to be paid for submission - // voteApproveParams, // bytes32 voteApproveParams; - // votingMachine.address, - // ); - - // const feeToken = await scheme.nativeToken(); - // const fee = await scheme.fee(); - // const autoRegister = false; - - // tx = await schemeRegistrar.proposeScheme( - // this.avatar.address, // Avatar _avatar, - // scheme.address, //address _scheme, - // parametersHash, // bytes32 _parametersHash, - // false, // bool _isRegistering, - // feeToken, // StandardToken _tokenFee, - // fee, // uint _fee - // autoRegister // bool _autoRegister - // ); - // const proposalId = await getValueFromLogs(tx, '_proposalId'); - // return proposalId; - // } else { - // throw new Error('Unknown contract'); - // } - // } - - // async proposeGlobalConstraint(opts= {}) { - // const settings = await getSettings(); - // const defaults = { - // contract: null, - // address: null, - // params: {}, - // paramsHash: null, - // // next three options regard removing a global constraint - // votingMachine: this.votingMachine.address, - // reputation: this.reputation.address, - // absPrecReq: 50, - // }; - - // const options = dopts(opts, defaults, { allowUnknown: true }); - - // if (options.contract==='TokenCapGC') { - // options.address = options.address || settings.daostackContracts.TokenCapGC.address; - // const tokenCapGC = await TokenCapGC.at(options.address); - - // if (options.paramsHash) { - // // TODO: check if paramsHash is registered - // } else { - // const defaultParams = { - // token: null, - // tokenAddress: this.token.address, - // cap: 21e9, - // }; - // let params = dopts(options.params, defaultParams); - - // await tokenCapGC.setParameters(params.tokenAddress, params.cap); - // options.paramsHash = await tokenCapGC.getParametersHash(params.tokenAddress, params.cap); - // } - - // } else { - // if (options.address) { - // // - // } else { - // let msg = 'Either "contract" or "address" must be provided'; - // throw new Error(msg); - // } - // } - // // calculate (and set) the hash that will be used to remove the parameters - // await AbsoluteVote.at(options.votingMachine).setParameters(options.reputation, options.absPrecReq, true); - // options.votingMachineHash = await AbsoluteVote.at(options.votingMachine).getParametersHash(options.reputation, options.absPrecReq, true); - - // const globalConstraintRegistrar = await this.scheme('GlobalConstraintRegistrar'); - // let tx = await globalConstraintRegistrar.proposeGlobalConstraint(this.avatar.address, options.address, options.paramsHash, options.votingMachineHash); - // const proposalId = getValueFromLogs(tx, '_proposalId'); - // return proposalId; - // } - }, { key: 'vote', value: function vote(proposalId, choice, params) { @@ -346,24 +202,21 @@ var Organization = exports.Organization = function () { schemeNativeTokenFee: 0, // used for SimpleContributionScheme genesisScheme: settings.daostackContracts.GenesisScheme.address, schemes: [{ - contract: CONTRACT_SCHEMEREGISTRAR, + name: CONTRACT_SCHEMEREGISTRAR, address: settings.daostackContracts.SchemeRegistrar.address }, { - contract: CONTRACT_UPGRADESCHEME, + name: CONTRACT_UPGRADESCHEME, address: settings.daostackContracts.UpgradeScheme.address }, { - contract: CONTRACT_GLOBALCONSTRAINTREGISTRAR, + name: CONTRACT_GLOBALCONSTRAINTREGISTRAR, address: settings.daostackContracts.GlobalConstraintRegistrar.address }] }; var options = dopts(opts, defaults, { allowUnknown: true }); - - var tx = void 0; - var genesisScheme = await GenesisScheme.at(options.genesisScheme); - tx = await genesisScheme.forgeOrg(options.orgName, options.tokenName, options.tokenSymbol, options.founders.map(function (x) { + var tx = await genesisScheme.forgeOrg(options.orgName, options.tokenName, options.tokenSymbol, options.founders.map(function (x) { return x.address; }), options.founders.map(function (x) { return x.tokens; @@ -406,21 +259,21 @@ var Organization = exports.Organization = function () { var optionScheme = _step.value; - var arcSchemeInfo = settings.daostackContracts[optionScheme.contract]; - var scheme = await arcSchemeInfo.contract.at(optionScheme.address || arcSchemeInfo.address); + var arcSchemeInfo = settings.daostackContracts[optionScheme.name]; + var _scheme = await arcSchemeInfo.contract.at(optionScheme.address || arcSchemeInfo.address); - var paramsHash = await scheme.setParams({ + var paramsHash = await _scheme.setParams({ voteParametersHash: voteParametersHash, votingMachine: org.votingMachine.address, orgNativeTokenFee: options.orgNativeTokenFee, schemeNativeTokenFee: options.schemeNativeTokenFee }); - initialSchemesAddresses.push(scheme.address); + initialSchemesAddresses.push(_scheme.address); initialSchemesParams.push(paramsHash); - initialSchemesTokenAddresses.push((await scheme.nativeToken())); - initialSchemesFees.push((await scheme.fee())); - initialSchemesPermissions.push(scheme.getDefaultPermissions() /* supply options.permissions here? */); + initialSchemesTokenAddresses.push((await _scheme.nativeToken())); + initialSchemesFees.push((await _scheme.fee())); + initialSchemesPermissions.push(_scheme.getDefaultPermissions() /* supply options.permissions here? */); } // register the schemes with the organization diff --git a/dist/schemeregistrar.js b/dist/schemeregistrar.js index 4658bdcec..32b2a6249 100644 --- a/dist/schemeregistrar.js +++ b/dist/schemeregistrar.js @@ -37,11 +37,11 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) /** * Note relating to permissions: According rules defined in the Controller, - * this SchemeRegistrar is only capable of registering schemes that have + * this SchemeRegistrar is only capable of registering schemes that have * either no permissions or have the permission to register other schemes. - * Therefore Arc's SchemeRegistrar is not capable of registering schemes + * Therefore Arc's SchemeRegistrar is not capable of registering schemes * that have permissions greater than its own, thus excluding schemes having - * the permission to add/remove global constraints or upgrade the controller. + * the permission to add/remove global constraints or upgrade the controller. * The Controller will throw an exception when an attempt is made * to add or remove schemes having greater permissions than the scheme attempting the change. */ @@ -52,7 +52,7 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) /** * Note that explicitly supplying any property with a value of undefined will prevent the property * from taking on its default value (weird behavior of default-options). - * + * */ var defaults = { /** @@ -67,7 +67,7 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) * scheme identifier, like "SchemeRegistrar" or "SimpleContributionScheme". * pass null if registering a non-arc scheme */ - , schemeKey: null + , schemeName: null /** * hash of scheme parameters. These must be already registered with the new scheme. */ @@ -75,29 +75,29 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) /** * The fee that the scheme charges to register an organization in the scheme. The controller * will be asked in advance to approve this expenditure. - * - * If schemeKey is given but fee is not then we use the amount of the fee of the - * Arc scheme given by scheme and schemeKey. - * - * Fee is required when schemeKey is not given (non-Arc schemes). - * + * + * If schemeName is given but fee is not then we use the amount of the fee of the + * Arc scheme given by scheme and schemeName. + * + * Fee is required when schemeName is not given (non-Arc schemes). + * * The fee is paid using the token given by tokenAddress. In Wei. */ , fee: null /** * The token used to pay the fee that the scheme charges to register an organization in the scheme. - * - * If schemeKey is given but tokenAddress is not then we use the token address of the - * Arc scheme given by scheme and schemeKey. - * - * tokenAddress is required when schemeKey is not given (non-Arc schemes). + * + * If schemeName is given but tokenAddress is not then we use the token address of the + * Arc scheme given by scheme and schemeName. + * + * tokenAddress is required when schemeName is not given (non-Arc schemes). */ , tokenAddress: null /** * true if the given scheme is able to register/unregister/modify schemes. - * - * isRegistering should only be supplied when schemeKey is not given (and thus the scheme is non-Arc). - * Otherwise we determine it's value based on scheme and schemeKey. + * + * isRegistering should only be supplied when schemeName is not given (and thus the scheme is non-Arc). + * Otherwise we determine it's value based on scheme and schemeName. */ , isRegistering: null /** @@ -132,10 +132,10 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) var tokenAddress = options.tokenAddress; var isRegistering = void 0; - if (options.schemeKey) { + if (options.schemeName) { try { var settings = await (0, _settings.getSettings)(); - var newScheme = await settings.daostackContracts[options.schemeKey].contract.at(options.scheme); + var newScheme = await settings.daostackContracts[options.schemeName].contract.at(options.scheme); if (!feeIsDefined || !tokenAddressIsDefined) { if (!feeIsDefined) { @@ -148,7 +148,7 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) isRegistering = (permissions & 2) != 0; - // Note that the javascript wrapper "newScheme" we've gotten here is defined in this version of Arc. If newScheme is + // Note that the javascript wrapper "newScheme" we've gotten here is defined in this version of Arc. If newScheme is // actually coming from a different version of Arc, then theoretically the permissions could be different from this version. var permissions = Number(newScheme.getDefaultPermissions()); @@ -163,11 +163,11 @@ var SchemeRegistrar = exports.SchemeRegistrar = function (_ExtendTruffleContrac) isRegistering = options.isRegistering; if (!feeIsDefined || !tokenAddressIsDefined) { - throw new Error("fee/tokenAddress are not defined; they are required for non-Arc schemes (schemeKey is undefined)"); + throw new Error("fee/tokenAddress are not defined; they are required for non-Arc schemes (schemeName is undefined)"); } if (isRegistering === null) { - throw new Error("isRegistering is not defined; it is required for non-Arc schemes (schemeKey is undefined)"); + throw new Error("isRegistering is not defined; it is required for non-Arc schemes (schemeName is undefined)"); } if (fee < 0) { diff --git a/dist/settings.js b/dist/settings.js index 67781c0db..f9cf62a9f 100644 --- a/dist/settings.js +++ b/dist/settings.js @@ -1,31 +1,41 @@ -'use strict'; +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSettings = undefined; -var _utils = require('./utils.js'); +var _utils = require("./utils.js"); -var _globalconstraintregistrar = require('./globalconstraintregistrar.js'); +var _globalconstraintregistrar = require("./globalconstraintregistrar.js"); -var _schemeregistrar = require('./schemeregistrar.js'); +var _schemeregistrar = require("./schemeregistrar.js"); -var _simplecontributionscheme = require('./simplecontributionscheme.js'); +var _simplecontributionscheme = require("./simplecontributionscheme.js"); -var _absoluteVote = require('./absoluteVote.js'); +var _absoluteVote = require("./absoluteVote.js"); -var _tokenCapGC = require('./tokenCapGC.js'); +var _tokenCapGC = require("./tokenCapGC.js"); -var _upgradescheme = require('./upgradescheme.js'); +var _upgradescheme = require("./upgradescheme.js"); // TODO: these are settings for testing. Need some way to switch to "production settings" var GenesisScheme = (0, _utils.requireContract)("GenesisScheme"); - var SimpleICO = (0, _utils.requireContract)("SimpleICO"); +/** + * These are uninitialized instances of ExtendTruffleContract, + * effectively class factories. + */ + var getSettings = async function getSettings() { + /** + * These are deployed contract instances represented by their respective Arc + * javascript wrappers (ExtendTruffleContract). + * + * `deployed()` is a static method on each of those classes. + **/ var contributionScheme = await _simplecontributionscheme.SimpleContributionScheme.deployed(); var genesisScheme = await GenesisScheme.deployed(); var globalConstraintRegistrar = await _globalconstraintregistrar.GlobalConstraintRegistrar.deployed(); @@ -35,6 +45,12 @@ var getSettings = async function getSettings() { var upgradeScheme = await _upgradescheme.UpgradeScheme.deployed(); var absoluteVote = await _absoluteVote.AbsoluteVote.deployed(); + /** + * `contract` here is an uninitialized instance of ExtendTruffleContract, + * basically the class factory. + * Calling contract.at() (a static method on the class) will return a + * the properly initialized instance of ExtendTruffleContract. + */ return { votingMachine: absoluteVote.address, daostackContracts: { diff --git a/dist/upgradescheme.js b/dist/upgradescheme.js index a37a63898..548e6b5a2 100644 --- a/dist/upgradescheme.js +++ b/dist/upgradescheme.js @@ -36,8 +36,8 @@ var UpgradeScheme = exports.UpgradeScheme = function (_ExtendTruffleContrac) { /******************************************* - * proposeController - */ + * proposeController + */ value: async function proposeController() { var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; @@ -68,8 +68,8 @@ var UpgradeScheme = exports.UpgradeScheme = function (_ExtendTruffleContrac) { } /******************************************** - * proposeUpgradingScheme - */ + * proposeUpgradingScheme + */ }, { key: 'proposeUpgradingScheme', @@ -98,24 +98,24 @@ var UpgradeScheme = exports.UpgradeScheme = function (_ExtendTruffleContrac) { * true to register organization into the scheme when the proposal is approved. * If false then caller must do it manually via scheme.registerOrganization(avatarAddress). * Default is true. - * + * * [This needs to be implemented] , autoRegister:true */ /** * The fee that the scheme charges to register an organization in the new upgrade scheme. * The controller will be asked in advance to approve this expenditure. - * + * * If the new UpgradeScheme is an Arc scheme, you may omit fee and we will * obtain the values directly from the submitted scheme. * Otherwise fee is required. - * + * * The fee is paid using the token given by tokenAddress. In Wei. */ , fee: null /** * address of token that will be used when paying the fee. - * + * * If the new UpgradeScheme is an Arc scheme, you may omit tokenAddress and we will * obtain the values directly from the submitted scheme. * Otherwise tokenAddress is required. @@ -158,7 +158,7 @@ var UpgradeScheme = exports.UpgradeScheme = function (_ExtendTruffleContrac) { tokenAddress = await newScheme.nativeToken(); } } catch (ex) { - throw new Error("Unable to obtain default information from the given scheme address. The scheme is probably not an Arc UpgradeScheme and in that case you must supply fee and tokenAddress."); + // throw new Error("Unable to obtain default information from the given scheme address. The scheme is probably not an Arc UpgradeScheme and in that case you must supply fee and tokenAddress."); } } @@ -178,7 +178,7 @@ var UpgradeScheme = exports.UpgradeScheme = function (_ExtendTruffleContrac) { }, { key: 'getDefaultPermissions', value: function getDefaultPermissions(overrideValue) { - return overrideValue || '0x00000009'; + return overrideValue || '0x0000000b'; } }], [{ key: 'new', diff --git a/dist/utils.js b/dist/utils.js index 91b9b658a..c958ecfa0 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -7,8 +7,6 @@ exports.ExtendTruffleContract = exports.NULL_HASH = exports.NULL_ADDRESS = undef var _createClass = 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; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - exports.requireContract = requireContract; exports.getWeb3 = getWeb3; exports.getValueFromLogs = getValueFromLogs; @@ -29,10 +27,11 @@ var NULL_ADDRESS = exports.NULL_ADDRESS = '0x00000000000000000000000000000000000 var NULL_HASH = exports.NULL_HASH = '0x0000000000000000000000000000000000000000000000000000000000000000'; /** - * Returns TruffleContract given the name of the contract. + * Returns TruffleContract given the name of the contract (like "SchemeRegistrar"), or undefined + * if not found or any other error occurs. * - * When testing or migrating, uses .sol - * Elsewhere (development, production), uses migrated .json + * This is not an Arc javascript wrapper, rather it is the straight TruffleContract + * that one references in the Arc javascript wrapper as ".contract". * * Side effect: It initializes (and uses) `web3` if a global `web3` is not already present, which * happens when running in the context of an application (as opposed to tests or migration). @@ -40,29 +39,24 @@ var NULL_HASH = exports.NULL_HASH = '0x00000000000000000000000000000000000000000 * @param contractName */ function requireContract(contractName) { - if ((typeof artifacts === 'undefined' ? 'undefined' : _typeof(artifacts)) == 'object') { - return artifacts.require('./' + contractName + '.sol'); - } else { - - try { - var myWeb3 = getWeb3(); - - var artifact = require('../build/contracts/' + contractName + '.json'); - var _contract = new TruffleContract(artifact); - - _contract.setProvider(myWeb3.currentProvider); - _contract.defaults({ - from: getDefaultAccount(), - gas: 0x442168 - }); - return _contract; - } catch (ex) { - return undefined; - } + try { + var myWeb3 = getWeb3(); + + var artifact = require('../build/contracts/' + contractName + '.json'); + var _contract = new TruffleContract(artifact); + + _contract.setProvider(myWeb3.currentProvider); + _contract.defaults({ + from: getDefaultAccount(), + gas: 0x442168 + }); + return _contract; + } catch (ex) { + return undefined; } } -var _web3; +var _web3 = void 0; var alreadyTriedAndFailed = false; /** @@ -79,7 +73,7 @@ function getWeb3() { throw new Error("already tried and failed"); } - var preWeb3; + var preWeb3 = void 0; // already defined under `window`? if (typeof window !== "undefined" && typeof window.web3 !== "undefined") { @@ -136,10 +130,8 @@ function getValueFromLogs(tx, arg, eventName) { var msg = 'getValueFromLogs: There is no event logged with eventName ' + eventName; throw new Error(msg); } - } else { - if (index === undefined) { - index = tx.logs.length - 1; - } + } else if (index === undefined) { + index = tx.logs.length - 1; } var result = tx.logs[index].args[arg]; if (!result) { @@ -210,10 +202,12 @@ var ExtendTruffleContract = exports.ExtendTruffleContract = function ExtendTruff }, { key: '_setParameters', value: async function _setParameters() { - var _contract2, _contract3; + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - var parametersHash = await (_contract2 = this.contract).getParametersHash.apply(_contract2, arguments); - await (_contract3 = this.contract).setParameters.apply(_contract3, arguments); + var parametersHash = await this.contract.getParametersHash(args); + await this.contract.setParameters(args); return parametersHash; } diff --git a/lib/absoluteVote.js b/lib/absoluteVote.js index e8bcffd70..5d5320f2a 100644 --- a/lib/absoluteVote.js +++ b/lib/absoluteVote.js @@ -12,6 +12,6 @@ export class AbsoluteVote extends ExtendTruffleContract(SolidityAbsoluteVote) { } async setParams(params) { - return await this._setParameters(params.reputation, params.votePrec, params.ownerVote); - } + return await this._setParameters(params.reputation, params.votePrec, params.ownerVote); + } } diff --git a/lib/arc.d.ts b/lib/arc.d.ts index 9a8a00c9b..3ae792b62 100644 --- a/lib/arc.d.ts +++ b/lib/arc.d.ts @@ -4,13 +4,19 @@ import * as Web3 from "web3"; declare module 'daostack-arc' { /******************************* - * Arc + * Arc contract information as contained in ArcDeployedContractNames (see settings) */ export interface ArcContractInfo { /** - * TruffleContract as obtained via require() + * An uninitialized instance of ExtendTruffleContract, + * basically the class factory with static methods. */ contract: any; + /** + * address of the instance deployed by Arc. + * Calling contract.at() (a static method on ExtendTruffleContract) will return a + * the properly initialized instance of ExtendTruffleContract. + */ address: string; } @@ -18,7 +24,7 @@ export interface ArcContractInfo { * An object with property names being a contract key and property value as the corresponding ArcContractInfo. * For all deployed contracts exposed by Arc. */ -export interface ArcDeployedContractKeys { +export interface ArcDeployedContractNames { SimpleContributionScheme: ArcContractInfo; GenesisScheme: ArcContractInfo; GlobalConstraintRegistrar: ArcContractInfo; @@ -30,10 +36,11 @@ export interface ArcDeployedContractKeys { } /** - * ArcDeployedContractKeys, and those contracts organized by type. + * ArcDeployedContractNames, and those contracts organized by type. + * Call it.at(it.address) to get javascript wrapper */ export interface ArcDeployedContracts { - allContracts : ArcDeployedContractKeys; + allContracts : ArcDeployedContractNames; /** * All deployed schemes */ @@ -52,61 +59,13 @@ export interface ArcDeployedContracts { export function configure(options : any): Web3; export function getDeployedContracts() : ArcDeployedContracts; -/******************************* - * Wallet - */ -export class Wallet { - static new() : Wallet; - static fromEncrypted(encryptedJSON: string, password: string) : Wallet - static fromMnemonic(mnemonic: string) : Wallet - static fromPrivateKey(privateKey : string) : Wallet - - encrypt(password: string, progressCallback: (progress: number) => void) : string - getEtherBalance(inWei? : boolean) : BigNumber.BigNumber | string - getMnemonic() : string - getOrgTokenBalance(organizationAvatarAddress : string, inWei? : boolean) : BigNumber.BigNumber | string - getPublicAddress() : string - getProvider() : any - sendEther(accountAddress : string, numEther: number | string) : any // TODO return value - sendOrgTokens(organizationAvatarAddress : string, toAccountAddress : string, numTokens : number | string) : any // TODO return value +export interface OrganizationSchemeInfo +{ + name: string; + address: string; + permissions: string; } -/******************************** - * Organization - */ -export class Organization { - /** - * includes static `new` and `at` - */ - avatar: any; - /** - * Controller truffle contract - */ - controller: any; - /** - * DAOToken truffle contract - */ - token: any; - /** - * Reputation truffle contract - */ - reputation: any; - /** - * AbsoluteVote truffle contract - */ - votingMachine: any; - - schemes(contractName?:string) : any; - scheme(contractName:string) : any; - // checkSchemeConditions(contractName:string); - // proposeScheme(options?); - // proposeGlobalConstraint(options?); - // vote(proposalId, choice, params); - static new(options:any): Organization; - static at(avatarAddress:string): Organization; -} - - /******************************** * Utils */ @@ -154,7 +113,12 @@ export interface TransactionReceiptTruffle { tx: string // address of the transaction } -export function requireContract(contractName : string): any; +/** + * Returns TruffleContract given the name of the contract (like "SchemeRegistrar"), or undefined + * if not found or any other error occurs. + * @param contractName like "SchemeRegistrar" + */ +export function requireContract(contractName : string): Promise; export function getWeb3():Web3; export function getValueFromLogs(tx:TransactionReceiptTruffle, arg:string, eventName:string, index:number):string; export function getDefaultAccount():any; @@ -163,12 +127,15 @@ export class ExtendTruffleContract { static new(options:any): any; static at(address:string): any; static deployed(): any; - + /** + * the underlying truffle contract object + */ + public contract: any; /** * Call setParameters on this contract, returning promise of the parameters hash. * @params Should contain property names expected by the specific contract type. */ - setParams(params: any): string; + public setParams(params: any): Promise; } export class ExtendTruffleScheme extends ExtendTruffleContract { @@ -196,6 +163,83 @@ export interface StandardSchemeParams { votingMachine: string // address } +export interface FounderConfig { + address: string; + tokens: number; // in Wei + reputation: number; +} + +export interface OrganizationNewConfig { + orgName: string; + tokenName: string; + tokenSymbol: string; + founders: Array; + votingMachine: string, // address + votePrec: Number, + ownerVote: boolean, + schemes: Array<{ name: string, address: string }> +} + + + +/******************************** + * Organization + */ +export class Organization { + /** + * includes static `new` and `at` + */ + avatar: any; + /** + * Controller truffle contract + */ + controller: any; + /** + * DAOToken truffle contract + */ + token: any; + /** + * Reputation truffle contract + */ + reputation: any; + /** + * AbsoluteVote truffle contract + */ + votingMachine: any; + + schemes(contractName?:string) : Promise>; + /** + * Returns promise of a scheme as ExtendTruffleScheme, or ? if not found + * @param contract name of scheme, like "SchemeRegistrar" + */ + scheme(contractName:string) : Promise; + // checkSchemeConditions(contractName:string); + // proposeScheme(options?); + // proposeGlobalConstraint(options?); + // vote(proposalId, choice, params); + static new(options:OrganizationNewConfig): Promise; + static at(avatarAddress:string): Promise; +} + +/******************************* + * Wallet + */ +export class Wallet { + static new() : Wallet; + static fromEncrypted(encryptedJSON: string, password: string) : Wallet + static fromMnemonic(mnemonic: string) : Wallet + static fromPrivateKey(privateKey : string) : Wallet + + encrypt(password: string, progressCallback: (progress: number) => void) : string + getEtherBalance(inWei? : boolean) : BigNumber.BigNumber | string + getMnemonic() : string + getOrgTokenBalance(organizationAvatarAddress : string, inWei? : boolean) : BigNumber.BigNumber | string + getPublicAddress() : string + getProvider() : any + sendEther(accountAddress : string, numEther: number | string) : any // TODO return value + sendOrgTokens(organizationAvatarAddress : string, toAccountAddress : string, numTokens : number | string) : any // TODO return value +} + /******************************** * GlobalConstraintRegistrar */ @@ -242,14 +286,14 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { * propose to add or modify a global constraint * @param opts ProposeToAddModifyGlobalConstraintParams */ - proposeToAddModifyGlobalConstraint(opts: ProposeToAddModifyGlobalConstraintParams): TransactionReceiptTruffle; + proposeToAddModifyGlobalConstraint(opts: ProposeToAddModifyGlobalConstraintParams): Promise; /** * propose to remove a global constraint * @param opts ProposeToRemoveGlobalConstraintParams */ - proposeToRemoveGlobalConstraint(opts: ProposeToRemoveGlobalConstraintParams): TransactionReceiptTruffle; + proposeToRemoveGlobalConstraint(opts: ProposeToRemoveGlobalConstraintParams): Promise; - setParams(params: GlobalConstraintRegistrarParams): string; + setParams(params: GlobalConstraintRegistrarParams): Promise; } /******************************** @@ -272,7 +316,7 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { * scheme identifier, like "SchemeRegistrar" or "SimpleContributionScheme". * pass null if registering a non-arc scheme */ - , schemeKey?: string|null + , schemeName?: string|null /** * hash of scheme parameters. These must be already registered with the new scheme. */ @@ -281,10 +325,10 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { * The fee that the scheme charges to register an organization in the scheme. The controller * will be asked in advance to approve this expenditure. * - * If schemeKey is given but fee is not then we use the amount of the fee of the - * Arc scheme given by scheme and schemeKey. + * If schemeName is given but fee is not then we use the amount of the fee of the + * Arc scheme given by scheme and schemeName. * - * Fee is required when schemeKey is not given (non-Arc schemes). + * Fee is required when schemeName is not given (non-Arc schemes). * * The fee is paid using the token given by tokenAddress. In Wei. */ @@ -292,17 +336,17 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { /** * The token used to pay the fee that the scheme charges to register an organization in the scheme. * - * If schemeKey is given but tokenAddress is not then we use the token address of the - * Arc scheme given by scheme and schemeKey. + * If schemeName is given but tokenAddress is not then we use the token address of the + * Arc scheme given by scheme and schemeName. * - * tokenAddress is required when schemeKey is not given (non-Arc schemes). + * tokenAddress is required when schemeName is not given (non-Arc schemes). */ , tokenAddress?: string | null /** * true if the given scheme is able to register/unregister/modify schemes. * - * isRegistering should only be supplied when schemeKey is not given (and thus the scheme is non-Arc). - * Otherwise we determine it's value based on scheme and schemeKey. + * isRegistering should only be supplied when schemeName is not given (and thus the scheme is non-Arc). + * Otherwise we determine it's value based on scheme and schemeName. */ , isRegistering?: boolean|null /** @@ -332,13 +376,13 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { * propose to add or modify a scheme * @param opts ProposeToAddModifySchemeParams */ - proposeToAddModifyScheme(opts: ProposeToAddModifySchemeParams): TransactionReceiptTruffle; + proposeToAddModifyScheme(opts: ProposeToAddModifySchemeParams): Promise; /** * propose to remove a scheme * @param opts ProposeToRemoveSchemeParams */ - proposeToRemoveScheme(opts: ProposeToRemoveSchemeParams): TransactionReceiptTruffle; - setParams(params: SchemeRegistrarParams): string; + proposeToRemoveScheme(opts: ProposeToRemoveSchemeParams): Promise; + setParams(params: SchemeRegistrarParams): Promise; } /******************************** @@ -407,13 +451,13 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { * propose to replace this UpgradingScheme * @param opts ProposeUpgradingSchemeParams */ - proposeUpgradingScheme(opts: ProposeUpgradingSchemeParams): TransactionReceiptTruffle; + proposeUpgradingScheme(opts: ProposeUpgradingSchemeParams): Promise; /** * propose to replace this DAO's controller * @param opts ProposeControllerParams */ - proposeController(opts: ProposeControllerParams): TransactionReceiptTruffle; - setParams(params: UpgradeSchemeParams): string; + proposeController(opts: ProposeControllerParams): Promise; + setParams(params: UpgradeSchemeParams): Promise; } /******************************** @@ -470,7 +514,7 @@ export class GlobalConstraintRegistrar extends ExtendTruffleScheme { * propose to make a contribution * @param opts ProposeContributionParams */ - proposeContribution(opts: ProposeContributionParams): TransactionReceiptTruffle; - setParams(params: SimpleContributionSchemeParams): string; + proposeContribution(opts: ProposeContributionParams): Promise; + setParams(params: SimpleContributionSchemeParams): Promise; } } \ No newline at end of file diff --git a/lib/arc.js b/lib/arc.js index f1cf71c5d..89d83caf1 100644 --- a/lib/arc.js +++ b/lib/arc.js @@ -21,21 +21,21 @@ import { getSettings } from './settings.js'; * (as the contracts will have been done via the export statements at the top of this module). */ export function configure(options) { - options; // for lint - // not used at the moment: const network = options && options.network && options.network.name ? options.network.name : 'testrpc'; - /** + options; // for lint + // not used at the moment: const network = options && options.network && options.network.name ? options.network.name : 'testrpc'; + /** * TODO: supply testrpc url in options? Problem is that at this point web3 has already been set in utils * so it's too late at this point to set the url. Would need to somehow effect this initialization before * any contract imports have been attempted. Need to figure out how to export the modules above somewhere * else, or separately. */ - /** + /** * TODO: should we specify something here? * See: https://mikemcl.github.io/bignumber.js/#config BigNumber.config({...}); */ - return getWeb3(); + return getWeb3(); } /** @@ -55,20 +55,20 @@ export function configure(options) { * votingMachines: An array containing the set of property values from allContracts that represent voting machines */ export async function getDeployedContracts() { - const contracts = (await getSettings()).daostackContracts; - return { - allContracts : contracts, - schemes: [ - contracts.SchemeRegistrar - , contracts.UpgradeScheme - , contracts.GlobalConstraintRegistrar - , contracts.SimpleContributionScheme - ], - votingMachines: [ - contracts.AbsoluteVote - ], - globalConstraints: [ - contracts.TokenCapGC - ] - }; + const contracts = (await getSettings()).daostackContracts; + return { + allContracts : contracts, + schemes: [ + contracts.SchemeRegistrar + , contracts.UpgradeScheme + , contracts.GlobalConstraintRegistrar + , contracts.SimpleContributionScheme + ], + votingMachines: [ + contracts.AbsoluteVote + ], + globalConstraints: [ + contracts.TokenCapGC + ] + }; } \ No newline at end of file diff --git a/lib/daostack.js b/lib/daostack.js index e1e50dd8a..8ecefbb46 100644 --- a/lib/daostack.js +++ b/lib/daostack.js @@ -9,34 +9,33 @@ import { Organization } from './organization.js'; const daostack = (function() { - // async function _checkForNecessaryFunds() { - // // TODO: this is not working at all yet: the idea is that we check some precodnitions - // // to be able to give some useful user feedback - // return true; - // - // // check if we have tokens in the schemeregistrar for adding an organization - // const schemeRegistrarTokenAddress = await schemeRegistrar.nativeToken(); - // const schemeRegistrarToken = await DAOToken.at(schemeRegistrarTokenAddress); - // const avatarBalance = await schemeRegistrarToken.balanceOf(avatar.address); - // const fee = await schemeRegistrar.fee(); - // - // // check if we have the funds to pay the fee - // if (avatarBalance.toNumber() < fee.toNumber()) { - // throw new Error('The balance of the controller\'s avatar is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); - // } - // - // const beneficiary = await schemeRegistrar.beneficiary(); - // await controller.ExternalTokenApprove(schemeRegistrarToken, beneficiary, fee.toNumber()); - // // check if externaltokenapprove has indeed approved the right allowance - // // TODO: move this to a separate test on the controller - // const allowance = await schemeRegistrarToken.allowance(avatar.address, beneficiary); - // if (allowance.toNumber() < fee.toNumber()) { - // throw new Error('The allowance of the controllers avatar to the registrars beneficiary is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); - // } - // } + // async function _checkForNecessaryFunds() { + // // TODO: this is not working at all yet: the idea is that we check some precodnitions + // // to be able to give some useful user feedback + // return true; + // + // // check if we have tokens in the schemeregistrar for adding an organization + // const schemeRegistrarTokenAddress = await schemeRegistrar.nativeToken(); + // const schemeRegistrarToken = await DAOToken.at(schemeRegistrarTokenAddress); + // const avatarBalance = await schemeRegistrarToken.balanceOf(avatar.address); + // const fee = await schemeRegistrar.fee(); + // + // // check if we have the funds to pay the fee + // if (avatarBalance.toNumber() < fee.toNumber()) { + // throw new Error('The balance of the controller\'s avatar is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); + // } + // + // const beneficiary = await schemeRegistrar.beneficiary(); + // await controller.ExternalTokenApprove(schemeRegistrarToken, beneficiary, fee.toNumber()); + // // check if externaltokenapprove has indeed approved the right allowance + // // TODO: move this to a separate test on the controller + // const allowance = await schemeRegistrarToken.allowance(avatar.address, beneficiary); + // if (allowance.toNumber() < fee.toNumber()) { + // throw new Error('The allowance of the controllers avatar to the registrars beneficiary is too low to pay the fee for adding an organization. Balance: ' + ourBalance.valueOf() + 'fee: ' + fee); + // } + // } - return { - }; + return {}; }()); diff --git a/lib/globalconstraintregistrar.js b/lib/globalconstraintregistrar.js index a70451e0a..5aa0f8ace 100644 --- a/lib/globalconstraintregistrar.js +++ b/lib/globalconstraintregistrar.js @@ -10,9 +10,9 @@ export class GlobalConstraintRegistrar extends ExtendTruffleContract(SolidityGlo static async new(opts={}) { // TODO: provide options to use an existing token or specify the new token const defaults = { - fee: 0, // the fee to use this scheme, in Wei - beneficiary: getDefaultAccount(), - tokenAddress: null, // the address of a token to use + fee: 0, // the fee to use this scheme, in Wei + beneficiary: getDefaultAccount(), + tokenAddress: null, // the address of a token to use }; const options = dopts(opts, defaults, { allowUnknown: true }); @@ -23,7 +23,7 @@ export class GlobalConstraintRegistrar extends ExtendTruffleContract(SolidityGlo // TODO: or is it better to throw an error? // throw new Error('A tokenAddress must be provided'); } else { - token = await DAOToken.at(options.tokenAddress); + token = await DAOToken.at(options.tokenAddress); } contract = await SolidityGlobalConstraintRegistrar.new(token.address, options.fee, options.beneficiary); @@ -71,12 +71,12 @@ export class GlobalConstraintRegistrar extends ExtendTruffleContract(SolidityGlo { throw new Error("avatar votingMachineHash is not defined"); } - // console.log(`****** avatar ${options.avatar} ******`); - // console.log(`****** globalConstraint ${options.globalConstraint} ******`); - // console.log(`****** globalConstraintParametersHash ${options.globalConstraintParametersHash} ******`); - // console.log(`****** votingMachineHash ${options.votingMachineHash} ******`); + // console.log(`****** avatar ${options.avatar} ******`); + // console.log(`****** globalConstraint ${options.globalConstraint} ******`); + // console.log(`****** globalConstraintParametersHash ${options.globalConstraintParametersHash} ******`); + // console.log(`****** votingMachineHash ${options.votingMachineHash} ******`); - let tx = await this.contract.proposeGlobalConstraint( + const tx = await this.contract.proposeGlobalConstraint( options.avatar, options.globalConstraint, options.globalConstraintParametersHash, @@ -110,7 +110,7 @@ export class GlobalConstraintRegistrar extends ExtendTruffleContract(SolidityGlo throw new Error("avatar globalConstraint is not defined"); } - let tx = await this.contract.proposeToRemoveGC(options.avatar, options.globalConstraint); + const tx = await this.contract.proposeToRemoveGC(options.avatar, options.globalConstraint); return tx; } diff --git a/lib/organization.js b/lib/organization.js index 1b2de2aca..2a980b75b 100644 --- a/lib/organization.js +++ b/lib/organization.js @@ -1,7 +1,7 @@ "use strict"; const dopts = require('default-options'); -import { requireContract } from './utils.js'; +import { getValueFromLogs, requireContract } from './utils.js'; const Avatar = requireContract('Avatar'); const Controller = requireContract('Controller'); const DAOToken = requireContract("DAOToken"); @@ -12,18 +12,12 @@ const AbsoluteVote = requireContract("AbsoluteVote"); // import { UpgradeScheme } from './upgradescheme.js'; import { getSettings } from './settings.js'; -import { getValueFromLogs } from './utils.js'; import { SchemeRegistrar } from './schemeregistrar.js'; -const promisify = require('promisify'); - -// const SCHEME_PERMISSION_REGISTERING = 2; -// const SCHEME_PERMISSION_GLOBALCONSTRAINT = 4; -// const SCHEME_PERMISSION_UPGRADE = 8; const CONTRACT_SCHEMEREGISTRAR = 'SchemeRegistrar'; const CONTRACT_UPGRADESCHEME = 'UpgradeScheme'; const CONTRACT_GLOBALCONSTRAINTREGISTRAR = 'GlobalConstraintRegistrar'; -const CONTRACT_SIMPLECONTRIBUTIONSCHEME = 'SimpleContributionScheme'; +// const CONTRACT_SIMPLECONTRIBUTIONSCHEME = 'SimpleContributionScheme'; export class Organization { constructor() { @@ -39,49 +33,46 @@ export class Organization { const settings = await getSettings(); const defaults = { - orgName: null, - tokenName: null, - tokenSymbol: null, - founders: [], - votingMachine: settings.daostackContracts.AbsoluteVote.address, - votePrec: 50, - ownerVote: true, - orgNativeTokenFee: 0, // used for SimpleContributionScheme - schemeNativeTokenFee: 0, // used for SimpleContributionScheme - genesisScheme: settings.daostackContracts.GenesisScheme.address, - schemes: [ - { - contract: CONTRACT_SCHEMEREGISTRAR, - address: settings.daostackContracts.SchemeRegistrar.address, - }, - { - contract: CONTRACT_UPGRADESCHEME, - address: settings.daostackContracts.UpgradeScheme.address, - }, - { - contract: CONTRACT_GLOBALCONSTRAINTREGISTRAR, - address: settings.daostackContracts.GlobalConstraintRegistrar.address, - }, - ], + orgName: null, + tokenName: null, + tokenSymbol: null, + founders: [], + votingMachine: settings.daostackContracts.AbsoluteVote.address, + votePrec: 50, + ownerVote: true, + orgNativeTokenFee: 0, // used for SimpleContributionScheme + schemeNativeTokenFee: 0, // used for SimpleContributionScheme + genesisScheme: settings.daostackContracts.GenesisScheme.address, + schemes: [ + { + name: CONTRACT_SCHEMEREGISTRAR, + address: settings.daostackContracts.SchemeRegistrar.address, + }, + { + name: CONTRACT_UPGRADESCHEME, + address: settings.daostackContracts.UpgradeScheme.address, + }, + { + name: CONTRACT_GLOBALCONSTRAINTREGISTRAR, + address: settings.daostackContracts.GlobalConstraintRegistrar.address, + }, + ], }; const options = dopts(opts, defaults, { allowUnknown: true }); - - let tx; - const genesisScheme = await GenesisScheme.at(options.genesisScheme); - tx = await genesisScheme.forgeOrg( - options.orgName, - options.tokenName, - options.tokenSymbol, - options.founders.map(x => x.address), - options.founders.map(x => x.tokens), - options.founders.map(x => x.reputation), + const tx = await genesisScheme.forgeOrg( + options.orgName, + options.tokenName, + options.tokenSymbol, + options.founders.map(x => x.address), + options.founders.map(x => x.tokens), + options.founders.map(x => x.reputation), ); // get the address of the avatar from the logs const avatarAddress = getValueFromLogs(tx, '_avatar'); - let org = new Organization(); + const org = new Organization(); options.avatar = avatarAddress; org.avatar = await Avatar.at(options.avatar); @@ -100,29 +91,29 @@ export class Organization { const voteParametersHash = await org.votingMachine.getParametersHash(org.reputation.address, options.votePrec, options.ownerVote); // TODO: these are specific configuration options that should be settable in the options above - let initialSchemesAddresses = []; - let initialSchemesParams = []; - let initialSchemesTokenAddresses = []; - let initialSchemesFees = []; - let initialSchemesPermissions = []; - - for (let optionScheme of options.schemes) { - - var arcSchemeInfo = settings.daostackContracts[optionScheme.contract]; - var scheme = await arcSchemeInfo.contract.at(optionScheme.address || arcSchemeInfo.address); - - const paramsHash = await scheme.setParams({ - voteParametersHash: voteParametersHash, - votingMachine: org.votingMachine.address, - orgNativeTokenFee: options.orgNativeTokenFee, - schemeNativeTokenFee: options.schemeNativeTokenFee - }); - - initialSchemesAddresses.push(scheme.address); - initialSchemesParams.push(paramsHash); - initialSchemesTokenAddresses.push(await scheme.nativeToken()); - initialSchemesFees.push(await scheme.fee()); - initialSchemesPermissions.push(scheme.getDefaultPermissions(/* supply options.permissions here? */)); + const initialSchemesAddresses = []; + const initialSchemesParams = []; + const initialSchemesTokenAddresses = []; + const initialSchemesFees = []; + const initialSchemesPermissions = []; + + for (const optionScheme of options.schemes) { + + const arcSchemeInfo = settings.daostackContracts[optionScheme.name]; + const scheme = await arcSchemeInfo.contract.at(optionScheme.address || arcSchemeInfo.address); + + const paramsHash = await scheme.setParams({ + voteParametersHash: voteParametersHash, + votingMachine: org.votingMachine.address, + orgNativeTokenFee: options.orgNativeTokenFee, + schemeNativeTokenFee: options.schemeNativeTokenFee + }); + + initialSchemesAddresses.push(scheme.address); + initialSchemesParams.push(paramsHash); + initialSchemesTokenAddresses.push(await scheme.nativeToken()); + initialSchemesFees.push(await scheme.fee()); + initialSchemesPermissions.push(scheme.getDefaultPermissions(/* supply options.permissions here? */)); } // register the schemes with the organization @@ -176,68 +167,88 @@ export class Organization { return org; } - async schemes(contract) { + /** + * returns + * @param name linke "SchemeRegistrar" + */ + async schemes(name) { // return the schemes registered on this controller satisfying the contract spec // return all schems if contract is not given const schemes = await this._getSchemes(); - if (contract) { - return schemes.filter(function(s) { return s.contract === contract; }); - } else { + if (name) { + return schemes.filter((s) => { return s.name === name; }); + } else { return schemes; } } + /** + * returns schemes currently in this Organization as Array + */ async _getSchemes() { // private method returns all registered schemes. // TODO: this is *expensive*, we need to cache the results (and perhaps poll for latest changes if necessary) - let result = []; + const schemesMap = new Map(); // const controller = this.controller; + const arcTypesMap = new Map(); // const settings = await getSettings(); - // TODO: only subscribe to registerScheme events that are registering to this.controller.address + /** + * TODO: This should pull in all known versions of the schemes, names + * and versions in one fell swoop. + */ + for(const name in settings.daostackContracts) { + const contract = settings.daostackContracts[name]; + arcTypesMap.set(contract.address, name); + } + const registerSchemeEvent = controller.RegisterScheme({}, {fromBlock: 0, toBlock: 'latest'}); - const logs = await promisify.cb_func()(function(cb) { registerSchemeEvent.get(cb); })(); - registerSchemeEvent.stopWatching(); - - // get scheme address from the logs - const addresses = logs.map(function(log) { return log.args._scheme;}); - let permissions, i, scheme; - - // we derive the type of scheme from its permissions, which is at most approximate. - for (i=0; i < addresses.length; i++) { - permissions = await controller.getSchemePermissions(addresses[i]); - - scheme = { - address: addresses[i], - permissions: permissions, - }; - - if (parseInt(permissions) === 0) { - // contract = 'unregistered' - we ignore it - // } else if ((parseInt(permissions) & SCHEME_PERMISSION_REGISTERING) === SCHEME_PERMISSION_REGISTERING) { - } else if (addresses[i] === String(settings.daostackContracts.SchemeRegistrar.address)) { - scheme['contract'] = CONTRACT_SCHEMEREGISTRAR; - result.push(scheme); - // } else if ((parseInt(permissions) & SCHEME_PERMISSION_UPGRADE) === SCHEME_PERMISSION_UPGRADE) { - } else if (addresses[i] === String(settings.daostackContracts.UpgradeScheme.address)) { - scheme['contract'] = CONTRACT_UPGRADESCHEME; - result.push(scheme); - // } else if ((parseInt(permissions) & SCHEME_PERMISSION_GLOBALCONSTRAINT) === SCHEME_PERMISSION_GLOBALCONSTRAINT) { - } else if (addresses[i] === String(settings.daostackContracts.GlobalConstraintRegistrar.address)) { - scheme['contract'] = CONTRACT_GLOBALCONSTRAINTREGISTRAR; - result.push(scheme); - } else if (addresses[i] === String(settings.daostackContracts.SimpleContributionScheme.address)) { - scheme['contract'] = CONTRACT_SIMPLECONTRIBUTIONSCHEME; - result.push(scheme); - } else { - scheme['contract'] = null; - result.push(scheme); - } + await new Promise((resolve) => { + registerSchemeEvent.get((err, eventsArray) => this._handleSchemeEvent(err, eventsArray, true, arcTypesMap, schemesMap).then(() => { resolve(); })); + registerSchemeEvent.stopWatching(); + }); + + const unRegisterSchemeEvent = controller.UnregisterScheme({}, {fromBlock: 0, toBlock: 'latest'}); + + await new Promise((resolve) => { + unRegisterSchemeEvent.get((err, eventsArray) => this._handleSchemeEvent(err, eventsArray, false, arcTypesMap, schemesMap).then(() => { resolve(); })); + unRegisterSchemeEvent.stopWatching(); + }); + + return Array.from(schemesMap.values()); + } + + async _handleSchemeEvent(err, eventsArray, adding, arcTypesMap, schemesMap) // : Promise + { + if (!(eventsArray instanceof Array)) { + eventsArray = [eventsArray]; + } + const count = eventsArray.length; + for (let i = 0; i < count; i++) { + const schemeAddress = eventsArray[i].args._scheme; + // will be all zeros if not registered + const permissions = await this.controller.getSchemePermissions(schemeAddress); + + const schemeInfo = { + address: schemeAddress, + permissions: permissions, + // will be undefined if not a known scheme + name: arcTypesMap.get(schemeAddress) + }; + + if (adding) { + schemesMap.set(schemeAddress,schemeInfo); + } else if (schemesMap.has(schemeAddress)) { + schemesMap.delete(schemeAddress); + } } - return result; } + /** + * Returns promise of a scheme as ExtendTruffleScheme, or ? if not found + * @param contract name of scheme, like "SchemeRegistrar" + */ async scheme(contract) { // returns the schemes can be used to register other schemes // TODO: error handling: throw an error if such a schem does not exist, and also if there is more htan one @@ -263,181 +274,12 @@ export class Organization { // check if the controller is registered (has paid the fee) const isControllerRegistered = await scheme.isRegistered(avatar.address); if (!isControllerRegistered) { - const msg = 'The organization is not registered on this schme: ' + contract + '; ' + contractInfo.address; - throw new Error(msg); + const msg = 'The organization is not registered on this schme: ' + contract + '; ' + contractInfo.address; + throw new Error(msg); } return true; } - // async proposeScheme(opts={}) { - - // const settings = await getSettings(); - - // const defaults = { - // contract: undefined, - // address: null, - // params: {}, - // }; - - // const options = dopts(opts, defaults, { allowUnknown: true }); - - // let tx; - - // const schemeRegistrar = await this.scheme('SchemeRegistrar'); - - // if (options.contract === 'SimpleICO') { - // const scheme = await SimpleICO.at(settings.daostackContracts.SimpleICO.address); - // // TODO: check which default params should be required - // const defaultParams = { - // cap: 0, // uint _cap, - // price: 0, // uint _price, - // startBlock: 0, // uint _startBlock, - // endBlock: 0, // uint _endBlock, - // beneficiary: NULL_ADDRESS, // address _beneficiary, - // admin: NULL_ADDRESS,// address _admin) returns(bytes32) { - // }; - // // tod: all 'null' params are required - // options.params = dopts(options.params, defaultParams); - - // // TODO: create the parameters hash on the basis of the options - // await scheme.setParameters( - // options.params.cap, - // options.params.price, - // options.params.startBlock, - // options.params.endBlock, - // options.params.beneficiary, - // options.params.admin, - // ); - // const parametersHash = await scheme.getParametersHash( - // options.params.cap, - // options.params.price, - // options.params.startBlock, - // options.params.endBlock, - // options.params.beneficiary, - // options.params.admin, - // ); - // const tokenForFee = await scheme.nativeToken(); - // const fee = await scheme.fee(); - // const autoRegister = false; - // tx = await schemeRegistrar.proposeScheme( - // this.avatar.address, // Avatar _avatar, - // scheme.address, //address _scheme, - // parametersHash, // bytes32 _parametersHash, - // false, // bool _isRegistering, - // tokenForFee, // StandardToken _tokenFee, - // fee, // uint _fee - // autoRegister // bool _autoRegister - // ); - // const proposalId = await getValueFromLogs(tx, '_proposalId'); - // return proposalId; - - - // } else if (options.contract === CONTRACT_SIMPLECONTRIBUTIONSCHEME) { - // // get the scheme - // const defaultParams = { - // votePrec: 50, // used for SimpleContributionScheme - // ownerVote: true, - // intVote: this.votingMachine.address, // used for SimpleContributionScheme - // orgNativeTokenFee: 0, // used for SimpleContributionScheme - // schemeNativeTokenFee: 0, // used for SimpleContributionScheme - // }; - // // tod: all 'null' params are required - // options.params = dopts(options.params, defaultParams); - - // const scheme = await SimpleContributionScheme.at(options.address || settings.daostackContracts.SimpleContributionScheme.address); - // const votingMachine = AbsoluteVote.at(options.params.intVote); - // // check if voteApporveParams are known on the votingMachine - // await votingMachine.setParameters(this.reputation.address, options.params.votePrec, options.params.ownerVote); - // const voteApproveParams = await votingMachine.getParametersHash(this.reputation.address, options.params.votePrec, options.params.ownerVote); - - // // const unpackedParams = await votingMachine.parameters(voteApproveParams); - // // let msg = 'it seems your voteApproveParams are not known on this votingMachine'; - // // assert.isOk(unpackedParams[0], msg); - - // const parametersHash = await scheme.getParametersHash( - // options.params.orgNativeTokenFee, - // options.params.schemeNativeTokenFee, - // voteApproveParams, - // votingMachine.address, - // ); - // await scheme.setParameters( - // options.params.orgNativeTokenFee, // uint orgNativeTokenFee; // a fee (in the organization's token) that is to be paid for submitting a contribution - // options.params.schemeNativeTokenFee, // uint schemeNativeTokenFee; // a fee (in the present schemes token) that is to be paid for submission - // voteApproveParams, // bytes32 voteApproveParams; - // votingMachine.address, - // ); - - // const feeToken = await scheme.nativeToken(); - // const fee = await scheme.fee(); - // const autoRegister = false; - - // tx = await schemeRegistrar.proposeScheme( - // this.avatar.address, // Avatar _avatar, - // scheme.address, //address _scheme, - // parametersHash, // bytes32 _parametersHash, - // false, // bool _isRegistering, - // feeToken, // StandardToken _tokenFee, - // fee, // uint _fee - // autoRegister // bool _autoRegister - // ); - // const proposalId = await getValueFromLogs(tx, '_proposalId'); - // return proposalId; - // } else { - // throw new Error('Unknown contract'); - // } - // } - - // async proposeGlobalConstraint(opts= {}) { - // const settings = await getSettings(); - // const defaults = { - // contract: null, - // address: null, - // params: {}, - // paramsHash: null, - // // next three options regard removing a global constraint - // votingMachine: this.votingMachine.address, - // reputation: this.reputation.address, - // absPrecReq: 50, - // }; - - // const options = dopts(opts, defaults, { allowUnknown: true }); - - // if (options.contract==='TokenCapGC') { - // options.address = options.address || settings.daostackContracts.TokenCapGC.address; - // const tokenCapGC = await TokenCapGC.at(options.address); - - // if (options.paramsHash) { - // // TODO: check if paramsHash is registered - // } else { - // const defaultParams = { - // token: null, - // tokenAddress: this.token.address, - // cap: 21e9, - // }; - // let params = dopts(options.params, defaultParams); - - // await tokenCapGC.setParameters(params.tokenAddress, params.cap); - // options.paramsHash = await tokenCapGC.getParametersHash(params.tokenAddress, params.cap); - // } - - // } else { - // if (options.address) { - // // - // } else { - // let msg = 'Either "contract" or "address" must be provided'; - // throw new Error(msg); - // } - // } - // // calculate (and set) the hash that will be used to remove the parameters - // await AbsoluteVote.at(options.votingMachine).setParameters(options.reputation, options.absPrecReq, true); - // options.votingMachineHash = await AbsoluteVote.at(options.votingMachine).getParametersHash(options.reputation, options.absPrecReq, true); - - // const globalConstraintRegistrar = await this.scheme('GlobalConstraintRegistrar'); - // let tx = await globalConstraintRegistrar.proposeGlobalConstraint(this.avatar.address, options.address, options.paramsHash, options.votingMachineHash); - // const proposalId = getValueFromLogs(tx, '_proposalId'); - // return proposalId; - // } - vote(proposalId, choice, params) { // vote for the proposal given by proposalId using this.votingMachine // NB: this will not work for proposals using votingMachine's that are not the default one diff --git a/lib/schemeregistrar.js b/lib/schemeregistrar.js index 36ab79332..af5739130 100644 --- a/lib/schemeregistrar.js +++ b/lib/schemeregistrar.js @@ -11,19 +11,19 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr static async new(opts={}) { // TODO: provide options to use an existing token or specifiy the new token const defaults = { - fee: 0, // the fee to use this scheme, in Wei - beneficiary: getDefaultAccount(), - tokenAddress: null, // the address of a token to use + fee: 0, // the fee to use this scheme, in Wei + beneficiary: getDefaultAccount(), + tokenAddress: null, // the address of a token to use }; const options = dopts(opts, defaults, { allowUnknown: true }); let token; if (options.tokenAddress == null) { - token = await DAOToken.new('schemeregistrartoken', 'SRT'); + token = await DAOToken.new('schemeregistrartoken', 'SRT'); } else { - token = await DAOToken.at(options.tokenAddress); + token = await DAOToken.at(options.tokenAddress); } contract = await SoliditySchemeRegistrar.new(token.address, options.fee, options.beneficiary); @@ -32,11 +32,11 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr /** * Note relating to permissions: According rules defined in the Controller, - * this SchemeRegistrar is only capable of registering schemes that have + * this SchemeRegistrar is only capable of registering schemes that have * either no permissions or have the permission to register other schemes. - * Therefore Arc's SchemeRegistrar is not capable of registering schemes + * Therefore Arc's SchemeRegistrar is not capable of registering schemes * that have permissions greater than its own, thus excluding schemes having - * the permission to add/remove global constraints or upgrade the controller. + * the permission to add/remove global constraints or upgrade the controller. * The Controller will throw an exception when an attempt is made * to add or remove schemes having greater permissions than the scheme attempting the change. */ @@ -45,7 +45,7 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr /** * Note that explicitly supplying any property with a value of undefined will prevent the property * from taking on its default value (weird behavior of default-options). - * + * */ const defaults = { /** @@ -60,7 +60,7 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr * scheme identifier, like "SchemeRegistrar" or "SimpleContributionScheme". * pass null if registering a non-arc scheme */ - , schemeKey: null + , schemeName: null /** * hash of scheme parameters. These must be already registered with the new scheme. */ @@ -68,29 +68,29 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr /** * The fee that the scheme charges to register an organization in the scheme. The controller * will be asked in advance to approve this expenditure. - * - * If schemeKey is given but fee is not then we use the amount of the fee of the - * Arc scheme given by scheme and schemeKey. - * - * Fee is required when schemeKey is not given (non-Arc schemes). - * + * + * If schemeName is given but fee is not then we use the amount of the fee of the + * Arc scheme given by scheme and schemeName. + * + * Fee is required when schemeName is not given (non-Arc schemes). + * * The fee is paid using the token given by tokenAddress. In Wei. */ , fee: null /** * The token used to pay the fee that the scheme charges to register an organization in the scheme. - * - * If schemeKey is given but tokenAddress is not then we use the token address of the - * Arc scheme given by scheme and schemeKey. - * - * tokenAddress is required when schemeKey is not given (non-Arc schemes). + * + * If schemeName is given but tokenAddress is not then we use the token address of the + * Arc scheme given by scheme and schemeName. + * + * tokenAddress is required when schemeName is not given (non-Arc schemes). */ , tokenAddress: null /** * true if the given scheme is able to register/unregister/modify schemes. - * - * isRegistering should only be supplied when schemeKey is not given (and thus the scheme is non-Arc). - * Otherwise we determine it's value based on scheme and schemeKey. + * + * isRegistering should only be supplied when schemeName is not given (and thus the scheme is non-Arc). + * Otherwise we determine it's value based on scheme and schemeName. */ , isRegistering: null /** @@ -118,20 +118,20 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr throw new Error("schemeParametersHash is not defined"); } - let feeIsDefined = (options.fee !== null) && (options.fee !== undefined); - let tokenAddressIsDefined = !!options.tokenAddress; + const feeIsDefined = (options.fee !== null) && (options.fee !== undefined); + const tokenAddressIsDefined = !!options.tokenAddress; /** * throws an Error if not valid, yields 0 if null or undefined */ - let web3 = getWeb3(); + const web3 = getWeb3(); let fee = web3.toBigNumber(options.fee); let tokenAddress = options.tokenAddress; let isRegistering; - if (options.schemeKey) { + if (options.schemeName) { try { const settings = await getSettings(); - const newScheme = await settings.daostackContracts[options.schemeKey].contract.at(options.scheme); + const newScheme = await settings.daostackContracts[options.schemeName].contract.at(options.scheme); if (!feeIsDefined || !tokenAddressIsDefined) { if (!feeIsDefined) @@ -146,7 +146,7 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr isRegistering = (permissions & 2) != 0; - // Note that the javascript wrapper "newScheme" we've gotten here is defined in this version of Arc. If newScheme is + // Note that the javascript wrapper "newScheme" we've gotten here is defined in this version of Arc. If newScheme is // actually coming from a different version of Arc, then theoretically the permissions could be different from this version. const permissions = Number(newScheme.getDefaultPermissions()); @@ -154,18 +154,18 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr throw new Error("SchemeRegistrar cannot work with schemes having greater permissions than its own"); } } catch(ex) { - throw new Error(`Unable to obtain default information from the given scheme address. The scheme is probably not an Arc scheme and in that case you must supply fee and tokenAddress. ${ex}`); - } - } else { + throw new Error(`Unable to obtain default information from the given scheme address. The scheme is probably not an Arc scheme and in that case you must supply fee and tokenAddress. ${ex}`); + } + } else { isRegistering = options.isRegistering; if (!feeIsDefined || !tokenAddressIsDefined) { - throw new Error("fee/tokenAddress are not defined; they are required for non-Arc schemes (schemeKey is undefined)"); + throw new Error("fee/tokenAddress are not defined; they are required for non-Arc schemes (schemeName is undefined)"); } if (isRegistering === null) { - throw new Error("isRegistering is not defined; it is required for non-Arc schemes (schemeKey is undefined)"); + throw new Error("isRegistering is not defined; it is required for non-Arc schemes (schemeName is undefined)"); } if (fee < 0) { @@ -173,14 +173,14 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr } } - let tx = await this.contract.proposeScheme( + const tx = await this.contract.proposeScheme( options.avatar, options.scheme, options.schemeParametersHash, isRegistering, tokenAddress, fee, - options.autoRegister); + options.autoRegister); return tx; } @@ -210,15 +210,15 @@ export class SchemeRegistrar extends ExtendTruffleContract(SoliditySchemeRegistr throw new Error("scheme address is not defined"); } - let tx = await this.contract.proposeToRemoveScheme(options.avatar, options.scheme); + const tx = await this.contract.proposeToRemoveScheme(options.avatar, options.scheme); return tx; } async setParams(params) { - return await this._setParameters(params.voteParametersHash, params.voteParametersHash, params.votingMachine); - } - + return await this._setParameters(params.voteParametersHash, params.voteParametersHash, params.votingMachine); + } + getDefaultPermissions(overrideValue) { return overrideValue || '0x00000003'; } diff --git a/lib/settings.js b/lib/settings.js index 1a0d0ac2c..ac1c34bf2 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -2,15 +2,26 @@ import { requireContract } from './utils.js'; // TODO: these are settings for testing. Need some way to switch to "production settings" const GenesisScheme = requireContract("GenesisScheme"); +const SimpleICO = requireContract("SimpleICO"); + +/** + * These are uninitialized instances of ExtendTruffleContract, + * effectively class factories. + */ import { GlobalConstraintRegistrar } from './globalconstraintregistrar.js'; import { SchemeRegistrar } from './schemeregistrar.js'; import { SimpleContributionScheme } from './simplecontributionscheme.js'; -const SimpleICO = requireContract("SimpleICO"); -import {AbsoluteVote} from "./absoluteVote.js"; -import {TokenCapGC} from "./tokenCapGC.js"; +import { AbsoluteVote} from "./absoluteVote.js"; +import { TokenCapGC} from "./tokenCapGC.js"; import { UpgradeScheme } from './upgradescheme.js'; const getSettings = async function(){ + /** + * These are deployed contract instances represented by their respective Arc + * javascript wrappers (ExtendTruffleContract). + * + * `deployed()` is a static method on each of those classes. + **/ const contributionScheme = await SimpleContributionScheme.deployed(); const genesisScheme = await GenesisScheme.deployed(); const globalConstraintRegistrar = await GlobalConstraintRegistrar.deployed(); @@ -20,6 +31,12 @@ const getSettings = async function(){ const upgradeScheme = await UpgradeScheme.deployed(); const absoluteVote = await AbsoluteVote.deployed(); + /** + * `contract` here is an uninitialized instance of ExtendTruffleContract, + * basically the class factory. + * Calling contract.at() (a static method on the class) will return a + * the properly initialized instance of ExtendTruffleContract. + */ return { votingMachine: absoluteVote.address, daostackContracts: { diff --git a/lib/simplecontributionscheme.js b/lib/simplecontributionscheme.js index 0ee873cea..c9e377963 100644 --- a/lib/simplecontributionscheme.js +++ b/lib/simplecontributionscheme.js @@ -11,20 +11,20 @@ class SimpleContributionScheme extends ExtendTruffleContract(SoliditySimpleContr static async new(opts={}) { // TODO: provide options to use an existing token or specifiy the new token const defaults = { - tokenAddress: null, // the address of a token to use - fee: 0, // the fee to use this scheme - beneficiary: getDefaultAccount(), + tokenAddress: null, // the address of a token to use + fee: 0, // the fee to use this scheme + beneficiary: getDefaultAccount(), }; const options = dopts(opts, defaults, { allowUnknown: true }); let token; if (options.tokenAddress == null) { - token = await DAOToken.new('schemeregistrartoken', 'STK'); + token = await DAOToken.new('schemeregistrartoken', 'STK'); // TODO: or is it better to throw an error? // throw new Error('A tokenAddress must be provided'); } else { - token = await DAOToken.at(options.tokenAddress); + token = await DAOToken.at(options.tokenAddress); } contract = await SoliditySimpleContributionScheme.new(token.address, options.fee, options.beneficiary); @@ -87,11 +87,11 @@ class SimpleContributionScheme extends ExtendTruffleContract(SoliditySimpleContr /** * will thrown Error if not valid numbers */ - let web3 = getWeb3(); - let nativeTokenReward = web3.toBigNumber(options.nativeTokenReward); - let reputationReward = web3.toBigNumber(options.reputationReward); - let ethReward = web3.toBigNumber(options.ethReward); - let externalTokenReward = web3.toBigNumber(options.externalTokenReward); + const web3 = getWeb3(); + const nativeTokenReward = web3.toBigNumber(options.nativeTokenReward); + const reputationReward = web3.toBigNumber(options.reputationReward); + const ethReward = web3.toBigNumber(options.ethReward); + const externalTokenReward = web3.toBigNumber(options.externalTokenReward); if ((nativeTokenReward < 0) || (reputationReward < 0) || (ethReward < 0) || (externalTokenReward < 0)) { @@ -140,14 +140,14 @@ class SimpleContributionScheme extends ExtendTruffleContract(SoliditySimpleContr // console.log(`********* options.beneficiary ${options.beneficiary} **********`); const tx = await this.contract.submitContribution( - options.avatar, - options.description, - nativeTokenReward, - reputationReward, - ethReward, - options.externalToken, - externalTokenReward, - options.beneficiary + options.avatar, + options.description, + nativeTokenReward, + reputationReward, + ethReward, + options.externalToken, + externalTokenReward, + options.beneficiary ); return tx; } diff --git a/lib/tokenCapGC.js b/lib/tokenCapGC.js index 7c8b1fde5..c1525be0d 100644 --- a/lib/tokenCapGC.js +++ b/lib/tokenCapGC.js @@ -12,6 +12,6 @@ export class TokenCapGC extends ExtendTruffleContract(SolidityTokenCapGC) { } async setParams(params) { - return await this._setParameters(params.token, params.cap); - } + return await this._setParameters(params.token, params.cap); + } } diff --git a/lib/upgradescheme.js b/lib/upgradescheme.js index fc2f6e126..7c130b59a 100644 --- a/lib/upgradescheme.js +++ b/lib/upgradescheme.js @@ -11,27 +11,27 @@ export class UpgradeScheme extends ExtendTruffleContract(SolidityUpgradeScheme) static async new(opts={}) { // TODO: provide options to use an existing token or specifiy the new token const defaults = { - fee: 0, // the fee to use this scheme - beneficiary: getDefaultAccount(), - tokenAddress: null, // the address of a token to use + fee: 0, // the fee to use this scheme + beneficiary: getDefaultAccount(), + tokenAddress: null, // the address of a token to use }; const options = dopts(opts, defaults, { allowUnknown: true }); let token; if (options.tokenAddress == null) { - token = await DAOToken.new('schemeregistrartoken', 'SRT'); + token = await DAOToken.new('schemeregistrartoken', 'SRT'); // TODO: or is it better to throw an error? // throw new Error('A tokenAddress must be provided'); } else { - token = await DAOToken.at(options.tokenAddress); + token = await DAOToken.at(options.tokenAddress); } contract = await SolidityUpgradeScheme.new(token.address, options.fee, options.beneficiary); return new this(contract); } -/******************************************* + /******************************************* * proposeController */ async proposeController(opts={}) { @@ -58,16 +58,16 @@ export class UpgradeScheme extends ExtendTruffleContract(SolidityUpgradeScheme) throw new Error("controller address is not defined"); } - let tx = await this.contract.proposeUpgrade(options.avatar, options.controller); + const tx = await this.contract.proposeUpgrade(options.avatar, options.controller); - return tx; + return tx; } -/******************************************** + /******************************************** * proposeUpgradingScheme */ - async proposeUpgradingScheme(opts={}) { + async proposeUpgradingScheme(opts={}) { /** * Note that explicitly supplying any property with a value of undefined will prevent the property @@ -132,31 +132,31 @@ export class UpgradeScheme extends ExtendTruffleContract(SolidityUpgradeScheme) throw new Error("schemeParametersHash is not defined"); } - let feeIsDefined = (options.fee !== null) && (options.fee !== undefined); - let tokenAddressIsDefined = !!options.tokenAddress; + const feeIsDefined = (options.fee !== null) && (options.fee !== undefined); + const tokenAddressIsDefined = !!options.tokenAddress; /** * throws an Error if not valid, yields 0 if null or undefined */ - let web3 = getWeb3(); + const web3 = getWeb3(); let fee = web3.toBigNumber(options.fee); let tokenAddress = options.tokenAddress; if (!feeIsDefined || !tokenAddressIsDefined) { - try { - const settings = await getSettings(); - const newScheme = await settings.daostackContracts.UpgradeScheme.contract.at(options.scheme); - if (!feeIsDefined) - { - fee = await newScheme.fee(); - } - if (!tokenAddressIsDefined) - { - tokenAddress = await newScheme.nativeToken(); - } - } catch(ex) { - // throw new Error("Unable to obtain default information from the given scheme address. The scheme is probably not an Arc UpgradeScheme and in that case you must supply fee and tokenAddress."); + try { + const settings = await getSettings(); + const newScheme = await settings.daostackContracts.UpgradeScheme.contract.at(options.scheme); + if (!feeIsDefined) + { + fee = await newScheme.fee(); + } + if (!tokenAddressIsDefined) + { + tokenAddress = await newScheme.nativeToken(); } + } catch(ex) { + // throw new Error("Unable to obtain default information from the given scheme address. The scheme is probably not an Arc UpgradeScheme and in that case you must supply fee and tokenAddress."); + } } if (fee < 0) @@ -164,19 +164,19 @@ export class UpgradeScheme extends ExtendTruffleContract(SolidityUpgradeScheme) throw new Error("fee cannot be less than 0"); } - let tx = await this.contract.proposeChangeUpgradingScheme( - options.avatar, - options.scheme, - options.schemeParametersHash, - tokenAddress, - fee); + const tx = await this.contract.proposeChangeUpgradingScheme( + options.avatar, + options.scheme, + options.schemeParametersHash, + tokenAddress, + fee); return tx; } async setParams(params) { return await this._setParameters(params.voteParametersHash, params.votingMachine); - } + } getDefaultPermissions(overrideValue) { return overrideValue || '0x0000000b'; diff --git a/lib/utils.js b/lib/utils.js index 974c8901e..5bac8c1b3 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -7,10 +7,11 @@ export const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; export const NULL_HASH = '0x0000000000000000000000000000000000000000000000000000000000000000'; /** - * Returns TruffleContract given the name of the contract. + * Returns TruffleContract given the name of the contract (like "SchemeRegistrar"), or undefined + * if not found or any other error occurs. * - * When testing or migrating, uses .sol - * Elsewhere (development, production), uses migrated .json + * This is not an Arc javascript wrapper, rather it is the straight TruffleContract + * that one references in the Arc javascript wrapper as ".contract". * * Side effect: It initializes (and uses) `web3` if a global `web3` is not already present, which * happens when running in the context of an application (as opposed to tests or migration). @@ -18,31 +19,26 @@ export const NULL_HASH = '0x0000000000000000000000000000000000000000000000000000 * @param contractName */ export function requireContract(contractName) { - if (typeof artifacts == 'object') { - return artifacts.require(`./${contractName}.sol`); - } else { - - try { - let myWeb3 = getWeb3(); + try { + const myWeb3 = getWeb3(); - const artifact = require(`../build/contracts/${contractName}.json`); - const contract = new TruffleContract(artifact); + const artifact = require(`../build/contracts/${contractName}.json`); + const contract = new TruffleContract(artifact); - contract.setProvider(myWeb3.currentProvider); - contract.defaults({ - from: getDefaultAccount(), - gas: 0x442168 - }); - return contract; + contract.setProvider(myWeb3.currentProvider); + contract.defaults({ + from: getDefaultAccount(), + gas: 0x442168 + }); + return contract; - } catch(ex) { - return undefined; - } + } catch(ex) { + return undefined; } } -var _web3; -var alreadyTriedAndFailed = false; +let _web3; +let alreadyTriedAndFailed = false; /** * throws an exception when web3 cannot be initialized or there is no default client @@ -58,7 +54,7 @@ export function getWeb3() { throw new Error("already tried and failed"); } - var preWeb3; + let preWeb3; // already defined under `window`? if (typeof window !== "undefined" && typeof window.web3 !== "undefined") { @@ -110,17 +106,15 @@ export function getValueFromLogs(tx, arg, eventName, index=0) { } } if (index === undefined) { - let msg = `getValueFromLogs: There is no event logged with eventName ${eventName}`; + const msg = `getValueFromLogs: There is no event logged with eventName ${eventName}`; throw new Error(msg); } - } else { - if (index === undefined) { - index = tx.logs.length - 1; - } + } else if (index === undefined) { + index = tx.logs.length - 1; } - let result = tx.logs[index].args[arg]; + const result = tx.logs[index].args[arg]; if (!result) { - let msg = `getValueFromLogs: This log does not seem to have a field "${arg}": ${tx.logs[index].args}`; + const msg = `getValueFromLogs: This log does not seem to have a field "${arg}": ${tx.logs[index].args}`; throw new Error(msg); } return result; @@ -131,8 +125,8 @@ export function getValueFromLogs(tx, arg, eventName, index=0) { * throws an exception on failure. */ export function getDefaultAccount() { - let web3 = getWeb3(); - let defaultAccount = web3.eth.defaultAccount = web3.eth.defaultAccount || web3.eth.accounts[0]; + const web3 = getWeb3(); + const defaultAccount = web3.eth.defaultAccount = web3.eth.defaultAccount || web3.eth.accounts[0]; if (!defaultAccount) { throw new Error("eth.accounts[0] is not set"); @@ -145,7 +139,7 @@ export function getDefaultAccount() { export const ExtendTruffleContract = (superclass) => class { constructor(contract) { this.contract = contract; - for (var i in this.contract) { + for (const i in this.contract) { if (this[i] === undefined){ this[i] = this.contract[i]; } @@ -191,9 +185,9 @@ export const ExtendTruffleContract = (superclass) => class { return await ''; } - async _setParameters() { - const parametersHash = await this.contract.getParametersHash(...arguments); - await this.contract.setParameters(...arguments); + async _setParameters(...args) { + const parametersHash = await this.contract.getParametersHash(args); + await this.contract.setParameters(args); return parametersHash; } diff --git a/lib/wallet.js b/lib/wallet.js index 6ce7f0b57..6c4c1a28e 100644 --- a/lib/wallet.js +++ b/lib/wallet.js @@ -11,14 +11,14 @@ const ethApiToken = process.env.ETH_API_TOKEN; // Required for Infura or Ethersc let provider; switch (ethProvider) { - case 'infura': - provider = new ethers.providers.InfuraProvider(ethNetwork, ethApiToken); - break; - case 'etherscan': - provider = new ethers.providers.EtherscanProvider(ethNetwork, ethApiToken); - break; - default: - provider = new ethers.providers.JsonRpcProvider('http://localhost:8545', ethNetwork); +case 'infura': + provider = new ethers.providers.InfuraProvider(ethNetwork, ethApiToken); + break; +case 'etherscan': + provider = new ethers.providers.EtherscanProvider(ethNetwork, ethApiToken); + break; +default: + provider = new ethers.providers.JsonRpcProvider('http://localhost:8545', ethNetwork); } const web3 = getWeb3(); @@ -30,7 +30,7 @@ export class Wallet { // Create a new wallet, generated deterministically from a mnemonic created using bip39 static new() { - let wallet = new Wallet(); + const wallet = new Wallet(); wallet.mnemonic = bip39.generateMnemonic(); wallet.wallet = ethers.Wallet.fromMnemonic(wallet.mnemonic); wallet.wallet.provider = provider; @@ -38,14 +38,14 @@ export class Wallet { } static fromPrivateKey(privateKey) { - let wallet = new Wallet(); + const wallet = new Wallet(); wallet.wallet = new ethers.Wallet(privateKey, provider); return wallet; } // Unencrypt an encrypted Secret Storage JSON Wallet static async fromEncrypted(encryptedJSON, password, progressCallback) { - let wallet = new Wallet(); + const wallet = new Wallet(); wallet.wallet = await ethers.Wallet.fromEncryptedWallet(encryptedJSON, password, progressCallback); wallet.wallet.provider = provider; return wallet; @@ -54,7 +54,7 @@ export class Wallet { // Recover a wallet from a mnemonic // TODO: what happens with an invalid mnemonic? static fromMnemonic(mnemonic) { - let wallet = new Wallet(); + const wallet = new Wallet(); wallet.wallet = ethers.Wallet.fromMnemonic(mnemonic); wallet.mnemonic = mnemonic; wallet.wallet.provider = provider; @@ -71,7 +71,7 @@ export class Wallet { // See details on units here http://ethdocs.org/en/latest/ether.html async getEtherBalance(inWei) { inWei = inWei || false; - let wei = await web3.eth.getBalance(this.getPublicAddress()); + const wei = await web3.eth.getBalance(this.getPublicAddress()); return inWei ? wei : Number(web3.fromWei(wei, "ether")); } @@ -84,8 +84,8 @@ export class Wallet { // See details on units here http://ethdocs.org/en/latest/ether.html async getOrgTokenBalance(organizationAvatarAddress, inWei) { inWei = inWei || false; - let org = await Organization.at(organizationAvatarAddress); - let balance = await org.token.balanceOf(this.getPublicAddress()); + const org = await Organization.at(organizationAvatarAddress); + const balance = await org.token.balanceOf(this.getPublicAddress()); return inWei ? web3.toWei(balance.valueOf(), "ether") : balance.valueOf(); } @@ -102,12 +102,12 @@ export class Wallet { } async sendOrgTokens(organizationAvatarAddress, toAccountAddress, numTokens) { - let org = await Organization.at(organizationAvatarAddress); + const org = await Organization.at(organizationAvatarAddress); // Get raw transaction data so we can sign ourselves - let transactionData = org.token.transfer.request(toAccountAddress, numTokens, { from: this.getPublicAddress() }).params[0].data; + const transactionData = org.token.transfer.request(toAccountAddress, numTokens, { from: this.getPublicAddress() }).params[0].data; - var transaction = { + const transaction = { to: org.token.address, value: 0, data: transactionData, @@ -115,7 +115,7 @@ export class Wallet { chainId: ethers.providers.Provider.chainId[ethNetwork] }; - let transactionHash = await this.wallet.sendTransaction(transaction); + const transactionHash = await this.wallet.sendTransaction(transaction); return transactionHash; } } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..b3985fbb9 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,4357 @@ +{ + "name": "arc", + "version": "0.0.0-alpha.1", + "lockfileVersion": 1, + "dependencies": { + "@types/bignumber.js": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-4.0.3.tgz", + "integrity": "sha512-KoJPKjhlWBry4fk8qcIufXFOU+zcZBfkHQWKbnAMQTMoe2GDeLpjSQHS+22gv+dg7gKdTP2WCjSeCVnfj8e+Gw==" + }, + "acorn": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz", + "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "dev": true, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, + "acorn-globals": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz", + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=", + "dev": true, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, + "acorn-jsx": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", + "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", + "dev": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "aes-js": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", + "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" + }, + "ajv": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz", + "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=" + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true + }, + "amp": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz", + "integrity": "sha1-at+NWKdPNh6CwfqNOJwHnhOfxH0=", + "dev": true + }, + "amp-message": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/amp-message/-/amp-message-0.1.2.tgz", + "integrity": "sha1-p48cmJlQh602GSpBKY5NtJ49/EU=", + "dev": true + }, + "ansi-escapes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", + "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", + "dev": true + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "anymatch": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz", + "integrity": "sha512-0XNayC8lTHQ2OI8aljNCN3sSx6hsr/1+rlcDAotXJR7C1oZZHCNsfpbKwMjRA3Uqb5tF1Rae2oloTr4xpq+WjA==", + "dev": true + }, + "argparse": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", + "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "dev": true + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "dev": true + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", + "dev": true + }, + "asn1.js": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.2.tgz", + "integrity": "sha512-b/OsSjvWEo8Pi8H0zsDd2P6Uqo2TK2pH8gNLSJtNLM2Db0v2QaAZ0pBQJXVjAn4gBuugeVDr7s63ZogpUIwWDg==", + "dev": true + }, + "assert": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", + "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", + "dev": true + }, + "assertion-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.0.2.tgz", + "integrity": "sha1-E8pRXYYgbaC6xm6DTdOX2HWBCUw=", + "dev": true + }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "dev": true + }, + "async-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", + "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=", + "dev": true + }, + "babel-cli": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-cli/-/babel-cli-6.26.0.tgz", + "integrity": "sha1-UCq1SHTX24itALiHoGODzgPQAvE=", + "dev": true + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "dev": true + }, + "babel-core": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz", + "integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=", + "dev": true + }, + "babel-eslint": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-7.2.3.tgz", + "integrity": "sha1-sv4tgBJkcPXBlELcdXJTqJdxCCc=", + "dev": true + }, + "babel-generator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", + "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "dev": true + }, + "babel-helper-call-delegate": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", + "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", + "dev": true + }, + "babel-helper-define-map": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", + "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", + "dev": true + }, + "babel-helper-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", + "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", + "dev": true + }, + "babel-helper-get-function-arity": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", + "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", + "dev": true + }, + "babel-helper-hoist-variables": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", + "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", + "dev": true + }, + "babel-helper-optimise-call-expression": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", + "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", + "dev": true + }, + "babel-helper-regex": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", + "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", + "dev": true + }, + "babel-helper-replace-supers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", + "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", + "dev": true + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "dev": true + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "dev": true + }, + "babel-plugin-check-es2015-constants": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", + "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", + "dev": true + }, + "babel-plugin-syntax-async-functions": { + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", + "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=", + "dev": true + }, + "babel-plugin-transform-es2015-arrow-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", + "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", + "dev": true + }, + "babel-plugin-transform-es2015-block-scoped-functions": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", + "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", + "dev": true + }, + "babel-plugin-transform-es2015-block-scoping": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", + "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", + "dev": true + }, + "babel-plugin-transform-es2015-classes": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", + "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", + "dev": true + }, + "babel-plugin-transform-es2015-computed-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", + "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", + "dev": true + }, + "babel-plugin-transform-es2015-destructuring": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", + "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", + "dev": true + }, + "babel-plugin-transform-es2015-duplicate-keys": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", + "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", + "dev": true + }, + "babel-plugin-transform-es2015-for-of": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", + "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", + "dev": true + }, + "babel-plugin-transform-es2015-function-name": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", + "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", + "dev": true + }, + "babel-plugin-transform-es2015-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", + "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-amd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", + "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-commonjs": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.0.tgz", + "integrity": "sha1-DYOUApt9xqvhqX7xgeAHWN0uXYo=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-systemjs": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", + "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", + "dev": true + }, + "babel-plugin-transform-es2015-modules-umd": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", + "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", + "dev": true + }, + "babel-plugin-transform-es2015-object-super": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", + "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", + "dev": true + }, + "babel-plugin-transform-es2015-parameters": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", + "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", + "dev": true + }, + "babel-plugin-transform-es2015-shorthand-properties": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", + "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", + "dev": true + }, + "babel-plugin-transform-es2015-spread": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", + "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", + "dev": true + }, + "babel-plugin-transform-es2015-sticky-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", + "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", + "dev": true + }, + "babel-plugin-transform-es2015-template-literals": { + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", + "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", + "dev": true + }, + "babel-plugin-transform-es2015-typeof-symbol": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", + "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", + "dev": true + }, + "babel-plugin-transform-es2015-unicode-regex": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", + "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", + "dev": true + }, + "babel-plugin-transform-regenerator": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", + "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", + "dev": true + }, + "babel-plugin-transform-strict-mode": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", + "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", + "dev": true + }, + "babel-polyfill": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz", + "integrity": "sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=", + "dev": true, + "dependencies": { + "regenerator-runtime": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=", + "dev": true + } + } + }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "dev": true + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "dev": true + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "dev": true + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "dev": true + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "dev": true + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.1.tgz", + "integrity": "sha512-dwVUVIXsBZXwTuwnXI9RK8sBmgq09NDHzyR9SAph9eqk76gKK2JSQmZARC2zRC81JC2QTtxD0ARU5qTS25gIGw==", + "dev": true + }, + "big.js": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", + "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==", + "dev": true + }, + "bignumber.js": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", + "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" + }, + "binary-extensions": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", + "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "dev": true + }, + "bip39": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.4.0.tgz", + "integrity": "sha512-1++HywqIyPtWDo7gm4v0ylYbwkLvHkuwVSKbBlZBbTCP/mnkyrlARBny906VLAwxJbC5xw9EvuJasHFIZaIFMQ==" + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "dev": true + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-stdout": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", + "integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8=", + "dev": true + }, + "browserify-aes": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", + "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", + "dev": true + }, + "browserify-cipher": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", + "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", + "dev": true + }, + "browserify-des": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", + "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", + "dev": true + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true + }, + "buffer": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "dev": true + }, + "callsites": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "dev": true + }, + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true + }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true + }, + "character-parser": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz", + "integrity": "sha1-x84o821LzZdE5f/CxfzeHHMmH8A=", + "dev": true + }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", + "dev": true + }, + "charm": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/charm/-/charm-0.1.2.tgz", + "integrity": "sha1-BsIe7RobBq62dVPNxT4jJ0usIpY=", + "dev": true + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz", + "integrity": "sha1-eY5ol3gVHIB2tLNg5e3SjNortGg=", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==" + }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "dev": true + }, + "clean-css": { + "version": "3.4.28", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz", + "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=", + "dev": true, + "dependencies": { + "commander": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", + "dev": true + }, + "source-map": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", + "dev": true + } + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true + }, + "cli-table": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", + "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", + "dev": true + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "dependencies": { + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "coffee-script": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.10.0.tgz", + "integrity": "sha1-EpOLz5vhlI+gBvkuDEyegXBRCMA=", + "dev": true + }, + "color-convert": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", + "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", + "dev": true + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + }, + "commander": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-BFnaq5ZOGcDN7FlrtBT4xxkgIToalIIxwjxLWVJ8bGTpe1LroqMiqQXdA7ygc7CRvaYS+9zfPGFnJqFSayx+AA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "dev": true + }, + "configurable": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/configurable/-/configurable-0.0.1.tgz", + "integrity": "sha1-R9dbcntRtOuEwdra/j+CQDE4M7E=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true + }, + "constantinople": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.0.tgz", + "integrity": "sha1-dWnKqKo/jVk11i4fqW+fcCzYHHk=", + "dev": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=", + "dev": true + }, + "core-js": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.2.tgz", + "integrity": "sha1-vEZIZW59ydyA19PHu8Fy2W50TmM=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", + "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", + "dev": true + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=" + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=" + }, + "cron": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cron/-/cron-1.1.0.tgz", + "integrity": "sha1-YehoxvGPmOi8uIvNern7j66QlFM=", + "dev": true + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true + }, + "crypto-js": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "dev": true + }, + "daostack-arc": { + "version": "0.0.0-alpha.15", + "resolved": "https://registry.npmjs.org/daostack-arc/-/daostack-arc-0.0.0-alpha.15.tgz", + "integrity": "sha512-eqoQnpkTwCpVpU7HHUQLR+8fwQEJrM7jVPjG3TwlwB1aB19tw6MQw0Hkr48Gam2HjIuUC1qqSLwDhC0Al2S98w==", + "dependencies": { + "@types/bignumber.js": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/bignumber.js/-/bignumber.js-4.0.3.tgz", + "integrity": "sha512-KoJPKjhlWBry4fk8qcIufXFOU+zcZBfkHQWKbnAMQTMoe2GDeLpjSQHS+22gv+dg7gKdTP2WCjSeCVnfj8e+Gw==" + }, + "bip39": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.4.0.tgz", + "integrity": "sha512-1++HywqIyPtWDo7gm4v0ylYbwkLvHkuwVSKbBlZBbTCP/mnkyrlARBny906VLAwxJbC5xw9EvuJasHFIZaIFMQ==" + }, + "default-options": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-options/-/default-options-1.0.0.tgz", + "integrity": "sha1-ZiRmWprA0JiCr3Tm5Eyx2sWMqyo=" + }, + "ethers": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-2.1.3.tgz", + "integrity": "sha512-9vjce4+nLQCNT7bI07rGEIWGmZvZCw+SzV7Ek/H3Los7hC+ZK0L73zp8gaORE+dYuxP1YRRZrRQP+ocuhnJk9w==" + }, + "promisify": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/promisify/-/promisify-0.0.3.tgz", + "integrity": "sha1-dU22HynuZHarVDxFtGTSH171VoY=" + }, + "truffle-contract": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.1.tgz", + "integrity": "sha512-uHavvQfKuPRCxk1v+jjbGuxpng0EgyLOF3wASrIrkHHiv2aUZiZr+z0EHyUOSrq4aAKeA8CqpToUyFrGGHXJNA==" + }, + "web3-typescript-typings": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/web3-typescript-typings/-/web3-typescript-typings-0.7.2.tgz", + "integrity": "sha512-6lBSipWCX6wNZYWs+12RR9HkQtcOvtMa8rmV+XIHdYFqAsN/DaSp8Dbj0VyMdL+TbOs/PR549Ot/pFa4ef1ihA==" + } + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-options": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-options/-/default-options-1.0.0.tgz", + "integrity": "sha1-ZiRmWprA0JiCr3Tm5Eyx2sWMqyo=" + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "dev": true + }, + "del": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", + "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", + "dev": true + }, + "des.js": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", + "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "dev": true + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "dev": true + }, + "diff": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", + "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", + "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", + "dev": true + }, + "doctrine": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.2.tgz", + "integrity": "sha512-y0tm5Pq6ywp3qSTZ1vPgVdAnbDEoeoc5wlOHXoY1c4Wug/a7JvqHIl7BTvwodaHmejWkK/9dSb3sCYfyo/om8A==", + "dev": true + }, + "doctypes": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz", + "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=", + "dev": true + }, + "domain-browser": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", + "dev": true + }, + "elliptic": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz", + "integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=" + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "dev": true + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "dev": true + }, + "errno": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.5.tgz", + "integrity": "sha512-tv2H+e3KBnMmNRuoVG24uorOj3XfYo+/nJJd07PUISRr0kaMKQKL5kyD+6ANXk1ZIIsvbORsjvHnCfC4KIc7uQ==", + "dev": true + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "dev": true + }, + "es-abstract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", + "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "dev": true + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "dev": true + }, + "es5-ext": { + "version": "0.10.37", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.37.tgz", + "integrity": "sha1-DudB0Ui4AGm6J9AgOTdWryV978M=", + "dev": true + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "dev": true + }, + "escape-regexp": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/escape-regexp/-/escape-regexp-0.0.1.tgz", + "integrity": "sha1-9EvaEtRbvfnLf4Yu5+SCez3TIlQ=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true + }, + "eslint": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.13.0.tgz", + "integrity": "sha512-1l2aVrEz9yiWsEQdL3XZEzTovHQJFZaTeIhOOilKQRiYNn1dVALoYOtn06iPoxhEwFukBPX4Ff8WoGD4r/7D2A==", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true + }, + "globals": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.1.0.tgz", + "integrity": "sha512-uEuWt9mqTlPDwSqi+sHjD4nWU/1N+q0fiWI9T1mZpD2UENqX20CFD5T/ziLZvztPaBKl7ZylUi1q6Qfm7E2CiQ==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true + } + } + }, + "eslint-config-defaults": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-defaults/-/eslint-config-defaults-9.0.0.tgz", + "integrity": "sha1-oJCtwTspNeP0OzzQSKknAWVOWtU=", + "dev": true + }, + "eslint-config-standard": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-10.2.1.tgz", + "integrity": "sha1-wGHk0GbzedwXzVYsZOgZtN1FRZE=", + "dev": true + }, + "eslint-import-resolver-node": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz", + "integrity": "sha512-yUtXS15gIcij68NmXmP9Ni77AQuCN0itXbCc/jWd8C6/yKZaSNXicpC8cgvjnxVdmfsosIXrjpzFq7GcDryb6A==", + "dev": true + }, + "eslint-module-utils": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", + "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", + "dev": true + }, + "eslint-plugin-import": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.8.0.tgz", + "integrity": "sha512-Rf7dfKJxZ16QuTgVv1OYNxkZcsu/hULFnC+e+w0Gzi6jMC3guQoWQgxYxc54IDRinlb6/0v5z/PxxIKmVctN+g==", + "dev": true, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true + } + } + }, + "eslint-plugin-node": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-5.2.1.tgz", + "integrity": "sha512-xhPXrh0Vl/b7870uEbaumb2Q+LxaEcOQ3kS1jtIXanBAwpMre1l5q/l2l/hESYJGEFKuI78bp6Uw50hlpr7B+g==", + "dev": true, + "dependencies": { + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", + "dev": true + } + } + }, + "eslint-plugin-promise": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.6.0.tgz", + "integrity": "sha512-YQzM6TLTlApAr7Li8vWKR+K3WghjwKcYzY0d2roWap4SLK+kzuagJX/leTetIDWsFcTFnKNJXWupDCD6aZkP2Q==", + "dev": true + }, + "eslint-plugin-react": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.5.1.tgz", + "integrity": "sha512-YGSjB9Qu6QbVTroUZi66pYky3DfoIPLdHQ/wmrBGyBRnwxQsBXAov9j2rpXt/55i8nyMv6IRWJv2s4d4YnduzQ==", + "dev": true + }, + "eslint-plugin-standard": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", + "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "dev": true + }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "dev": true + }, + "espree": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.2.tgz", + "integrity": "sha512-sadKeYwaR/aJ3stC2CdvgXu1T16TdYN+qwCpcWbMnGJ8s0zNWemzrvb2GbD4OhmJ/fwpJjudThAlLobGbWZbCQ==", + "dev": true + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", + "dev": true + }, + "esquery": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", + "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", + "dev": true + }, + "esrecurse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", + "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "dev": true + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "ethereumjs-testrpc": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ethereumjs-testrpc/-/ethereumjs-testrpc-6.0.3.tgz", + "integrity": "sha512-lAxxsxDKK69Wuwqym2K49VpXtBvLEsXr1sryNG4AkvL5DomMdeCBbu3D87UEevKenLHBiT8GTjARwN6Yj039gA==", + "dev": true + }, + "ethers": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-2.1.3.tgz", + "integrity": "sha512-9vjce4+nLQCNT7bI07rGEIWGmZvZCw+SzV7Ek/H3Los7hC+ZK0L73zp8gaORE+dYuxP1YRRZrRQP+ocuhnJk9w==" + }, + "ethers-contracts": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/ethers-contracts/-/ethers-contracts-2.1.8.tgz", + "integrity": "sha512-litnoma4leRYzTXIdjw2Ehi8GaN2WZBY3AUZbEMgFma6qOrajtVl7j4rNyyCjFv8IIropq69EHlFTy/RSqflYg==" + }, + "ethers-providers": { + "version": "2.1.14", + "resolved": "https://registry.npmjs.org/ethers-providers/-/ethers-providers-2.1.14.tgz", + "integrity": "sha512-q2tijonGll2lnzHk3aTxIxPGP9t1vKetKywKzBXCOH/lksaM5hyUgNRkuNPD+YZvK4jGR9qQIxQETGw+X1J/aw==", + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + } + } + }, + "ethers-utils": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/ethers-utils/-/ethers-utils-2.1.8.tgz", + "integrity": "sha512-hpB/aZvKWSqDGtarlfApj5u21YMqATxG0lkzz/v08XxT0lP9S6x/aDc9/x2rAVsCjSm/jIpPZxoP0LDJyss0nA==" + }, + "ethers-wallet": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/ethers-wallet/-/ethers-wallet-2.1.6.tgz", + "integrity": "sha512-fwmh/xbo5zwJ2FHLVQYIcnV48dXqiSlS54UqHX4x1TEUVUUNSFn8ppJ2FValohBN6PAK/VDcHNzbxPhOysCcGw==" + }, + "ethjs-abi": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.1.8.tgz", + "integrity": "sha1-zSiFg+1ijN+tr4re+juh28vKbBg=", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + }, + "js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" + } + } + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true + }, + "eventemitter2": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", + "dev": true + }, + "events": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", + "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "dev": true + }, + "expand-range": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "dev": true + }, + "external-editor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", + "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", + "dev": true + }, + "extglob": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "dev": true + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fbjs": { + "version": "0.8.16", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", + "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", + "dev": true, + "dependencies": { + "core-js": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", + "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", + "dev": true + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + } + } + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "dev": true + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", + "dev": true + }, + "fill-range": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", + "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dev": true + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "fs-readdir-recursive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", + "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "globby": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", + "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", + "dev": true + }, + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", + "dev": true + }, + "graceful-readlink": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", + "dev": true + }, + "growl": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", + "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", + "dev": true + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=" + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==" + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "dev": true + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", + "dev": true + }, + "ieee754": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", + "dev": true + }, + "ignore": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.7.tgz", + "integrity": "sha512-YGG3ejvBNHRqu0559EOxxNFihD0AjpvHlC/pdGKd3X3ofe+CoJkYazwNJYTNebqpPKN+VVQbh4ZFn1DivMNuHA==", + "dev": true + }, + "ikt": { + "version": "git+http://ikt.pm2.io/ikt.git#3325a3e39a502418dc2e2e4bf21529cbbde96228", + "dev": true, + "optional": true + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true + } + } + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true + }, + "invariant": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", + "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true + }, + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "dev": true + }, + "is-expression": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-2.1.0.tgz", + "integrity": "sha1-kb6dR968/vB3l36XIr5tz7RGXvA=", + "dev": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "dev": true + }, + "is-path-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", + "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "dev": true + }, + "is-path-in-cwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz", + "integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=", + "dev": true + }, + "is-path-inside": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", + "dev": true + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", + "dev": true + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true + }, + "is-resolvable": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz", + "integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "dev": true + }, + "js-sha3": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", + "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" + }, + "js-stringify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", + "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", + "dev": true + }, + "js-yaml": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz", + "integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==", + "dev": true + }, + "jsesc": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", + "dev": true + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jstransformer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz", + "integrity": "sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=", + "dev": true + }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "dev": true + }, + "keypress": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", + "integrity": "sha1-SjGI1CkbZrT2XtuZ+AaqmuKTWSo=", + "dev": true + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true + }, + "lazy": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/lazy/-/lazy-1.0.11.tgz", + "integrity": "sha1-2qBoIGKCVCwIgojpdcKXwa53tpA=", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true + }, + "loader-runner": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", + "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "dev": true + }, + "loader-utils": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", + "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", + "dev": true + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "lodash": { + "version": "4.17.4", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", + "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" + }, + "lodash.cond": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.cond/-/lodash.cond-4.5.2.tgz", + "integrity": "sha1-9HGh2khr5g9quVXRcRVSPdHSVdU=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "loose-envify": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", + "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", + "dev": true + }, + "lru-cache": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz", + "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==", + "dev": true + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "dev": true, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true + } + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "dev": true + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true + }, + "mimic-fn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", + "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true + }, + "mocha": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", + "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", + "dev": true, + "dependencies": { + "commander": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", + "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", + "dev": true + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true + }, + "supports-color": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", + "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", + "dev": true + } + } + }, + "moment": { + "version": "2.19.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.4.tgz", + "integrity": "sha512-1xFTAknSLfc47DIxHDUbnJWC+UwgWxATmymaxIPQpmMh7LBm7ZbwVEsuushqwL2GYZU0jie4xO+TK44hJPjNSQ==", + "dev": true + }, + "moment-timezone": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.3.1.tgz", + "integrity": "sha1-PvR4VrAtU7cYoQpewgI6opnge/U=", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=", + "dev": true, + "optional": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "dev": true + }, + "node-libs-browser": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", + "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true + }, + "nssocket": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/nssocket/-/nssocket-0.6.0.tgz", + "integrity": "sha1-Wflvb/MhVm8zxw99vu7N/cBxVPo=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + } + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", + "dev": true + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "dev": true + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "output-file-sync": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", + "integrity": "sha1-0KM+7+YaIF+suQCS6CZZjVJFznY=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz", + "integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw=", + "dev": true + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parse-asn1": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", + "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", + "dev": true + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true + }, + "path-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", + "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", + "dev": true + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", + "dev": true + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==" + }, + "pidusage": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-1.2.0.tgz", + "integrity": "sha512-OGo+iSOk44HRJ8q15AyG570UYxcm5u+R99DI8Khu8P3tKGkVu5EZX4ywHglWSTMNNXQ274oeGpYrvFEhDIFGPg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "dev": true + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", + "dev": true + }, + "pm2": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/pm2/-/pm2-1.1.3.tgz", + "integrity": "sha1-EM3D/teC0sDrUs5phVl9463h9k8=", + "dev": true, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "chalk": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz", + "integrity": "sha1-UJr7ZwZudJn36zU1x3RFdyri0Bk=", + "dev": true + }, + "chokidar": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.4.3.tgz", + "integrity": "sha1-X+czpNmsrqUbJkVLfllVkWPQ27I=", + "dev": true + }, + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + }, + "semver": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.1.1.tgz", + "integrity": "sha1-oykqNz5vPgeY2gsgZBuanFvEfhk=", + "dev": true + }, + "source-map": { + "version": "0.1.32", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", + "integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY=", + "dev": true + }, + "source-map-support": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.0.tgz", + "integrity": "sha1-y5IpK8BUVc5IaR3lRawmkLscyXY=", + "dev": true + } + } + }, + "pm2-axon": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/pm2-axon/-/pm2-axon-2.0.11.tgz", + "integrity": "sha1-Ro65v6FXwSxwG2spjXSwbIPzVr8=", + "dev": true, + "dependencies": { + "debug": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz", + "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=", + "dev": true + }, + "ms": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", + "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg=", + "dev": true + } + } + }, + "pm2-axon-rpc": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/pm2-axon-rpc/-/pm2-axon-rpc-0.3.6.tgz", + "integrity": "sha1-Cokx9PbeR783kWM8xnWw5HAPNqA=", + "dev": true, + "dependencies": { + "commander": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.5.tgz", + "integrity": "sha1-RXKVu5duOI6d0NtS3kMz4knz2Iw=", + "dev": true + } + } + }, + "pm2-deploy": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-0.2.1.tgz", + "integrity": "sha1-fFmjX7x6BjT+ZzkODt2jTrItAK4=", + "dev": true, + "dependencies": { + "async": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.4.2.tgz", + "integrity": "sha1-bJ7csRztTw3S8tQNsNSaEJwIiqs=", + "dev": true + } + } + }, + "pm2-multimeter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz", + "integrity": "sha1-Gh5VFT1BoFU0zqI8/oYKuqDrSs4=", + "dev": true + }, + "pmx": { + "version": "0.6.8", + "resolved": "https://registry.npmjs.org/pmx/-/pmx-0.6.8.tgz", + "integrity": "sha1-j51ttHB+puxzgwU3R1EDZ80fYzI=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", + "dev": true + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true + }, + "promisify": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/promisify/-/promisify-0.0.3.tgz", + "integrity": "sha1-dU22HynuZHarVDxFtGTSH171VoY=" + }, + "prop-types": { + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", + "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "public-encrypt": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", + "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", + "dev": true + }, + "pug": { + "version": "2.0.0-rc.4", + "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.0-rc.4.tgz", + "integrity": "sha512-SL7xovj6E2Loq9N0UgV6ynjMLW4urTFY/L/Fprhvz13Xc5vjzkjZjI1QHKq31200+6PSD8PyU6MqrtCTJj6/XA==", + "dev": true + }, + "pug-attrs": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.2.tgz", + "integrity": "sha1-i+KyIlVo/6ddG4Zpgr/59BEa/8s=", + "dev": true + }, + "pug-code-gen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-2.0.0.tgz", + "integrity": "sha512-E4oiJT+Jn5tyEIloj8dIJQognbiNNp0i0cAJmYtQTFS0soJ917nlIuFtqVss3IXMEyQKUew3F4gIkBpn18KbVg==", + "dev": true + }, + "pug-error": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.2.tgz", + "integrity": "sha1-U659nSm7A89WRJOgJhCfVMR/XyY=", + "dev": true + }, + "pug-filters": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-2.1.5.tgz", + "integrity": "sha512-xkw71KtrC4sxleKiq+cUlQzsiLn8pM5+vCgkChW2E6oNOzaqTSIBKIQ5cl4oheuDzvJYCTSYzRaVinMUrV4YLQ==", + "dev": true + }, + "pug-lexer": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-3.1.0.tgz", + "integrity": "sha1-/QhzdtSmdbT1n4/vQiiDQ06VgaI=", + "dev": true, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + }, + "is-expression": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz", + "integrity": "sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8=", + "dev": true + } + } + }, + "pug-linker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-3.0.3.tgz", + "integrity": "sha512-DCKczglCXOzJ1lr4xUj/lVHYvS+lGmR2+KTCjZjtIpdwaN7lNOoX2SW6KFX5X4ElvW+6ThwB+acSUg08UJFN5A==", + "dev": true + }, + "pug-load": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.9.tgz", + "integrity": "sha512-BDdZOCru4mg+1MiZwRQZh25+NTRo/R6/qArrdWIf308rHtWA5N9kpoUskRe4H6FslaQujC+DigH9LqlBA4gf6Q==", + "dev": true + }, + "pug-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-4.0.0.tgz", + "integrity": "sha512-ocEUFPdLG9awwFj0sqi1uiZLNvfoodCMULZzkRqILryIWc/UUlDlxqrKhKjAIIGPX/1SNsvxy63+ayEGocGhQg==", + "dev": true + }, + "pug-runtime": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.3.tgz", + "integrity": "sha1-mBYmB7D86eJU1CfzOYelrucWi9o=", + "dev": true + }, + "pug-strip-comments": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.2.tgz", + "integrity": "sha1-0xOvoBvMN0mA4TmeI+vy65vchRM=", + "dev": true + }, + "pug-walk": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.5.tgz", + "integrity": "sha512-rJlH1lXerCIAtImXBze3dtKq/ykZMA4rpO9FnPcIgsWcxZLOvd8zltaoeOVFyBSSqCkhhJWbEbTMga8UxWUUSA==", + "dev": true + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randomatic": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", + "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", + "dev": true, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true + } + } + }, + "randombytes": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", + "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==" + }, + "randomfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.3.tgz", + "integrity": "sha512-YL6GrhrWoic0Eq8rXVbMptH7dAxCs0J+mh5Y0euNekPPYaxEmdVGim6GdoxoRzKW2yJoU8tueifS7mYxvcFDEQ==", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", + "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==", + "dev": true + }, + "readdirp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", + "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", + "dev": true + }, + "regenerate": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.3.3.tgz", + "integrity": "sha512-jVpo1GadrDAK59t/0jRx5VxYWQEDkkEKi6+HjE3joFVLfDOh9Xrdh0dF1eSq+BI/SwvTQ44gSscJ8N5zYL61sg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "regenerator-transform": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", + "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", + "dev": true + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "dev": true + }, + "regexpu-core": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", + "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", + "dev": true + }, + "regjsgen": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", + "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=", + "dev": true + }, + "regjsparser": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", + "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", + "dev": true, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "repeating": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", + "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "require-uncached": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "dev": true + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "dev": true + }, + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=" + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", + "dev": true + }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "scrypt-js": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", + "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=" + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "dev": true + }, + "setimmediate": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.4.tgz", + "integrity": "sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48=" + }, + "sha.js": { + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz", + "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==" + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.0.tgz", + "integrity": "sha1-zh7YN7Sw5Vtew9q4QlGrnb3Ax+w=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "dev": true + }, + "source-list-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", + "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "dev": true + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "dev": true + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "dev": true + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", + "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", + "dev": true + }, + "stream-http": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.7.2.tgz", + "integrity": "sha512-c0yTD2rbQzXtSsFSVhtpvY/vS6u066PcXOX9kBB3mSO76RiUQzL340uJkGBWnlBg4/HZzqiUXtaVA7wcRcJgEw==", + "dev": true + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true + } + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=" + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "dev": true, + "dependencies": { + "ansi-styles": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.0.tgz", + "integrity": "sha512-NnSOmMEYtVR2JVMIGTzynRkkaxtiq1xnFBcdQD/DnNCYPoEPsVJhM98BDyaoNOQIi7p4okdi3E27eN7GQbsUug==", + "dev": true + }, + "chalk": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true + } + } + }, + "tapable": { + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", + "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=", + "dev": true + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "timers-browserify": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.4.tgz", + "integrity": "sha512-uZYhyU3EX8O7HQP+J9fTVYwsq90Vr68xPEFo7yrVImIxYvHgukBEgOB/SgGoorWVTzGM/3Z+wUNnboA4M8jWrg==", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "dev": true + }, + "token-stream": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", + "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "truffle-blockchain-utils": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.3.tgz", + "integrity": "sha1-rooRHsEk2WUE8OBCxvIFwLOBfik=" + }, + "truffle-contract": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/truffle-contract/-/truffle-contract-3.0.1.tgz", + "integrity": "sha512-uHavvQfKuPRCxk1v+jjbGuxpng0EgyLOF3wASrIrkHHiv2aUZiZr+z0EHyUOSrq4aAKeA8CqpToUyFrGGHXJNA==" + }, + "truffle-contract-schema": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/truffle-contract-schema/-/truffle-contract-schema-1.0.1.tgz", + "integrity": "sha512-37ZO9FVvmW/PZz/sh00LAz7HN2U4FHERuxI4mCbUR6h3r2cRgZ4YBfzHuAHOnZlrVzM1qx/Dx/1Ng3UyfWseEA==", + "dependencies": { + "crypto-js": { + "version": "3.1.9-1", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", + "integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg=" + } + } + }, + "tryit": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz", + "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", + "dev": true + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tv4": { + "version": "1.0.18", + "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.0.18.tgz", + "integrity": "sha1-c5d2nwA1jjO/Uo3FyHZMYbbegkU=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true + }, + "type-detect": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.5.tgz", + "integrity": "sha512-N9IvkQslUGYGC24RkJk1ba99foK6TkwC2FHAEBlQFBP0RxQZS8ZpJuAZcwiY/w9ZJHFQb1aOXBI60OdxhTrwEQ==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "ua-parser-js": { + "version": "0.7.17", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", + "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==", + "dev": true + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "dependencies": { + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true + } + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "dev": true + }, + "uint32": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/uint32/-/uint32-0.2.1.tgz", + "integrity": "sha1-5hjYAtf//Si3CPzOzHMVYIusR/I=", + "dev": true + }, + "underscore": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=", + "dev": true + }, + "underscore.string": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz", + "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs=", + "dev": true + }, + "unorm": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", + "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "user-home": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", + "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", + "dev": true + }, + "utf8": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=" + }, + "v8flags": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", + "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "dev": true + }, + "vizion": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/vizion/-/vizion-0.2.13.tgz", + "integrity": "sha1-ExTN7is0EW+fWxJIU2+V2/zW718=", + "dev": true, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + } + } + }, + "vm-browserify": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", + "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", + "dev": true + }, + "void-elements": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz", + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=", + "dev": true + }, + "watchpack": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", + "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", + "dev": true + }, + "web3": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.20.2.tgz", + "integrity": "sha1-xU2sX8DjdzmcBMGm7LsS5FEyeNY=", + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934" + } + } + }, + "web3-typescript-typings": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/web3-typescript-typings/-/web3-typescript-typings-0.7.2.tgz", + "integrity": "sha512-6lBSipWCX6wNZYWs+12RR9HkQtcOvtMa8rmV+XIHdYFqAsN/DaSp8Dbj0VyMdL+TbOs/PR549Ot/pFa4ef1ihA==" + }, + "webpack": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.10.0.tgz", + "integrity": "sha512-fxxKXoicjdXNUMY7LIdY89tkJJJ0m1Oo8PQutZ5rLgWbV5QVKI15Cn7+/IHnRTd3vfKfiwBx6SBqlorAuNA8LA==", + "dev": true, + "dependencies": { + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true + } + } + }, + "webpack-sources": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", + "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", + "dev": true, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "whatwg-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", + "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=", + "dev": true + }, + "when": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=" + }, + "which": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz", + "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==", + "dev": true + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "with": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz", + "integrity": "sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4=", + "dev": true, + "dependencies": { + "acorn": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", + "dev": true + } + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "dev": true + }, + "xhr2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yamljs": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.2.7.tgz", + "integrity": "sha1-hMfiDHkOPbxxFpf++BFbYoWErQw=", + "dev": true, + "dependencies": { + "argparse": { + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz", + "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=", + "dev": true + }, + "glob": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", + "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", + "dev": true + }, + "minimatch": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", + "dev": true + } + } + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "dev": true, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true + } + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "dependencies": { + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..a33601d1b --- /dev/null +++ b/package.json @@ -0,0 +1,70 @@ +{ + "name": "arc-js", + "version": "0.0.0-alpha.1", + "description": "Javascript library providing access to DAOStack ethereum smart contracts (daostack-arc)", + "main": "lib/arc.js", + "directories": { + "lib": "./lib", + "doc": "./docs", + "contracts": "./contracts/" + }, + "scripts": { + "build": "babel lib --presets babel-preset-es2015 --out-dir dist", + "prepublishOnly": "npm run build", + "lint": "eslint .", + "lint --fix": "eslint --fix .", + "test": "mocha --require babel-register --require chai" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/daostack/arc.js.git" + }, + "keywords": [ + "Arc", + "DAOStack", + "Ethereum", + "DAO", + "javascript", + "smart", + "contracts" + ], + "author": "", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/daostack/arc.js/issues" + }, + "homepage": "https://github.com/daostack/arc.js#readme", + "dependencies": { + "@types/bignumber.js": "^4.0.3", + "bip39": "^2.4.0", + "daostack-arc": "0.0.0-alpha.15", + "default-options": "^1.0.0", + "ethers": "^2.1.3", + "promisify": "0.0.3", + "truffle-contract": "^3.0.1", + "web3-typescript-typings": "^0.7.2" + }, + "devDependencies": { + "babel-cli": "^6.26.0", + "babel-eslint": "^7.2.3", + "babel-plugin-syntax-async-functions": "^6.1.4", + "babel-polyfill": "^6.23.0", + "babel-preset-es2015": "^6.6.0", + "babel-register": "^6.24.1", + "bignumber.js": "^4.1.0", + "chai": "^4.1.2", + "eslint": "^4.10.0", + "eslint-config-defaults": "^9.0.0", + "eslint-config-standard": "^10.2.1", + "eslint-plugin-import": "^2.7.0", + "eslint-plugin-node": "^5.1.1", + "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-react": "^7.4.0", + "eslint-plugin-standard": "^3.0.1", + "ethereumjs-testrpc": "^6.0.3", + "mocha": "^4.0.1", + "pm2": "^1.1.3", + "pug": "^2.0.0-rc.1", + "uint32": "^0.2.1" + } +} diff --git a/test/globalconstraintregistrar.js b/test/globalconstraintregistrar.js new file mode 100644 index 000000000..f1e8000d6 --- /dev/null +++ b/test/globalconstraintregistrar.js @@ -0,0 +1,253 @@ +const helpers = require('./helpers'); +import { getValueFromLogs, requireContract } from '../lib/utils.js'; + +import { GlobalConstraintRegistrar } from '../lib/globalconstraintregistrar.js'; + +const DAOToken = requireContract("DAOToken"); +const TokenCapGC = requireContract("TokenCapGC"); + +contract('GlobalConstraintRegistrar', (accounts) => { + let tx, proposalId; + + before(() => { + helpers.etherForEveryone(); + }); + + it("proposeToAddModifyGlobalConstraint javascript wrapper should work", async () => { + const organization = await helpers.forgeOrganization(); + + const tokenCapGC = await organization.scheme('TokenCapGC'); + + const globalConstraintParametersHash = await tokenCapGC.getParametersHash(organization.token.address,3141); + await tokenCapGC.setParameters(organization.token.address,3141); + + const votingMachineHash = await organization.votingMachine.getParametersHash(organization.reputation.address, 50, true); + await organization.votingMachine.setParameters(organization.reputation.address, 50, true); + + const globalConstraintRegistrar = await organization.scheme('GlobalConstraintRegistrar'); + + await globalConstraintRegistrar.proposeToAddModifyGlobalConstraint({ + avatar: organization.avatar.address, + globalConstraint: tokenCapGC.address, + globalConstraintParametersHash: globalConstraintParametersHash, + votingMachineHash: votingMachineHash + }); + + // const proposalId = getValueFromLogs(tx, '_proposalId'); + + // console.log(`****** proposal ID ${proposalId} ******`); + }); + + // it("proposeToRemoveGlobalConstraint javascript wrapper should not crash", async function() { + // const organization = await helpers.forgeOrganization(); + + // let tokenCapGC = await organization.scheme('TokenCapGC'); + + // let globalConstraintRegistrar = await organization.scheme('GlobalConstraintRegistrar'); + + // await globalConstraintRegistrar.proposeToRemoveGlobalConstraint({ + // avatar: organization.avatar.address, + // globalConstraint: tokenCapGC.address + // }); + + // // const proposalId = getValueFromLogs(tx, '_proposalId'); + + // // console.log(`****** proposal ID ${proposalId} ******`); + // }); + + it("should register and enforce a global constraint", async () => { + const organization = await helpers.forgeOrganization(); + + const tokenCapGC = await organization.scheme('TokenCapGC'); + const globalConstraintParametersHash = await tokenCapGC.getParametersHash(organization.token.address,3141); + await tokenCapGC.setParameters(organization.token.address,3141); + + const votingMachineHash = await organization.votingMachine.getParametersHash(organization.reputation.address, 50, true); + await organization.votingMachine.setParameters(organization.reputation.address, 50, true); + + const globalConstraintRegistrar = (await organization.scheme('GlobalConstraintRegistrar')).contract; + + const tx = await globalConstraintRegistrar.proposeGlobalConstraint( + organization.avatar.address, + tokenCapGC.address, + globalConstraintParametersHash, + votingMachineHash + ); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + // console.log(`****** proposal ID ${proposalId} ******`); + + // serveral users now cast their vote + await organization.vote(proposalId, 1, {from: web3.eth.accounts[0]}); + // next is decisive vote: the proposal will be executed + await organization.vote(proposalId, 1, {from: web3.eth.accounts[2]}); + + // now the tokencap is enforced: up to 3141 tokens + // minting 1111 tokens should be fine + // TODO: this is complex: we must create a proposal to mint these tokens and accept that + // proposalId = await organization.proposeScheme('ContributionScheme'); + // await organization.vote(proposalId, true, {from: web3.eth.accounts[2]}); + + // minting 9999 tokens should be out + + }); + + it("should satisfy a number of basic checks", async () => { + const organization = await helpers.forgeOrganization(); + + // do some sanity checks on the globalconstriantregistrar + const gcr = (await organization.scheme('GlobalConstraintRegistrar')).contract; + // check if our organization is registered on the gcr + assert.equal(await gcr.isRegistered(organization.avatar.address), true); + // check if indeed the registrar is registered as a scheme on the controller + assert.equal(await organization.controller.isSchemeRegistered(gcr.address), true); + // Organization.new standardly registers no global constraints + assert.equal((await organization.controller.globalConstraintsCount()).toNumber(), 0); + + // create a new global constraint - a TokenCapGC instance + const tokenCapGC = await TokenCapGC.new(); + // register paramets for setting a cap on the nativeToken of our organization of 21 million + await tokenCapGC.setParameters(organization.token.address, 21e9); + const tokenCapGCParamsHash = await tokenCapGC.getParametersHash(organization.token.address, 21e9); + + // next line needs some real hash for the conditions for removing this scheme + const votingMachineHash = tokenCapGCParamsHash; + + // to propose a global constraint we need to make sure the relevant hashes are registered + // in the right places: + const parametersForGCR = await organization.controller.getSchemeParameters(gcr.address); + // parametersForVotingInGCR are (voteRegisterParams (a hash) and boolVote) + const parametersForVotingInGCR = await gcr.parameters(parametersForGCR); + + // the info we just got consists of paramsHash and permissions + const gcrPermissionsOnOrg = await organization.controller.getSchemePermissions(gcr.address); + assert.equal(gcrPermissionsOnOrg, '0x00000007'); + + // the voting machine used in this GCR is the same as the voting machine of the organization + assert.equal(organization.votingMachine.address, parametersForVotingInGCR[1]); + // while the voteRegisterParams are known on the voting machine + // and consist of [reputationSystem address, treshold percentage] + const voteRegisterParams = await organization.votingMachine.parameters(parametersForVotingInGCR[0]); + + const msg = "These parameters are not known the voting machine..."; + assert.notEqual(voteRegisterParams[0], '0x0000000000000000000000000000000000000000', msg); + tx = await gcr.proposeGlobalConstraint(organization.avatar.address, tokenCapGC.address, tokenCapGCParamsHash, votingMachineHash); + + // check if the proposal is known on the GlobalConstraintRegistrar + proposalId = getValueFromLogs(tx, '_proposalId'); + // TODO: read the proposal in the contract: + // const proposal = await gcr.proposals(proposalId); + // // the proposal looks like gc-address, params, proposaltype, removeParams + // assert.equal(proposal[0], tokenCapGC.address); + + // TODO: the voting machine should be taken from the address at parametersForVotingInGCR[1] + const votingMachine = organization.votingMachine; + // first vote (minority) + tx = await votingMachine.vote(proposalId, 1, {from: web3.eth.accounts[1]}); + // and this is the majority vote (which will also call execute on the executable + tx = await votingMachine.vote(proposalId, 1, {from: web3.eth.accounts[2]}); + + // at this point, our global constrait has been registered at the organization + assert.equal((await organization.controller.globalConstraintsCount()).toNumber(), 1); + return; + // // get the first global constraint + // const gc = await organization.controller.globalConstraints(0); + // const params = await organization.controller.globalConstraintsParams(0); + // // see which global constraints are satisfied + // assert.equal(gc, tokenCapGC.address); + // assert.equal(params, tokenCapGCParamsHash); + }); + + it("the GlobalConstraintRegistrar.new() function should work as expected with the default parameters", async () => { + // create a schemeRegistrar + const registrar = await GlobalConstraintRegistrar.new(); + + const tokenAddress = await registrar.nativeToken(); + assert.isOk(tokenAddress); + const fee = await registrar.fee(); + assert.equal(fee, 0); + // the sender is the beneficiary + const beneficiary = await registrar.beneficiary(); + assert.equal(beneficiary, accounts[0]); + }); + + it("the GlobalConstraintRegistrar.new() function should work as expected with specific parameters", async () => { + // create a schemeRegistrar, passing some options + const token = await DAOToken.new(); + + const registrar = await GlobalConstraintRegistrar.new({ + tokenAddress:token.address, + fee: 3e18, + beneficiary: accounts[1] + }); + + const tokenAddress = await registrar.nativeToken(); + assert.equal(tokenAddress, token.address); + const fee = await registrar.fee(); + assert.equal(fee, 3e18); + const beneficiary = await registrar.beneficiary(); + assert.equal(beneficiary, accounts[1]); + }); + + it('organisation.proposalGlobalConstraint() should accept different parameters [TODO]', async () => { + const organization = await helpers.forgeOrganization(); + + const tokenCapGC = await organization.scheme('TokenCapGC'); + + let globalConstraintParametersHash = await tokenCapGC.getParametersHash(organization.token.address,21e9); + await tokenCapGC.setParameters(organization.token.address,21e9); + + let votingMachineHash = await organization.votingMachine.getParametersHash(organization.reputation.address, 50, true); + await organization.votingMachine.setParameters(organization.reputation.address, 50, true); + + const globalConstraintRegistrar = (await organization.scheme('GlobalConstraintRegistrar')).contract; + + let tx = await globalConstraintRegistrar.proposeGlobalConstraint( + organization.avatar.address, + tokenCapGC.address, + globalConstraintParametersHash, + votingMachineHash + ); + + let proposalId = getValueFromLogs(tx, '_proposalId'); + assert.isOk(proposalId); + + // proposalId = await organization.proposeGlobalConstraint({ + // contract: 'TokenCapGC', + // paramsHash: tokenCapGCParamsHash, + // }); + // + // assert.isOk(proposalId); + + globalConstraintParametersHash = await tokenCapGC.getParametersHash(organization.token.address, 1234); + await tokenCapGC.setParameters(organization.token.address, 1234); + + votingMachineHash = await organization.votingMachine.getParametersHash(organization.reputation.address, 1, false); + await organization.votingMachine.setParameters(organization.reputation.address, 1, false); + + tx = await globalConstraintRegistrar.proposeGlobalConstraint( + organization.avatar.address, + tokenCapGC.address, + globalConstraintParametersHash, + votingMachineHash + ); + + proposalId = getValueFromLogs(tx, '_proposalId'); + + assert.isOk(proposalId); + + // // we can also register an 'anonymous' constraint + // const tokenCapGC = await TokenCapGC.new(); + // const tokenCapGCParamsHash = await tokenCapGC.setParameters(organization.token.address, 3000); + // + // proposalId = await organization.proposeGlobalConstraint({ + // address: tokenCapGC.address, + // paramsHash: tokenCapGCParamsHash, + // }); + // + // assert.isOk(proposalId); + + + }); +}); diff --git a/test/helpers.js b/test/helpers.js new file mode 100644 index 000000000..353f90fdc --- /dev/null +++ b/test/helpers.js @@ -0,0 +1,96 @@ +/** + helpers for tests +*/ +import { Organization } from '../lib/organization.js'; +import { getSettings } from '../lib/settings.js'; + +export const NULL_HASH = '0x0000000000000000000000000000000000000000000000000000000000000000'; +export const SOME_HASH = '0x1000000000000000000000000000000000000000000000000000000000000000'; +export const NULL_ADDRESS = '0x0000000000000000000000000000000000000000'; +export const SOME_ADDRESS = '0x1000000000000000000000000000000000000000'; + +export function getProposalAddress(tx) { + // helper function that returns a proposal object from the ProposalCreated event + // in the logs of tx + assert.equal(tx.logs[0].event, 'ProposalCreated'); + const proposalAddress = tx.logs[0].args.proposaladdress; + return proposalAddress; +} + +export async function getProposal(tx) { + return await Proposal.at(getProposalAddress(tx)); +} + +export async function etherForEveryone() { + // give all web3.eth.accounts some ether + const accounts = web3.eth.accounts; + for (let i=0; i < 10; i++) { + await web3.eth.sendTransaction({to: accounts[i], from: accounts[0], value: web3.toWei(0.1, "ether")}); + } +} + + +export async function forgeOrganization(opts = {}) { + const founders = [ + { + address: web3.eth.accounts[0], + reputation: 1, + tokens: 1, + }, + { + address: web3.eth.accounts[1], + reputation: 29, + tokens: 2, + }, + { + address: web3.eth.accounts[2], + reputation: 70, + tokens: 3, + }, + ]; + const defaults = { + orgName: 'something', + tokenName: 'token name', + tokenSymbol: 'TST', + founders + }; + + const options = Object.assign(defaults, opts); + // add this there to eat some dog food + return Organization.new(options); +} + + +export const outOfGasMessage = 'VM Exception while processing transaction: out of gas'; + + +export function assertJumpOrOutOfGas(error) { + const condition = ( + error.message == outOfGasMessage || + error.message.search('invalid JUMP') > -1 + ); + assert.isTrue(condition, 'Expected an out-of-gas error or an invalid JUMP error, got this instead: ' + error.message); +} + +export function assertVMException(error) { + const condition = ( + error.message.search('VM Exception') > -1 + ); + assert.isTrue(condition, 'Expected a VM Exception, got this instead:' + error.message); +} + +export function assertInternalFunctionException(error) { + const condition = ( + error.message.search('is not a function') > -1 + ); + assert.isTrue(condition, 'Expected a function not found Exception, got this instead:' + error.message); +} + +export function assertJump(error) { + assert.isAbove(error.message.search('invalid JUMP'), -1, 'Invalid JUMP error must be returned' + error.message); +} + +export function settingsForTest() { + // return settings used for testing + return getSettings(); +} diff --git a/test/organization.js b/test/organization.js new file mode 100644 index 000000000..ef3047396 --- /dev/null +++ b/test/organization.js @@ -0,0 +1,119 @@ + +import { Organization } from '../lib/organization.js'; +import * as helpers from './helpers'; +import { proposeSimpleContributionScheme } from './simplecontribution.js'; + + +contract('Organization', (accounts) => { + let organization; + + before(() => { + helpers.etherForEveryone(); + }); + + it("can be created with 'new' using default settings", async () => { + organization = await Organization.new({ + orgName: 'Skynet', + tokenName: 'Tokens of skynet', + tokenSymbol: 'SNT' + }); + // an organization has an avatar + assert.ok(organization.avatar, 'Organization must have an avatar defined'); + }); + + it("can be instantiated with 'at' if it was already deployed", async () => { + // first create an organization + const org1 = await Organization.new({ + orgName: 'Skynet', + tokenName: 'Tokens of skynet', + tokenSymbol: 'SNT' + }); + // then instantiate it with .at + const org2 = await Organization.at(org1.avatar.address); + + // check if the two orgs are indeed the same + assert.equal(org1.avatar.address, org2.avatar.address); + assert.equal(org1.orgName, org2.orgName); + assert.equal(org1.orgToken, org2.orgToken); + const schemeRegistrar1 = await org1.scheme('SchemeRegistrar'); + const schemeRegistrar2 = await org2.scheme('SchemeRegistrar'); + assert.equal(schemeRegistrar1.address, schemeRegistrar2.address); + const upgradeScheme1 = await org1.scheme('UpgradeScheme'); + const upgradeScheme2 = await org2.scheme('UpgradeScheme'); + assert.equal(upgradeScheme1.address, upgradeScheme2.address); + const globalConstraintRegistrar1 = await org1.scheme('GlobalConstraintRegistrar'); + const globalConstraintRegistrar2 = await org2.scheme('GlobalConstraintRegistrar'); + assert.equal(globalConstraintRegistrar1.address, globalConstraintRegistrar2.address); + }); + + it("has a working schemes() function to access its schemes", async () => { + organization = await helpers.forgeOrganization(); + const settings = await helpers.settingsForTest(); + // a new organization comes with three known schemes + assert.equal((await organization.schemes()).length, 3); + let scheme = await organization.scheme('GlobalConstraintRegistrar'); + assert.equal(scheme.address, settings.daostackContracts.GlobalConstraintRegistrar.address); + assert.isTrue(!!scheme.contract, "contract must be set"); + scheme = await organization.scheme('SchemeRegistrar'); + assert.equal(scheme.address, settings.daostackContracts.SchemeRegistrar.address); + assert.isTrue(!!scheme.contract, "contract must be set"); + scheme = await organization.scheme('UpgradeScheme'); + assert.equal(scheme.address, settings.daostackContracts.UpgradeScheme.address); + assert.isTrue(!!scheme.contract, "contract must be set"); + + + // now we add another known scheme + await proposeSimpleContributionScheme(organization, accounts); + + assert.equal((await organization.schemes()).length, 4); + // TODO: the organizaiton must be registered with the scheme before the next works + // assert.equal((await organization.scheme('SimpleContributionScheme')).address, settings.daostackContracts.ContributionScheme.address); + }); + + // it("has a working proposeScheme function for SimpleICO", async function(){ + + // organization = await Organization.new({ + // orgName: 'Skynet', + // tokenName: 'Tokens of skynet', + // tokenSymbol: 'SNT' + // }); + + // proposalId = await organization.proposeScheme({ + // contract: 'SimpleICO', + // params: { + // cap: 100, // uint cap; // Cap in Eth + // price: .001, // uint price; // Price represents Tokens per 1 Eth + // startBlock: 5, // uint startBlock; + // endBlock: 10, // uint endBlock; + // admin: accounts[3], // address admin; // The admin can halt or resume ICO. + // beneficiary: accounts[4], // address beneficiary; // all funds received will be transffered to this address. + // } + // }); + // // + // assert.isOk(proposalId); + // assert.notEqual(proposalId, helpers.NULL_HASH); + + // }); + + // it("has a working proposeScheme function for ContributionScheme [IN PROGRESS]", async function(){ + // organization = await Organization.new({ + // orgName: 'Skynet', + // tokenName: 'Tokens of skynet', + // tokenSymbol: 'SNT' + // }); + + // proposalId = await organization.proposeScheme({ + // contract: 'SimpleContributionScheme', + // }); + // // + // assert.isOk(proposalId); + // assert.notEqual(proposalId, helpers.NULL_HASH); + + // // TODO: test with non-default settings + + // }); + + // it("has a working proposeScheme function for UpgradeScheme [TODO]", async function(){ + // }); + +}); diff --git a/test/schemeregistrar.js b/test/schemeregistrar.js new file mode 100644 index 000000000..afcd1954c --- /dev/null +++ b/test/schemeregistrar.js @@ -0,0 +1,123 @@ +import { SchemeRegistrar } from '../lib/schemeregistrar.js'; +import { NULL_HASH, getValueFromLogs, requireContract } from '../lib/utils'; +import { forgeOrganization, settingsForTest } from './helpers'; + +const DAOToken = requireContract("DAOToken"); + +contract('SchemeRegistrar', (accounts) => { + + it("proposeToAddModifyScheme javascript wrapper should add new scheme", async () => { + const organization = await forgeOrganization(); + const settings = await settingsForTest(); + + const schemeRegistrar = await organization.scheme('SchemeRegistrar'); + const simpleContributionScheme = await organization.schemes('SimpleContributionScheme'); + assert.equal(simpleContributionScheme.length,0, "scheme is already present"); + + const simpleContributionSchemeAddress = settings.daostackContracts.SimpleContributionScheme.address; + + assert.isFalse(await organization.controller.isSchemeRegistered(simpleContributionSchemeAddress), "scheme is registered into the controller"); + + const tx = await schemeRegistrar.proposeToAddModifyScheme({ + avatar: organization.avatar.address, + scheme: simpleContributionSchemeAddress, + schemeName: "SimpleContributionScheme", + schemeParametersHash: NULL_HASH + }); + + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + organization.vote(proposalId, 1, {from: accounts[2]}); + + assert.isTrue(await organization.controller.isSchemeRegistered(simpleContributionSchemeAddress), "scheme is not registered into the controller"); + }); + + it("proposeToAddModifyScheme javascript wrapper should modify existing scheme", async () => { + const organization = await forgeOrganization(); + + const schemeRegistrar = await organization.scheme('SchemeRegistrar'); + const upgradeScheme = await organization.schemes('SchemeRegistrar'); + assert.equal(upgradeScheme.length, 1, "scheme is not present"); + + const modifiedSchemeAddress = upgradeScheme[0].address; + + const tx = await schemeRegistrar.proposeToAddModifyScheme({ + avatar: organization.avatar.address, + scheme: modifiedSchemeAddress, + schemeName: "SchemeRegistrar", + schemeParametersHash: NULL_HASH + }); + + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + organization.vote(proposalId, 1, {from: accounts[2]}); + + assert.isTrue(await organization.controller.isSchemeRegistered(modifiedSchemeAddress), "scheme is not registered into the controller"); + + const paramsHash = await organization.controller.getSchemeParameters(modifiedSchemeAddress); + + assert.equal(paramsHash, NULL_HASH, "parameters hash is not correct"); + }); + + it("proposeToRemoveScheme javascript wrapper should remove scheme", async () => { + const organization = await forgeOrganization(); + + const schemeRegistrar = await organization.scheme('SchemeRegistrar'); + const removedScheme = schemeRegistrar; + + const tx = await schemeRegistrar.proposeToRemoveScheme({ + avatar: organization.avatar.address, + scheme: removedScheme.address + }); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + organization.vote(proposalId, 1, {from: accounts[2]}); + + assert.isFalse(await organization.controller.isSchemeRegistered(removedScheme.address), "scheme is still registered into the controller"); + }); + + it("schemeRegistrar.new should work as expected with default values", async () => { + // create a schemeRegistrar + const registrar = await SchemeRegistrar.new({ + fee: undefined, + beneficiary: undefined, + tokenAddress: undefined + }); + + // because the registrar is constructed without a token address, it should have + // created a new DAOToken - we check if it works as expected + const tokenAddress = await registrar.nativeToken(); + const token = await DAOToken.at(tokenAddress); + const accounts = web3.eth.accounts; + let balance; + balance = await token.balanceOf(accounts[0]); + assert.equal(balance.valueOf(), 0); + await token.mint(web3.eth.accounts[0], 1000 * Math.pow(10, 18)); + balance = await token.balanceOf(accounts[0]); + assert.equal(balance.valueOf(), 1000 * Math.pow(10, 18)); + }); + + it("schemeRegistrar.new should work as expected with non-default values", async () => { + // create a schemeRegistrar, passing some options + const token = await DAOToken.new(); + + const registrar = await SchemeRegistrar.new({ + tokenAddress:token.address, + fee: 3e18, + beneficiary: accounts[1] + }); + + // check if registrar indeed uses the specified token + const tokenAddress = await registrar.nativeToken(); + assert.equal(tokenAddress, token.address); + // check if the fee is as specified + const fee = await registrar.fee(); + assert.equal(fee, 3e18); + // check if the beneficiary is as specified + const beneficiary = await registrar.beneficiary(); + assert.equal(beneficiary, accounts[1]); + }); +}); diff --git a/test/simplecontribution.js b/test/simplecontribution.js new file mode 100644 index 000000000..53384a406 --- /dev/null +++ b/test/simplecontribution.js @@ -0,0 +1,244 @@ +import * as helpers from './helpers'; +import { getValueFromLogs, requireContract } from '../lib/utils.js'; + +const DAOToken = requireContract("DAOToken"); +const SimpleContributionScheme = requireContract("SimpleContributionScheme"); + +export async function proposeSimpleContributionScheme(org, accounts) { + const schemeRegistrar = await org.scheme("SchemeRegistrar"); + const simpleContributionScheme = await org.scheme('SimpleContributionScheme'); + + const votingMachineHash = await org.votingMachine.getParametersHash(org.reputation.address, 50, true); + await org.votingMachine.setParameters(org.reputation.address, 50, true); + + const votingMachineAddress = org.votingMachine.address; + + const schemeParametersHash = await simpleContributionScheme.setParams({ + orgNativeTokenFee: 0, + schemeNativeTokenFee: 0, + voteParametersHash: votingMachineHash, + votingMachine: votingMachineAddress + }); + + const tx = await schemeRegistrar.proposeToAddModifyScheme({ + avatar: org.avatar.address, + scheme: simpleContributionScheme.address, + schemeName: "SimpleContributionScheme", + schemeParametersHash: schemeParametersHash + }); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + org.vote(proposalId, 1, {from: accounts[2]}); + + return simpleContributionScheme; +} + +contract('SimpleContribution scheme', (accounts) => { + let params, paramsHash, tx, proposal; + + before(() => { + helpers.etherForEveryone(); + }); + + it("submit and accept a contribution - complete workflow", async () => { + const organization = await helpers.forgeOrganization(); + const scheme = await proposeSimpleContributionScheme(organization, accounts); + + tx = await scheme.proposeContribution({ + avatar: organization.avatar.address, // Avatar _avatar, + description: 'A new contribution', // string _contributionDesciption, + beneficiary: accounts[1], // address _beneficiary + nativeTokenReward: 1, + }); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + // now vote with a majority account and accept this contribution + organization.vote(proposalId, 1, {from: accounts[2]}); + + // TODO: check that the proposal is indeed accepted + }); + + it("submit and accept a contribution - complete workflow with payments [TODO]", async () => { + // TODO: write a similar test as the previous one, but with all different forms of payment + }); + + it("submit and accept a contribution - using the ABI Contract", async () => { + const founders = [ + { + address: accounts[0], + tokens: 30, + reputation: 30, + }, + { + address: accounts[1], + tokens: 70, + reputation: 70, + }, + ]; + + const org = await helpers.forgeOrganization({founders}); + + const avatar = org.avatar; + const controller = org.controller; + + // we creaet a SimpleContributionScheme + const tokenAddress = await controller.nativeToken(); + const votingMachine = org.votingMachine; + + // create a contribution Scheme + const contributionScheme = (await SimpleContributionScheme.new( + tokenAddress, + 0, // register with 0 fee + accounts[0], + )); + + // check if we have the fee to register the contribution + const contributionSchemeRegisterFee = await contributionScheme.fee(); + // console.log('contributionSchemeRegisterFee: ' + contributionSchemeRegisterFee); + // our fee is 0, so that's easy (TODO: write a test with non-zero fees) + assert.equal(contributionSchemeRegisterFee, 0); + + const votingMachineHash = await votingMachine.getParametersHash(org.reputation.address, 50, true); + await votingMachine.setParameters(org.reputation.address, 50, true); + const votingMachineAddress = votingMachine.address; + + // console.log(`****** votingMachineHash ${votingMachineHash} ******`); + // console.log(`****** votingMachineAddress ${votingMachineAddress} ******`); + + const schemeParametersHash = await contributionScheme.getParametersHash( + 0, + 0, + votingMachineHash, + votingMachineAddress + ); + + await contributionScheme.setParameters( + 0, + 0, + votingMachineHash, + votingMachineAddress + ); + + const schemeRegistrar = await org.scheme("SchemeRegistrar"); + + tx = await schemeRegistrar.proposeToAddModifyScheme({ + avatar: avatar.address, + scheme: contributionScheme.address, + schemeName: "SimpleContributionScheme", + schemeParametersHash: schemeParametersHash + }); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + // this will vote-and-execute + tx = await votingMachine.vote(proposalId, 1, {from: accounts[1]}); + + // now our scheme should be registered on the controller + const schemeFromController = await controller.schemes(contributionScheme.address); + // we expect to have only the first bit set (it is a registered scheme without nay particular permissions) + assert.equal(schemeFromController[1], '0x00000001'); + + // is the organization registered? + const orgFromContributionScheme = await contributionScheme.organizations(avatar.address); + // console.log('orgFromContributionScheme after registering'); + assert.equal(orgFromContributionScheme, true); + // check the configuration for proposing new contributions + + paramsHash = await controller.getSchemeParameters(contributionScheme.address); + // console.log(`****** paramsHash ${paramsHash} ******`); + // params are: uint orgNativeTokenFee; bytes32 voteApproveParams; uint schemeNativeTokenFee; BoolVoteInterface boolVote; + params = await contributionScheme.parameters(paramsHash); + // check if they are not trivial - the 4th item should be a valid boolVote address + assert.notEqual(params[3], '0x0000000000000000000000000000000000000000'); + assert.equal(params[3], votingMachine.address); + // now we can propose a contribution + tx = await contributionScheme.submitContribution( + avatar.address, // Avatar _avatar, + 'a fair play', // string _contributionDesciption, + 0, // uint _nativeTokenReward, + 0, // uint _reputationReward, + 0, // uint _ethReward, + '0x0008e8314d3f08fd072e06b6253d62ed526038a0', // StandardToken _externalToken, we provide some arbitrary address + 0, // uint _externalTokenReward, + accounts[2], // address _beneficiary + ); + + // console.log(tx.logs); + const contributionId = tx.logs[0].args._proposalId; + // let us vote for it (is there a way to get the votingmachine from the contributionScheme?) + // this is a minority vote for 'yes' + // check preconditions for the vote + proposal = await votingMachine.proposals(contributionId); + // a propsoal has the following structure + // 0. address owner; + // 1. address avatar; + // 2. Number Of Choices + // 3. ExecutableInterface executable; + // 4. bytes32 paramsHash; + // 5. uint yes; // total 'yes' votes + // 6. uint no; // total 'no' votes + // MAPPING is skipped in the reutnr value... + // X.mapping(address=>int) voted; // save the amount of reputation voted by an agent (positive sign is yes, negatice is no) + // 7. bool opened; // voting opened flag + assert.isOk(proposal[6]); // proposal.opened is true + // first we check if our executable (proposal[3]) is indeed the contributionScheme + assert.equal(proposal[3], contributionScheme.address); + + tx = await votingMachine.vote(contributionId, 1, {from: accounts[0]}); + // and this is the majority vote (which will also call execute on the executable + tx = await votingMachine.vote(contributionId, 1, {from: accounts[1]}); + + // TODO: check if proposal was deleted from contribution Scheme + // proposal = await contributionScheme.proposals(contributionId); + // assert.equal(proposal[0], helpers.NULL_HASH); + + // check if proposal was deleted from voting machine + proposal = await votingMachine.proposals(contributionId); + // TODO: proposal is not deleted from voting machine: is that feature or bug? + // assert.notOk(proposal[6]); // proposal.opened is false + + // TODO: no payments have been made. Write another test for that. + + }); + + it('Can set and get parameters', async () => { + let params; + + const token = await DAOToken.new(); + + // create a contribution Scheme + const contributionScheme = await SimpleContributionScheme.new({ + tokenAddress: token.address, + fee: 0, // register with 0 fee + beneficiary: accounts[1], + }); + + const contributionSchemeParamsHash = await contributionScheme.getParametersHash( + 0, + 0, + helpers.SOME_HASH, + helpers.SOME_ADDRESS, + ); + + // these parameters are not registered yet at this point + params = await contributionScheme.parameters(contributionSchemeParamsHash); + assert.equal(params[3], '0x0000000000000000000000000000000000000000'); + + // register the parameters are registers in the contribution scheme + await contributionScheme.setParameters( + 0, + 0, + helpers.SOME_HASH, + helpers.SOME_ADDRESS, + ); + + params = await contributionScheme.parameters(contributionSchemeParamsHash); + assert.notEqual(params[3], '0x0000000000000000000000000000000000000000'); + + }); + + +}); + diff --git a/test/upgradescheme.js b/test/upgradescheme.js new file mode 100644 index 000000000..2b0e72cbb --- /dev/null +++ b/test/upgradescheme.js @@ -0,0 +1,138 @@ +import { Organization } from '../lib/organization.js'; +import { getValueFromLogs, requireContract } from '../lib/utils.js'; +const Controller = requireContract("Controller"); +const AbsoluteVote = requireContract('AbsoluteVote'); +const UpgradeScheme = requireContract('UpgradeScheme'); +import { forgeOrganization, settingsForTest, SOME_HASH } from './helpers'; + + +contract('UpgradeScheme', (accounts) => { + before(() => { + helpers.etherForEveryone(); + }); + + it("proposeController javascript wrapper should change controller", async () => { + const organization = await forgeOrganization(); + + const upgradeScheme = await organization.scheme('UpgradeScheme'); + const newController = await Controller.new(null, null, null, [], [], []); + + assert.equal(await organization.controller.newController(), helpers.NULL_ADDRESS, "there is already a new contoller"); + + const tx = await upgradeScheme.proposeController({ + avatar: organization.avatar.address, + controller: newController.address + }); + + // newUpgradeScheme.registerOrganization(organization.avatar.address); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + organization.vote(proposalId, 1, {from: accounts[2]}); + + // now the ugprade should have been executed + assert.equal(await organization.controller.newController(), newController.address); + + // avatar, token and reputation ownership shold have been transferred to the new controller + assert.equal(await organization.token.owner(), newController.address); + assert.equal(await organization.reputation.owner(), newController.address); + assert.equal(await organization.avatar.owner(), newController.address); + }); + + it('controller upgrade should work as expected', async () => { + const founders = [ + { + address: accounts[0], + reputation: 30, + tokens: 30, + }, + { + address: accounts[1], + reputation: 70, + tokens: 70, + } + ]; + const organization = await Organization.new({ + orgName: 'Skynet', + tokenName: 'Tokens of skynet', + tokenSymbol: 'SNT', + founders, + }); + + const upgradeScheme = await organization.scheme('UpgradeScheme'); + const settings = await settingsForTest(); + const votingMachine = await AbsoluteVote.at(settings.votingMachine); + + // the organization has not bene upgraded yet, so newController is the NULL address + assert.equal(await organization.controller.newController(), helpers.NULL_ADDRESS); + + // we create a new controller to upgrade to + const newController = await Controller.new(null, null, null, [], [], []); + let tx = await upgradeScheme.proposeUpgrade(organization.avatar.address, newController.address); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + // now vote with the majority for the proposal + tx = await votingMachine.vote(proposalId, 1, {from: accounts[1]}); + + // now the ugprade should have been executed + assert.equal(await organization.controller.newController(), newController.address); + + // avatar, token and reputation ownership shold have been transferred to the new controller + assert.equal(await organization.token.owner(), newController.address); + assert.equal(await organization.reputation.owner(), newController.address); + assert.equal(await organization.avatar.owner(), newController.address); + + // TODO: we also want to reflect this upgrade in our Controller object! + }); + + it("proposeUpgradingScheme javascript wrapper should change upgrade scheme", async () => { + const organization = await forgeOrganization(); + + const upgradeScheme = await organization.scheme('UpgradeScheme'); + + const newUpgradeScheme = await UpgradeScheme.new(organization.token.address, 0, accounts[0]); + + assert.isFalse(await organization.controller.isSchemeRegistered(newUpgradeScheme.address), "new scheme is already registered into the controller"); + assert.isTrue(await organization.controller.isSchemeRegistered(upgradeScheme.address), "original scheme is not registered into the controller"); + + const tx = await upgradeScheme.proposeUpgradingScheme({ + avatar: organization.avatar.address, + scheme: newUpgradeScheme.address, + schemeParametersHash: await organization.controller.getSchemeParameters(upgradeScheme.address) + }); + + // newUpgradeScheme.registerOrganization(organization.avatar.address); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + organization.vote(proposalId, 1, {from: accounts[2]}); + + assert.isTrue(await organization.controller.isSchemeRegistered(newUpgradeScheme.address), "new scheme is not registered into the controller"); + }); + + + it("proposeUpgradingScheme javascript wrapper should modify the modifying scheme", async () => { + + const organization = await forgeOrganization(); + + const upgradeScheme = await organization.scheme('UpgradeScheme'); + + assert.isTrue(await organization.controller.isSchemeRegistered(upgradeScheme.address), "upgrade scheme is not registered into the controller"); + + const tx = await upgradeScheme.proposeUpgradingScheme({ + avatar: organization.avatar.address, + scheme: upgradeScheme.address, + schemeParametersHash: SOME_HASH + }); + + // newUpgradeScheme.registerOrganization(organization.avatar.address); + + const proposalId = getValueFromLogs(tx, '_proposalId'); + + organization.vote(proposalId, 1, {from: accounts[2]}); + + assert.isTrue(await organization.controller.isSchemeRegistered(upgradeScheme.address), "upgrade scheme is no longer registered into the controller"); + + assert.equal(await organization.controller.getSchemeParameters(upgradeScheme.address), SOME_HASH, "parameters were not updated"); + }); +}); \ No newline at end of file diff --git a/test/utils.js b/test/utils.js new file mode 100644 index 000000000..e0964e6ce --- /dev/null +++ b/test/utils.js @@ -0,0 +1,56 @@ +"use strict"; +import { ExtendTruffleContract, requireContract } from '../lib/utils.js'; +import * as helpers from './helpers'; + +const SoliditySimpleContributionScheme = requireContract("SimpleContributionScheme"); + +class SimpleContributionScheme extends ExtendTruffleContract(SoliditySimpleContributionScheme) { + + foo() { + // console.log('foo() called'); + return 'bar'; + } + + submitContribution() { + // console.log('submitContribution() called'); + return 'abc'; + } + + + async setParams(params) { + return await this._setParameters(params.orgNativeTokenFee, params.schemeNativeTokenFee, params.voteParametersHash, params.votingMachine); + } + + getDefaultPermissions(overrideValue) { + return overrideValue || '0x00000009'; + } + +} + + +contract('ExtendTruffleContract', () => { + + it("Must have sane inheritance", async () => { + let x; + x = await SimpleContributionScheme.new(); + assert.isOk(x.nativeToken()); + assert.equal(x.foo(), 'bar'); + assert.equal(x.submitContribution(), 'abc'); + assert.equal(await x.nativeToken(), await x.contract.nativeToken()); + assert.equal(await x.setParams({ orgNativeTokenFee: 0, schemeNativeTokenFee: 0, voteParametersHash: helpers.SOME_HASH, votingMachine: helpers.SOME_ADDRESS }), '0xb6660b30e997e8e19cd58699fbf81c41450f200dbcb9f6a85c07b08483c86ee9'); + assert.equal(x.getDefaultPermissions(), '0x00000009'); + + x = await SimpleContributionScheme.at((await SoliditySimpleContributionScheme.deployed()).address); + assert.isOk(x.nativeToken()); + assert.equal(x.foo(), 'bar'); + assert.equal(x.submitContribution(), 'abc'); + assert.equal(await x.nativeToken(), await x.contract.nativeToken()); + + x = await SimpleContributionScheme.at((await SoliditySimpleContributionScheme.deployed()).address); + assert.isOk(x.nativeToken()); + assert.equal(x.foo(), 'bar'); + assert.equal(x.submitContribution(), 'abc'); + assert.equal(await x.nativeToken(), await x.contract.nativeToken()); + + }); +}); diff --git a/test/wallet.js b/test/wallet.js new file mode 100644 index 000000000..c1aff9e65 --- /dev/null +++ b/test/wallet.js @@ -0,0 +1,81 @@ +/* eslint-disable no-console */ +/* eslint-disable no-unused-vars */ + +import * as ethers from 'ethers'; + +import { Wallet } from '../lib/wallet.js'; +import * as helpers from './helpers'; + +contract('Wallet', (accounts) => { + it('creates a new wallet on the blockchain', async function() { + this.timeout(10000); + const wallet = Wallet.new(); + assert.equal(wallet.getPublicAddress().length, 42); + assert.equal(await wallet.getEtherBalance(), 0); + assert.notEqual(wallet.getMnemonic().length, 0); + }); + + it('can be encrypted and decrypted', async function() { + this.timeout(10000); + const wallet = Wallet.new(); + console.log("Encrypt wallet"); + const encryptedJSON = await wallet.encrypt("Passw0rd", (progress) => { process.stdout.write("."); }); + console.log("\n"); + console.log("Decrypting wallet"); + const wallet2 = await Wallet.fromEncrypted(encryptedJSON, "Passw0rd", (progress) => { process.stdout.write(","); }); + assert.equal(wallet.getPublicAddress(), wallet2.getPublicAddress()); + }); + + it('can be recovered from a mnemonic', function() { + this.timeout(10000); + const wallet = Wallet.new(); + const mnemonic = wallet.getMnemonic(); + const wallet2 = Wallet.fromMnemonic(mnemonic); + assert.equal(wallet.wallet.privateKey, wallet2.wallet.privateKey); + }); + + it('can send and receive ether', async function() { + this.timeout(10000); + const wallet = Wallet.new(); + await web3.eth.sendTransaction({to: wallet.getPublicAddress(), from: accounts[0], value: web3.toWei(100, "ether")}); + let balance = await wallet.getEtherBalance(); + assert.equal(balance, 100.0); + + const toBalanceBefore = await web3.eth.getBalance(accounts[2]); + await wallet.sendEther(accounts[2], 10); + balance = await wallet.getEtherBalance(); + assert.equal(balance, 89.99958); + const toBalanceAfter = await web3.eth.getBalance(accounts[2]); + assert(toBalanceAfter.equals(toBalanceBefore.plus(web3.toWei(10, "ether")))); + }); + + it('can send and receive org tokens', async function() { + this.timeout(10000); + + // TODO: easier way to get the private key from the testrpc accounts? + const wallet1 = Wallet.fromPrivateKey("0x0191ecbd1b150b8a3c27c27010ba51b45521689611e669109e034fd66ae69621"); + const wallet2 = Wallet.fromPrivateKey("0x00f360233e89c65970a41d4a85990ec6669526b2230e867c352130151453180d"); + + const orgOptions = { + founders: [ + { + address: wallet1.getPublicAddress(), + tokens: 100, + reputation: 100 + }, + { + address: wallet2.getPublicAddress(), + tokens: 100, + reputation: 100 + }, + ] + }; + const org = await helpers.forgeOrganization(orgOptions); + assert.equal(await wallet1.getOrgTokenBalance(org.avatar.address), 100); + + await wallet1.sendOrgTokens(org.avatar.address, wallet2.getPublicAddress(), 10); + assert.equal(await wallet1.getOrgTokenBalance(org.avatar.address), 90); + assert.equal(await wallet2.getOrgTokenBalance(org.avatar.address), 110); + }); + +}); \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..3bd6f173a --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "outFile": "./build/tsc.js", + "preserveConstEnums": true, + "sourceMap": true + }, + "include": [ + "lib/**/*", + "./node_modules/web3-typescript-typings/index.d.ts", + ], + "typeRoots" : [ + "node_modules/@types", + "node_modules/web3-typescript-typings" + ] +} \ No newline at end of file