diff --git a/README.md b/README.md index 24dfef2e..a7597c17 100644 --- a/README.md +++ b/README.md @@ -43,16 +43,16 @@ yarn add bnc-assist #### Script Tag The library uses [semantic versioning](https://semver.org/spec/v2.0.0.html). -The current version is 0.7.2. +The current version is 0.7.3. There are minified and non-minified versions. Put this script at the top of your `` ```html - + - + ``` ### Initialize the Library diff --git a/internals/ganacheConfig.js b/internals/ganacheConfig.js new file mode 100644 index 00000000..aec64ee2 --- /dev/null +++ b/internals/ganacheConfig.js @@ -0,0 +1,14 @@ +const port = 8546 +const accounts = [ + '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1', + '0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0' +] +const args = ['-i 5', `-p ${port}`, '-a 2', '--deterministic'] +const convertLibAddress = '0xe78a0f7e598cc8b0bb87894b0f60dd2a88d6a8ab' + +module.exports = { + args, + port, + accounts, + convertLibAddress +} diff --git a/internals/jestReporter.js b/internals/jestReporter.js new file mode 100644 index 00000000..e13adbb4 --- /dev/null +++ b/internals/jestReporter.js @@ -0,0 +1,78 @@ +/* eslint-disable import/no-extraneous-dependencies */ +/* eslint-disable no-console */ +/* eslint-disable class-methods-use-this */ +const kill = require('kill-port') +const Web3 = require('web3') +const { spawn } = require('child_process') +const convertLib = require('../src/__tests__/res/ConvertLib.json') +const { args, port, accounts } = require('./ganacheConfig.js') + +class Reporter { + constructor(globalConfig) { + this._globalConfig = globalConfig + } + + // checks if jest was run with --watch or --watchall + watching() { + return this._globalConfig.watch || this._globalConfig.watchAll + } + + // start a ganache instance before test run starts + async onRunStart() { + console.log(`Starting Ganache on port ${port}`) + await kill(port) + this.ganacheProcess = spawn('./node_modules/.bin/ganache-cli', args) + + this.ganacheProcess.on('close', code => { + if (code !== 0 && code !== 137) { + console.log(`Ganache process closed with code ${code}`) + process.exit(code) + } + !this.watching() && process.exit(code) + }) + this.ganacheProcess.on('error', code => { + console.error(`ERROR: Ganache exited with code ${code}`) + process.exit(code) + }) + this.ganacheProcess.on('exit', code => { + if (code === 1) { + console.error(`ERROR: Ganache exited with code ${code}`) + console.error( + `Is there already a process already running on port ${port}?` + ) + process.exit(code) + } + !this.watching() && process.exit(code) + }) + + // Wait until ganache is running + await new Promise(resolve => { + this.ganacheProcess.stdout.setEncoding('utf8') + this.ganacheProcess.stdout.on('data', chunk => { + if (chunk.includes('Listening')) { + console.log(`Ganache running on port ${chunk.split(':')[1]}`) + resolve() + } + }) + }) + + // Deploy a contract for truffle testing + this.web3 = new Web3(`ws://localhost:${port}`) + const convertLibWeb3 = await new this.web3.eth.Contract(convertLib.abi) + convertLibWeb3 + .deploy({ data: convertLib.bytecode }) + .send({ from: accounts[0], gasLimit: 1500000 }) + + // Ganache setup done, tests will now execute + } + + // On completion kill the ganache instance and exit the test run + async onRunComplete() { + this.web3.currentProvider.connection.close() + kill(port) + .then(() => !this.watching() && process.exit(0)) + .catch(() => console.error(`Failed to kill ganache on port ${port}`)) + } +} + +module.exports = Reporter diff --git a/jest.config.js b/jest.config.js index 57c173fc..43c38744 100644 --- a/jest.config.js +++ b/jest.config.js @@ -93,7 +93,7 @@ module.exports = { // projects: null, // Use this configuration option to add custom reporters to Jest - // reporters: undefined, + reporters: ['default', './internals/jestReporter.js'], // Automatically reset mock state between every test // resetMocks: false, diff --git a/multidep.json b/multidep.json index 27ed5db5..b78c5c03 100644 --- a/multidep.json +++ b/multidep.json @@ -2,7 +2,7 @@ "path": "multidep_modules", "versions": { "web3": [ - "1.0.0-beta.54", + "1.0.0-beta.55", "1.0.0-beta.46", "1.0.0-beta.37", "0.20.6" diff --git a/package.json b/package.json index 23f51a04..2fe694a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bnc-assist", - "version": "0.7.2", + "version": "0.7.3", "description": "Blocknative Assist js library for Dapp developers", "main": "lib/assist.min.js", "scripts": { @@ -56,11 +56,13 @@ "eslint-plugin-import": "^2.17.2", "eslint-plugin-jsx-a11y": "^6.1.2", "eslint-plugin-prettier": "^3.0.0", + "ganache-cli": "^6.4.3", "husky": "^1.3.1", "jest": "^23.6.0", "jest-cli": "^23.6.0", "jest-css-modules": "^1.1.0", "jest-dom": "^3.0.0", + "kill-port": "^1.4.0", "mock-socket": "^8.0.5", "mockdate": "^2.0.2", "multidep": "^2.0.2", @@ -74,6 +76,7 @@ "rollup-plugin-node-resolve": "^3.4.0", "rollup-plugin-string": "^2.0.2", "rollup-plugin-uglify": "^6.0.0", + "truffle-contract": "^4.0.15", "web3": "^1.0.0-beta.37" }, "eslintIgnore": [ diff --git a/src/__tests__/js/contract/__snapshots__/index.test.js.snap b/src/__tests__/js/contract/__snapshots__/index.test.js.snap index 40d1b134..12c39413 100644 --- a/src/__tests__/js/contract/__snapshots__/index.test.js.snap +++ b/src/__tests__/js/contract/__snapshots__/index.test.js.snap @@ -7614,7 +7614,7 @@ Object { } `; -exports[`using web3 1.0.0-beta.54 Contract function is called it doesn't fail and returns the expected decorated contract 1`] = ` +exports[`using web3 1.0.0-beta.55 Contract function is called it doesn't fail and returns the expected decorated contract 1`] = ` Object { "BatchRequest": [Function], "_jsonInterface": undefined, diff --git a/src/__tests__/js/web3.test.js b/src/__tests__/js/web3.test.js new file mode 100644 index 00000000..2d9def37 --- /dev/null +++ b/src/__tests__/js/web3.test.js @@ -0,0 +1,199 @@ +import truffleContract from 'truffle-contract' +import da from '~/js' +import abi from '~/__tests__/res/dstoken.json' +import { state, initialState, updateState } from '~/js/helpers/state' +import * as websockets from '~/js/helpers/websockets' +import { web3Functions } from '~/js/helpers/web3' +import convertLibJson from '~/__tests__/res/ConvertLib' +import { + accounts, + convertLibAddress, + port +} from '../../../internals/ganacheConfig' + +const multidepRequire = require('multidep')('multidep.json') + +const Web3v0p20 = multidepRequire('web3', '0.20.6') + +const zeroAddress = '0x0000000000000000000000000000000000000000' + +const initWeb3 = (simpleVersion, Web3) => { + if (simpleVersion === '1.0') { + return new Web3(`ws://localhost:${port}`) + } + const provider = new Web3.providers.HttpProvider(`http://localhost:${port}`) + return new Web3(provider) +} + +describe(`web3.js tests`, () => { + multidepRequire.forEachVersion('web3', (version, Web3) => { + describe(`using web3 ${version}`, () => { + describe('assist is initialised correctly', () => { + let web3 + let config + let simpleVersion + beforeEach(() => { + jest + .spyOn(websockets, 'openWebsocketConnection') + .mockImplementation(() => {}) + simpleVersion = version.slice(0, 3) + web3 = initWeb3(simpleVersion, Web3) + config = { dappId: '123', web3, networkId: '5' } + da.init(config) + }) + afterEach(() => { + // need to close any websocket connection + if (simpleVersion === '1.0') { + web3.currentProvider.connection.close() + } + }) + describe('web3Functions', () => { + describe('networkId', () => { + test('should return the expected networkId', async () => { + const networkId = await web3Functions.networkId(simpleVersion)() + if (simpleVersion === '1.0') expect(networkId).toEqual(5) + else expect(networkId).toEqual('5') // 0.20 returns networkId as a string + }) + }) + describe('bigNumber', () => { + test('should return the expected bigNumber', async () => { + const bigNum1 = await web3Functions.bigNumber(simpleVersion)(5) + const bigNum2 = await web3Functions.bigNumber(simpleVersion)('10') + expect(typeof bigNum1).toEqual('object') + expect(bigNum1.toString()).toEqual('5') + expect(bigNum1.toNumber()).toEqual(5) + expect(bigNum1.add(bigNum2).toString()).toEqual('15') + }) + }) + describe('gasPrice', () => { + test('should return the expected gasPrice', async () => { + const expected = '20000000000' // recommended gasPrice should be 20000000000 + const gasPrice = await web3Functions.gasPrice(simpleVersion)() + expect(gasPrice.toString()).toEqual(expected) + }) + }) + describe('contractGas', () => { + let contract + describe('from a web3 contract', () => { + beforeEach(() => { + contract = web3.eth.contract + ? web3.eth.contract(abi).at(zeroAddress) // web3 0.20 + : new web3.eth.Contract(abi, zeroAddress) // web3 1.0 + }) + test('should return the expected gas cost', async () => { + const expected = 21400 // gas the setOwner call should cost + const contract = web3.eth.contract + ? web3.eth.contract(abi).at(zeroAddress) // web3 0.20 + : new web3.eth.Contract(abi, zeroAddress) // web3 1.0 + const contractMethod = contract.methods + ? contract.methods.setOwner // web3 1.0 + : contract.setOwner // web3 0.20 + const parameters = [zeroAddress] + const contractGas = await web3Functions.contractGas( + simpleVersion + )(contractMethod, parameters, {}) + expect(contractGas).toEqual(expected) + }) + }) + describe('from a truffle contract', () => { + let contractInstance + beforeEach(async () => { + state.config.truffleContract = true + contract = truffleContract(convertLibJson) + contract.setProvider( + new Web3v0p20.providers.HttpProvider( + `http://localhost:${port}` + ) + ) + contractInstance = await contract.at(convertLibAddress) + }) + afterEach(() => { + state.config.truffleContract = false + }) + // doesn't seem to work + // see https://github.com/blocknative/assist/issues/171 + test('should return the expected gas cost', async () => { + const expected = 21988 // gas the convert call should cost + const contractMethod = contractInstance.convert + const parameters = [5, 10] + const contractGas = await web3Functions.contractGas( + simpleVersion + )(contractMethod, parameters) + expect(contractGas).toEqual(expected) + }) + }) + }) + describe('transactionGas', () => { + test('should return the expected gas cost', async () => { + const expected = 21464 // gas this tx should cost + const estimate = await web3Functions.transactionGas( + simpleVersion + )({ + to: '0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe', + data: + '0xc6888fa10000000000000000000000000000000000000000000000000000000000000003' + }) + expect(estimate).toEqual(expected) + }) + }) + describe('balance', () => { + test(`should return an address's balance`, async () => { + const expected = '100000000000000000000' // 100 ETH + const balance = await web3Functions.balance(simpleVersion)( + accounts[1] + ) + expect(balance.toString()).toEqual(expected) + }) + }) + describe('accounts', () => { + test(`should return the correct list of accounts`, async () => { + const expected = + simpleVersion === '1.0' + ? accounts + : accounts.map(a => a.toLowerCase()) + const res = await web3Functions.accounts(simpleVersion)() + expect(res).toEqual(expected) + }) + }) + describe('txReceipt', () => { + test(`should return the correct receipt`, async () => { + const hash = await new Promise(resolve => { + if (simpleVersion === '1.0') { + web3.eth + .sendTransaction({ + from: accounts[0], + to: zeroAddress, + value: 10 + }) + .on('transactionHash', hash => { + resolve(hash) + }) + } else { + web3.eth.sendTransaction( + { + from: accounts[0], + to: zeroAddress, + value: 10 + }, + (err, hash) => resolve(hash) + ) + } + }) + const receipt = await web3Functions.txReceipt(hash) + expect(receipt.to).toEqual(zeroAddress) + expect(receipt).toHaveProperty('blockNumber') + expect(receipt).toHaveProperty('transactionHash') + }) + }) + }) + }) + }) + }) +}) + +afterEach(() => { + document.body.innerHTML = '' + updateState(initialState) + window.localStorage.clear() + jest.clearAllMocks() +}) diff --git a/src/__tests__/res/ConvertLib.json b/src/__tests__/res/ConvertLib.json new file mode 100644 index 00000000..d0d6cf95 --- /dev/null +++ b/src/__tests__/res/ConvertLib.json @@ -0,0 +1,815 @@ +{ + "contractName": "ConvertLib", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "amount", + "type": "uint256" + }, + { + "name": "conversionRate", + "type": "uint256" + } + ], + "name": "convert", + "outputs": [ + { + "name": "convertedAmount", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "n1", + "type": "uint256" + }, + { + "name": "n2", + "type": "uint256" + } + ], + "name": "subtract", + "outputs": [ + { + "name": "sum", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "pure", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"n1\",\"type\":\"uint256\"},{\"name\":\"n2\",\"type\":\"uint256\"}],\"name\":\"subtract\",\"outputs\":[{\"name\":\"sum\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"conversionRate\",\"type\":\"uint256\"}],\"name\":\"convert\",\"outputs\":[{\"name\":\"convertedAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/liam/git/metacoin/contracts/ConvertLib.sol\":\"ConvertLib\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/liam/git/metacoin/contracts/ConvertLib.sol\":{\"keccak256\":\"0x60b3419e9c2e7c5ab26e388d28b6ee873e1acede3c02e6ed73fb74ea6074d137\",\"urls\":[\"bzzr://f3ad25ba9713a8e19d8ae6b4e390c13e308f3b8e0a51a033edc40f9d41070417\"]}},\"version\":1}", + "bytecode": "0x610146610030600b82828239805160001a6073146000811461002057610022565bfe5b5030600052607381538281f3fe7300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633ef5e4451461006857806396e4ee3d146100b4575b600080fd5b61009e6004803603604081101561007e57600080fd5b810190808035906020019092919080359060200190929190505050610100565b6040518082815260200191505060405180910390f35b6100ea600480360360408110156100ca57600080fd5b81019080803590602001909291908035906020019092919050505061010d565b6040518082815260200191505060405180910390f35b6000818302905092915050565b600081830290509291505056fea165627a7a72305820ea93fa188c9dd1f95367f3bf590b102435ba1eca93f983608282a75655651c9a0029", + "deployedBytecode": "0x7300000000000000000000000000000000000000003014608060405260043610610063576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633ef5e4451461006857806396e4ee3d146100b4575b600080fd5b61009e6004803603604081101561007e57600080fd5b810190808035906020019092919080359060200190929190505050610100565b6040518082815260200191505060405180910390f35b6100ea600480360360408110156100ca57600080fd5b81019080803590602001909291908035906020019092919050505061010d565b6040518082815260200191505060405180910390f35b6000818302905092915050565b600081830290509291505056fea165627a7a72305820ea93fa188c9dd1f95367f3bf590b102435ba1eca93f983608282a75655651c9a0029", + "sourceMap": "34:246:0:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "34:246:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;189:89;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;189:89:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55:132;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;55:132:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;189:89;245:8;272:2;267;:7;260:14;;189:89;;;;:::o;55:132::-;126:20;169:14;160:6;:23;153:30;;55:132;;;;:::o", + "source": "pragma solidity >=0.4.25 <0.6.0;\n\nlibrary ConvertLib{\n\tfunction convert(uint amount,uint conversionRate) public pure returns (uint convertedAmount)\n\t{\n\t\treturn amount * conversionRate;\n\t}\n\tfunction subtract(uint n1,uint n2) public pure returns (uint sum)\n\t{\n\t\treturn n1 * n2;\n\t}\n}\n", + "sourcePath": "/home/liam/git/metacoin/contracts/ConvertLib.sol", + "ast": { + "absolutePath": "/home/liam/git/metacoin/contracts/ConvertLib.sol", + "exportedSymbols": { + "ConvertLib": [ + 30 + ] + }, + "id": 31, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.4", + ".25", + "<", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:32:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 30, + "linearizedBaseContracts": [ + 30 + ], + "name": "ConvertLib", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "149:38:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "160:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 11, + "name": "conversionRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "169:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "160:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9, + "id": 13, + "nodeType": "Return", + "src": "153:30:0" + } + ] + }, + "documentation": null, + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "72:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "72:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5, + "name": "conversionRate", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "84:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "84:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "71:33:0" + }, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "convertedAmount", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "126:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "126:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "125:22:0" + }, + "scope": 30, + "src": "55:132:0", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 28, + "nodeType": "Block", + "src": "256:22:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 26, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 24, + "name": "n1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "267:2:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 25, + "name": "n2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "272:2:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 23, + "id": 27, + "nodeType": "Return", + "src": "260:14:0" + } + ] + }, + "documentation": null, + "id": 29, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "subtract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17, + "name": "n1", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "207:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "207:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19, + "name": "n2", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "215:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "215:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "206:17:0" + }, + "returnParameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22, + "name": "sum", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "245:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "245:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "244:10:0" + }, + "scope": 30, + "src": "189:89:0", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 31, + "src": "34:246:0" + } + ], + "src": "0:281:0" + }, + "legacyAST": { + "absolutePath": "/home/liam/git/metacoin/contracts/ConvertLib.sol", + "exportedSymbols": { + "ConvertLib": [ + 30 + ] + }, + "id": 31, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + ">=", + "0.4", + ".25", + "<", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "0:32:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 30, + "linearizedBaseContracts": [ + 30 + ], + "name": "ConvertLib", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 14, + "nodeType": "Block", + "src": "149:38:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 12, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 10, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "160:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 11, + "name": "conversionRate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5, + "src": "169:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "160:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 9, + "id": 13, + "nodeType": "Return", + "src": "153:30:0" + } + ] + }, + "documentation": null, + "id": 15, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "convert", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 6, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "72:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "72:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5, + "name": "conversionRate", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "84:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "84:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "71:33:0" + }, + "returnParameters": { + "id": 9, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 8, + "name": "convertedAmount", + "nodeType": "VariableDeclaration", + "scope": 15, + "src": "126:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 7, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "126:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "125:22:0" + }, + "scope": 30, + "src": "55:132:0", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 28, + "nodeType": "Block", + "src": "256:22:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 26, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 24, + "name": "n1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 17, + "src": "267:2:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 25, + "name": "n2", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 19, + "src": "272:2:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 23, + "id": 27, + "nodeType": "Return", + "src": "260:14:0" + } + ] + }, + "documentation": null, + "id": 29, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "subtract", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 20, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 17, + "name": "n1", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "207:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 16, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "207:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 19, + "name": "n2", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "215:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 18, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "215:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "206:17:0" + }, + "returnParameters": { + "id": 23, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 22, + "name": "sum", + "nodeType": "VariableDeclaration", + "scope": 29, + "src": "245:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 21, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "245:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "244:10:0" + }, + "scope": 30, + "src": "189:89:0", + "stateMutability": "pure", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 31, + "src": "34:246:0" + } + ], + "src": "0:281:0" + }, + "compiler": { + "name": "solc", + "version": "0.5.0+commit.1d4f565a.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.0.9", + "updatedAt": "2019-05-13T01:49:48.993Z", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/src/js/helpers/web3.js b/src/js/helpers/web3.js index 6b7929a9..8adccf7d 100644 --- a/src/js/helpers/web3.js +++ b/src/js/helpers/web3.js @@ -43,12 +43,12 @@ export const web3Functions = { case '0.2': return (contractMethod, parameters, txObject) => state.config.truffleContract - ? contractMethod.estimateGas(...parameters, txObject) + ? contractMethod.estimateGas(...parameters) : promisify(contractMethod.estimateGas)(...parameters, txObject) case '1.0': return (contractMethod, parameters, txObject) => state.config.truffleContract - ? contractMethod.estimateGas(...parameters, txObject) + ? contractMethod.estimateGas(...parameters) : contractMethod(...parameters).estimateGas(txObject) default: return () => Promise.reject(errorObj) diff --git a/yarn.lock b/yarn.lock index 5a369fb4..16e33966 100644 --- a/yarn.lock +++ b/yarn.lock @@ -755,6 +755,16 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= +ajv@^5.1.1: + version "5.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" + integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.3.0" + ajv@^6.5.5, ajv@^6.9.1: version "6.10.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" @@ -797,6 +807,11 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +any-promise@1.3.0, any-promise@^1.0.0, any-promise@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" + integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -1231,6 +1246,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +bignumber.js@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" + integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== + bindings@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" @@ -1253,6 +1273,18 @@ bl@^1.0.0: readable-stream "^2.3.5" safe-buffer "^5.1.1" +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= + dependencies: + inherits "~2.0.0" + +bluebird@^2.9.34: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" + integrity sha1-U0uQM8AiyVecVro7Plpcqvu2UOE= + bluebird@^3.5.0, bluebird@^3.5.3: version "3.5.4" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714" @@ -1263,7 +1295,7 @@ bn.js@4.11.6: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= -bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.3, bn.js@^4.11.6, bn.js@^4.4.0: +bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.3, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== @@ -1669,7 +1701,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.11.0, commander@~2.20.0: +commander@^2.11.0, commander@^2.8.1, commander@~2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -1854,6 +1886,11 @@ crypto-browserify@3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" +crypto-js@^3.1.9-1: + version "3.1.9-1" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8" + integrity sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg= + css.escape@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" @@ -2497,16 +2534,7 @@ eth-ens-namehash@2.0.8: idna-uts46-hx "^2.3.1" js-sha3 "^0.5.7" -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: +eth-lib@0.1.27, eth-lib@^0.1.26: version "0.1.27" resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.27.tgz#f0b0fd144f865d2d6bf8257a40004f2e75ca1dd6" integrity sha512-B8czsfkJYzn2UIEMwjc7Mbj+Cy72V+/OXH/tb44LV8jhrjizQJJ325xMOMyk3+ETa6r6oi0jsUY14+om8mQMWA== @@ -2519,6 +2547,24 @@ eth-lib@^0.1.26: ws "^3.0.0" xhr-request-promise "^0.1.2" +eth-lib@0.2.7: + version "0.2.7" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" + integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + ethereum-common@^0.0.18: version "0.0.18" resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" @@ -2545,7 +2591,23 @@ ethereumjs-util@^5.0.0: safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethers@^4.0.27: +ethers@4.0.0-beta.1: + version "4.0.0-beta.1" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.1.tgz#0648268b83e0e91a961b1af971c662cdf8cbab6d" + integrity sha512-SoYhktEbLxf+fiux5SfCEwdzWENMvgIbMZD90I62s4GZD9nEjgEWy8ZboI3hck193Vs0bDoTohDISx84f2H2tw== + dependencies: + "@types/node" "^10.3.2" + aes-js "3.0.0" + bn.js "^4.4.0" + elliptic "6.3.3" + hash.js "1.1.3" + js-sha3 "0.5.7" + scrypt-js "2.0.3" + setimmediate "1.0.4" + uuid "2.0.1" + xmlhttprequest "1.8.0" + +ethers@^4.0.0-beta.1, ethers@^4.0.27: version "4.0.27" resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.27.tgz#e570b0da9d805ad65c83d81919abe02b2264c6bf" integrity sha512-+DXZLP/tyFnXWxqr2fXLT67KlGUfLuvDkHSOtSC9TUVG9OIj6yrG5JPeXRMYo15xkOYwnjgdMKrXp5V94rtjJA== @@ -2561,7 +2623,7 @@ ethers@^4.0.27: uuid "2.0.1" xmlhttprequest "1.8.0" -ethjs-unit@^0.1.6: +ethjs-unit@0.1.6, ethjs-unit@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= @@ -2577,6 +2639,11 @@ ethjs-util@^0.1.3: is-hex-prefixed "1.0.0" strip-hex-prefix "1.0.0" +eventemitter3@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.1.1.tgz#47786bdaa087caf7b1b75e73abc5c7d540158cd0" + integrity sha1-R3hr2qCHyvext15zq8XH1UAVjNA= + eventemitter3@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" @@ -2768,6 +2835,11 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= +fast-deep-equal@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" + integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= + fast-deep-equal@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" @@ -2974,6 +3046,14 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^2.0.0, fs-extra@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" + integrity sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -2990,6 +3070,16 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" +fs-promise@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fs-promise/-/fs-promise-2.0.3.tgz#f64e4f854bcf689aa8bddcba268916db3db46854" + integrity sha1-9k5PhUvPaJqovdy6JokW2z20aFQ= + dependencies: + any-promise "^1.3.0" + fs-extra "^2.0.0" + mz "^2.6.0" + thenify-all "^1.6.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -3003,6 +3093,16 @@ fsevents@^1.2.3: nan "^2.12.1" node-pre-gyp "^0.12.0" +fstream@^1.0.2, fstream@^1.0.8: + version "1.0.11" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + integrity sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE= + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -3013,6 +3113,15 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +ganache-cli@^6.4.3: + version "6.4.3" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.4.3.tgz#2fb66c10f9df157b2cd9aeaf007a9fd47cd79cb1" + integrity sha512-3G+CK4ojipDvxQHlpX8PjqaOMRWVcaLZZSW97Bv7fdcPTXQwkji2yY5CY6J12Atiub4M4aJc0va+q3HXeerbIA== + dependencies: + bn.js "4.11.8" + source-map-support "0.5.9" + yargs "11.1.0" + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3057,6 +3166,11 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" +get-them-args@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/get-them-args/-/get-them-args-1.3.2.tgz#74a20ba8a4abece5ae199ad03f2bcc68fdfc9ba5" + integrity sha1-dKILqKSr7OWuGZrQPyvMaP38m6U= + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3114,7 +3228,7 @@ globals@^9.18.0: resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== -got@^7.1.0: +got@7.1.0, got@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== @@ -3324,6 +3438,11 @@ http-errors@1.7.2: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" @@ -3429,7 +3548,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= @@ -4301,6 +4420,11 @@ json-parse-better-errors@^1.0.1: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -4333,6 +4457,13 @@ json5@^2.1.0: dependencies: minimist "^1.2.0" +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -4375,6 +4506,14 @@ keccakjs@^0.2.1: browserify-sha3 "^0.0.4" sha3 "^1.2.2" +kill-port@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/kill-port/-/kill-port-1.4.0.tgz#9a4049ab2f8d8968d015a37d7d7202cdc6d53a73" + integrity sha512-VvLs/W4DA710DMMoN+tv4OLlnHuVs6n6T01vvHjLDXUsAWXCEZbi/EXnyAlYO4o0DHCG6W4HzSRi0tqjVivodw== + dependencies: + get-them-args "^1.3.1" + shell-exec "^1.0.2" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -4719,7 +4858,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@^0.5.0, mkdirp@^0.5.1: +mkdirp@*, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= @@ -4743,6 +4882,11 @@ mockdate@^2.0.2: resolved "https://registry.yarnpkg.com/mockdate/-/mockdate-2.0.2.tgz#5ae0c0eaf8fe23e009cd01f9889b42c4f634af12" integrity sha1-WuDA6vj+I+AJzQH5iJtCxPY0rxI= +mout@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/mout/-/mout-0.11.1.tgz#ba3611df5f0e5b1ffbfd01166b8f02d1f5fa2b99" + integrity sha1-ujYR318OWx/7/QEWa48C0fX6K5k= + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -4767,12 +4911,21 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mz@^2.6.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" + integrity sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q== + dependencies: + any-promise "^1.0.0" + object-assign "^4.0.1" + thenify-all "^1.0.0" + nan@2.10.0: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" integrity sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA== -nan@^2.0.8, nan@^2.11.0, nan@^2.12.1, nan@^2.2.1: +nan@^2.0.8, nan@^2.11.0, nan@^2.12.1, nan@^2.2.1, nan@^2.3.3: version "2.13.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== @@ -5014,6 +5167,13 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +oboe@2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.3.tgz#2b4865dbd46be81225713f4e9bfe4bcf4f680a4f" + integrity sha1-K0hl29Rr6BIlcT9Om/5Lz09oCk8= + dependencies: + http-https "^1.0.0" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -5837,7 +5997,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@2.6.3, rimraf@^2.4.3, rimraf@^2.5.4, rimraf@^2.6.1: +rimraf@2, rimraf@2.6.3, rimraf@^2.4.3, rimraf@^2.5.4, rimraf@^2.6.1: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -6005,6 +6165,11 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +scrypt-js@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" + integrity sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q= + scrypt-js@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" @@ -6185,6 +6350,11 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= +shell-exec@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/shell-exec/-/shell-exec-1.0.2.tgz#2e9361b0fde1d73f476c4b6671fa17785f696756" + integrity sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg== + shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -6274,6 +6444,14 @@ source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: source-map-url "^0.4.0" urix "^0.1.0" +source-map-support@0.5.9: + version "0.5.9" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" @@ -6538,6 +6716,25 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +swarm-js@0.1.37: + version "0.1.37" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.37.tgz#27d485317a340bbeec40292af783cc10acfa4663" + integrity sha512-G8gi5fcXP/2upwiuOShJ258sIufBVztekgobr3cVgYXObZwJ5AXLqZn52AI+/ffft29pJexF9WNdUxjlkVehoQ== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + decompress "^4.0.0" + eth-lib "^0.1.26" + fs-extra "^2.1.2" + fs-promise "^2.0.0" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar.gz "^1.0.5" + xhr-request-promise "^0.1.2" + swarm-js@^0.1.39: version "0.1.39" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.39.tgz#79becb07f291d4b2a178c50fee7aa6e10342c0e8" @@ -6584,6 +6781,26 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" +tar.gz@^1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/tar.gz/-/tar.gz-1.0.7.tgz#577ef2c595faaa73452ef0415fed41113212257b" + integrity sha512-uhGatJvds/3diZrETqMj4RxBR779LKlIE74SsMcn5JProZsfs9j0QBwWO1RW+IWNJxS2x8Zzra1+AW6OQHWphg== + dependencies: + bluebird "^2.9.34" + commander "^2.8.1" + fstream "^1.0.8" + mout "^0.11.0" + tar "^2.1.1" + +tar@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + integrity sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE= + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + tar@^4, tar@^4.0.2: version "4.4.8" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" @@ -6624,6 +6841,20 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= +thenify-all@^1.0.0, thenify-all@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" + integrity sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY= + dependencies: + thenify ">= 3.1.0 < 4" + +"thenify@>= 3.1.0 < 4": + version "3.3.0" + resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839" + integrity sha1-5p44obq+lpsBCCB5eLn2K4hgSDk= + dependencies: + any-promise "^1.0.0" + throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" @@ -6724,6 +6955,49 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= +truffle-blockchain-utils@^0.0.9: + version "0.0.9" + resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.9.tgz#ac61d703878c36eeabaa770c5bdf553e2260877e" + integrity sha512-UJlWLN53AYU108c2A7rY6ri2Ollj8ygRnpSyBD4MPq+MF15PFvqwNHa/4rnj6ajOo7JYV07nNQ4hmBwh0KSeoA== + +truffle-contract-schema@^3.0.9: + version "3.0.9" + resolved "https://registry.yarnpkg.com/truffle-contract-schema/-/truffle-contract-schema-3.0.9.tgz#8dff0b254561194f64452cf9c6c9fefdd7d46fe4" + integrity sha512-V1gwOeOPj7h0cM427KeMnTJZfotBqkISMLb9zq7bDj+iy/i05Ug7vyYaqCYnC5ignSnfNYgmJt8VsIt0UGI4lg== + dependencies: + ajv "^5.1.1" + crypto-js "^3.1.9-1" + debug "^4.1.0" + +truffle-contract@^4.0.15: + version "4.0.15" + resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-4.0.15.tgz#c8a7be3a9d4223c6bf3477974cb69cbdf3bcd429" + integrity sha512-TEye3lotuPZqoXni/t1HomU5w760Kf0x63cZa7q2WXzqtQCnNqdG/FMRlyMim/MRK4geGdo2H+Sg1k4D1VqJDw== + dependencies: + bignumber.js "^7.2.1" + ethers "^4.0.0-beta.1" + truffle-blockchain-utils "^0.0.9" + truffle-contract-schema "^3.0.9" + truffle-error "^0.0.4" + truffle-interface-adapter "^0.1.5" + web3 "1.0.0-beta.37" + web3-core-promievent "1.0.0-beta.37" + web3-eth-abi "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + +truffle-error@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/truffle-error/-/truffle-error-0.0.4.tgz#c3ff027570c26ae1f20db78637902497857f898f" + integrity sha512-hER0TNR4alBIhUp7SNrZRRiZtM/MBx+xBdM9qXP0tC3YASFmhNAxPuOyB8JDHFRNbDx12K7nvaqmyYGsI5c8BQ== + +truffle-interface-adapter@^0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/truffle-interface-adapter/-/truffle-interface-adapter-0.1.5.tgz#406b00f8f751335d9c4a66b24b460f2bce9c37e6" + integrity sha512-TbKD7oUdz/0GqeR4PStNoad4uwKkHtZMUQQH+Xyy5acVZxBCJ7uTGwYVaOvtxeAITaX5zxeyhjlU8IKyrnd4QA== + dependencies: + bn.js "^4.11.8" + web3 "1.0.0-beta.37" + tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" @@ -6756,7 +7030,7 @@ type-is@~1.6.16, type-is@~1.6.17: media-typer "0.3.0" mime-types "~2.1.24" -typedarray-to-buffer@^3.1.5: +typedarray-to-buffer@^3.1.2, typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== @@ -6784,6 +7058,11 @@ unbzip2-stream@^1.0.9: buffer "^5.2.1" through "^2.3.8" +underscore@1.8.3: + version "1.8.3" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022" + integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI= + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" @@ -6967,6 +7246,15 @@ watch@~0.18.0: exec-sh "^0.2.0" minimist "^1.2.0" +web3-bzz@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.0.0-beta.37.tgz#59e3e4f5a9d732731008fe9165c3ec8bf85d502f" + integrity sha512-E+dho49Nsm/QpQvYWOF35YDsQrMvLB19AApENxhlQsu6HpWQt534DQul0t3Y/aAh8rlKD6Kanxt8LhHDG3vejQ== + dependencies: + got "7.1.0" + swarm-js "0.1.37" + underscore "1.8.3" + web3-bzz@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.0.0-beta.54.tgz#6c467551a5bde937187bde51979eef71f32b1834" @@ -6977,6 +7265,15 @@ web3-bzz@1.0.0-beta.54: lodash "^4.17.11" swarm-js "^0.1.39" +web3-core-helpers@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.37.tgz#04ec354b7f5c57234c309eea2bda9bf1f2fe68ba" + integrity sha512-efaLOzN28RMnbugnyelgLwPWWaSwElQzcAJ/x3PZu+uPloM/lE5x0YuBKvIh7/PoSMlHqtRWj1B8CpuQOUQ5Ew== + dependencies: + underscore "1.8.3" + web3-eth-iban "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-core-helpers@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.54.tgz#6b3fc3c2efc45ae8f23a78be5b1b5db687819d99" @@ -6987,6 +7284,17 @@ web3-core-helpers@1.0.0-beta.54: web3-eth-iban "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-core-method@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.0.0-beta.37.tgz#53d148e63f818b23461b26307afdfbdaa9457744" + integrity sha512-pKWFUeqnVmzx3VrZg+CseSdrl/Yrk2ioid/HzolNXZE6zdoITZL0uRjnsbqXGEzgRRd1Oe/pFndpTlRsnxXloA== + dependencies: + underscore "1.8.3" + web3-core-helpers "1.0.0-beta.37" + web3-core-promievent "1.0.0-beta.37" + web3-core-subscriptions "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-core-method@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.0.0-beta.54.tgz#e534ef831287e9e32ae9104f60bae78cf02df24d" @@ -6996,6 +7304,34 @@ web3-core-method@1.0.0-beta.54: eventemitter3 "3.1.0" lodash "^4.17.11" +web3-core-promievent@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.37.tgz#4e51c469d0a7ac0a969885a4dbcde8504abe5b02" + integrity sha512-GTF2r1lP8nJBeA5Gxq5yZpJy9l8Fb9CXGZPfF8jHvaRdQHtm2Z+NDhqYmF833lcdkokRSyfPcXlz1mlWeClFpg== + dependencies: + any-promise "1.3.0" + eventemitter3 "1.1.1" + +web3-core-requestmanager@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.37.tgz#721a75df5920621bff42d9d74f7a64413675d56b" + integrity sha512-66VUqye5BGp1Zz1r8psCxdNH+GtTjaFwroum2Osx+wbC5oRjAiXkkadiitf6wRb+edodjEMPn49u7B6WGNuewQ== + dependencies: + underscore "1.8.3" + web3-core-helpers "1.0.0-beta.37" + web3-providers-http "1.0.0-beta.37" + web3-providers-ipc "1.0.0-beta.37" + web3-providers-ws "1.0.0-beta.37" + +web3-core-subscriptions@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.37.tgz#40de5e2490cc05b15faa8f935c97fd48d670cd9a" + integrity sha512-FdXl8so9kwkRRWziuCSpFsAuAdg9KvpXa1fQlT16uoGcYYfxwFO/nkwyBGQzkZt7emShI2IRugcazyPCZDwkOA== + dependencies: + eventemitter3 "1.1.1" + underscore "1.8.3" + web3-core-helpers "1.0.0-beta.37" + web3-core-subscriptions@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.54.tgz#2a1c75682dd642344894eba454ed3b39483cdb8c" @@ -7005,6 +7341,16 @@ web3-core-subscriptions@1.0.0-beta.54: eventemitter3 "^3.1.0" lodash "^4.17.11" +web3-core@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.0.0-beta.37.tgz#66c2c7000772c9db36d737ada31607ace09b7e90" + integrity sha512-cIwEqCj7OJyefQNauI0HOgW4sSaOQ98V99H2/HEIlnCZylsDzfw7gtQUdwnRFiIyIxjbWy3iWsjwDPoXNPZBYg== + dependencies: + web3-core-helpers "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-core-requestmanager "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-core@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.0.0-beta.54.tgz#1141dd92dcc3f5ed289db9c54acaa732d65926e8" @@ -7016,6 +7362,15 @@ web3-core@1.0.0-beta.54: lodash "^4.17.11" web3-utils "1.0.0-beta.54" +web3-eth-abi@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.37.tgz#55592fa9cd2427d9f0441d78f3b8d0c1359a2a24" + integrity sha512-g9DKZGM2OqwKp/tX3W/yihcj7mQCtJ6CXyZXEIZfuDyRBED/iSEIFfieDOd+yo16sokLMig6FG7ADhhu+19hdA== + dependencies: + ethers "4.0.0-beta.1" + underscore "1.8.3" + web3-utils "1.0.0-beta.37" + web3-eth-abi@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.54.tgz#4d863e6d4675fa3502e3eba7093d8c2998a66566" @@ -7026,6 +7381,22 @@ web3-eth-abi@1.0.0-beta.54: lodash "^4.17.11" web3-utils "1.0.0-beta.54" +web3-eth-accounts@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.37.tgz#0a5a9f14a6c3bd285e001c15eb3bb38ffa4b5204" + integrity sha512-uvbHL62/zwo4GDmwKdqH9c/EgYd8QVnAfpVw8D3epSISpgbONNY7Hr4MRMSd/CqAP12l2Ls9JVQGLhhC83bW6g== + dependencies: + any-promise "1.3.0" + crypto-browserify "3.12.0" + eth-lib "0.2.7" + scrypt.js "0.2.0" + underscore "1.8.3" + uuid "2.0.1" + web3-core "1.0.0-beta.37" + web3-core-helpers "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-eth-accounts@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.54.tgz#701b8e9a735f6d4e692a2076b469be960e91d71f" @@ -7043,6 +7414,20 @@ web3-eth-accounts@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-eth-contract@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.37.tgz#87f93c95ed16f320ba54943b7886890de6766013" + integrity sha512-h1B3A8Z/C7BlnTCHkrWbXZQTViDxfR12lKMeTkT8Sqj5phFmxrBlPE4ORy4lf1Dk5b23mZYE0r/IRACx4ThCrQ== + dependencies: + underscore "1.8.3" + web3-core "1.0.0-beta.37" + web3-core-helpers "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-core-promievent "1.0.0-beta.37" + web3-core-subscriptions "1.0.0-beta.37" + web3-eth-abi "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-eth-contract@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.54.tgz#f4e828b7979153fe88dbba98ffc37beb1950dcfe" @@ -7060,6 +7445,20 @@ web3-eth-contract@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-eth-ens@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.37.tgz#714ecb01eb447ee3eb39b2b20a10ae96edb1f01f" + integrity sha512-dR3UkrVzdRrJhfP57xBPx0CMiVnCcYFvh+u2XMkGydrhHgupSUkjqGr89xry/j1T0BkuN9mikpbyhdCVMXqMbg== + dependencies: + eth-ens-namehash "2.0.8" + underscore "1.8.3" + web3-core "1.0.0-beta.37" + web3-core-helpers "1.0.0-beta.37" + web3-core-promievent "1.0.0-beta.37" + web3-eth-abi "1.0.0-beta.37" + web3-eth-contract "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-eth-ens@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.0.0-beta.54.tgz#732770b8efd4b4eca5e93ebcb67706f384ac17f1" @@ -7077,6 +7476,14 @@ web3-eth-ens@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-eth-iban@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.37.tgz#313a3f18ae2ab00ba98678ea1156b09ef32a3655" + integrity sha512-WQRniGJFxH/XCbd7miO6+jnUG+6bvuzfeufPIiOtCbeIC1ypp1kSqER8YVBDrTyinU1xnf1U5v0KBZ2yiWBJxQ== + dependencies: + bn.js "4.11.6" + web3-utils "1.0.0-beta.37" + web3-eth-iban@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.54.tgz#d09ee445fae7bb8cc5fb81eaa6ee5ab5596e0538" @@ -7086,6 +7493,17 @@ web3-eth-iban@1.0.0-beta.54: bn.js "4.11.8" web3-utils "1.0.0-beta.54" +web3-eth-personal@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.37.tgz#187472f51861e2b6d45da43411801bc91a859f9a" + integrity sha512-B4dZpGbD+nGnn48i6nJBqrQ+HB7oDmd+Q3wGRKOsHSK5HRWO/KwYeA7wgwamMAElkut50lIsT9EJl4Apfk3G5Q== + dependencies: + web3-core "1.0.0-beta.37" + web3-core-helpers "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-net "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-eth-personal@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.54.tgz#78ce9d3d214174eda3cc5ee482b5a73c77b26da2" @@ -7100,6 +7518,25 @@ web3-eth-personal@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-eth@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.0.0-beta.37.tgz#0e8ffcd857a5f85ae4b5f052ad831ca5c56f4f74" + integrity sha512-Eb3aGtkz3G9q+Z9DKgSQNbn/u8RtcZQQ0R4sW9hy5KK47GoT6vab5c6DiD3QWzI0BzitHzR5Ji+3VHf/hPUGgw== + dependencies: + underscore "1.8.3" + web3-core "1.0.0-beta.37" + web3-core-helpers "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-core-subscriptions "1.0.0-beta.37" + web3-eth-abi "1.0.0-beta.37" + web3-eth-accounts "1.0.0-beta.37" + web3-eth-contract "1.0.0-beta.37" + web3-eth-ens "1.0.0-beta.37" + web3-eth-iban "1.0.0-beta.37" + web3-eth-personal "1.0.0-beta.37" + web3-net "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-eth@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.0.0-beta.54.tgz#469ca08f0919f5afe383f5df6069678973dbe146" @@ -7122,6 +7559,15 @@ web3-eth@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-net@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.0.0-beta.37.tgz#b494136043f3c6ba84fe4a47d4c028c2a63c9a8e" + integrity sha512-xG/uBtMdDa1UMXw9KjDUgf3fXA/fDEJUYUS0TDn+U9PMgngA+UVECHNNvQTrVVDxEky38V3sahwIDiopNsQdsw== + dependencies: + web3-core "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3-net@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.0.0-beta.54.tgz#be64a6efd53e7a70d56bfb640b11ea8dd8a5ba75" @@ -7135,6 +7581,32 @@ web3-net@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-providers-http@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.0.0-beta.37.tgz#c06efd60e16e329e25bd268d2eefc68d82d13651" + integrity sha512-FM/1YDB1jtZuTo78habFj7S9tNHoqt0UipdyoQV29b8LkGKZV9Vs3is8L24hzuj1j/tbwkcAH+ewIseHwu0DTg== + dependencies: + web3-core-helpers "1.0.0-beta.37" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.37.tgz#55d247e7197257ca0c3e4f4b0fe1561311b9d5b9" + integrity sha512-NdRPRxYMIU0C3u18NI8u4bwbhI9pCg5nRgDGYcmSAx5uOBxiYcQy+hb0WkJRRhBoyIXJmy+s26FoH8904+UnPg== + dependencies: + oboe "2.1.3" + underscore "1.8.3" + web3-core-helpers "1.0.0-beta.37" + +web3-providers-ws@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.37.tgz#77c15aebc00b75d760d22d063ac2e415bdbef72f" + integrity sha512-8p6ZLv+1JYa5Vs8oBn33Nn3VGFBbF+wVfO+b78RJS1Qf1uIOzjFVDk3XwYDD7rlz9G5BKpxhaQw+6EGQ7L02aw== + dependencies: + underscore "1.8.3" + web3-core-helpers "1.0.0-beta.37" + websocket "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible" + web3-providers@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-providers/-/web3-providers-1.0.0-beta.54.tgz#b2401eb72ded5996379e03c2e166113daa50a19a" @@ -7148,6 +7620,16 @@ web3-providers@1.0.0-beta.54: websocket "^1.0.28" xhr2-cookies "1.1.0" +web3-shh@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.0.0-beta.37.tgz#3246ce5229601b525020828a56ee283307057105" + integrity sha512-h5STG/xqZNQWtCLYOu7NiMqwqPea8SfkKQUPUFxXKIPVCFVKpHuQEwW1qcPQRJMLhlQIv17xuoUe1A+RzDNbrw== + dependencies: + web3-core "1.0.0-beta.37" + web3-core-method "1.0.0-beta.37" + web3-core-subscriptions "1.0.0-beta.37" + web3-net "1.0.0-beta.37" + web3-shh@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.0.0-beta.54.tgz#1f0b5d42f9e7a542547d0638aea6911fbb771cec" @@ -7162,6 +7644,19 @@ web3-shh@1.0.0-beta.54: web3-providers "1.0.0-beta.54" web3-utils "1.0.0-beta.54" +web3-utils@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.37.tgz#ab868a90fe5e649337e38bdaf72133fcbf4d414d" + integrity sha512-kA1fyhO8nKgU21wi30oJQ/ssvu+9srMdjOTKbHYbQe4ATPcr5YNwwrxG3Bcpbu1bEwRUVKHCkqi+wTvcAWBdlQ== + dependencies: + bn.js "4.11.6" + eth-lib "0.1.27" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randomhex "0.1.5" + underscore "1.8.3" + utf8 "2.1.1" + web3-utils@1.0.0-beta.54: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.54.tgz#90588e45eae7c56b61138b5a4c4034377fca33fd" @@ -7178,6 +7673,19 @@ web3-utils@1.0.0-beta.54: randomhex "0.1.5" utf8 "2.1.1" +web3@1.0.0-beta.37: + version "1.0.0-beta.37" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.0.0-beta.37.tgz#b42c30e67195f816cd19d048fda872f70eca7083" + integrity sha512-8XLgUspdzicC/xHG82TLrcF/Fxzj2XYNJ1KTYnepOI77bj5rvpsxxwHYBWQ6/JOjk0HkZqoBfnXWgcIHCDhZhQ== + dependencies: + web3-bzz "1.0.0-beta.37" + web3-core "1.0.0-beta.37" + web3-eth "1.0.0-beta.37" + web3-eth-personal "1.0.0-beta.37" + web3-net "1.0.0-beta.37" + web3-shh "1.0.0-beta.37" + web3-utils "1.0.0-beta.37" + web3@^1.0.0-beta.37: version "1.0.0-beta.54" resolved "https://registry.yarnpkg.com/web3/-/web3-1.0.0-beta.54.tgz#d3545ad863be6558ca08b3e41b9491cf16d1eb8b" @@ -7211,6 +7719,15 @@ websocket@^1.0.28: typedarray-to-buffer "^3.1.5" yaeti "^0.0.6" +"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible": + version "1.0.26" + resolved "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + dependencies: + debug "^2.2.0" + nan "^2.3.3" + typedarray-to-buffer "^3.1.2" + yaeti "^0.0.6" + whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: version "1.0.5" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" @@ -7401,7 +7918,7 @@ yargs-parser@^9.0.2: dependencies: camelcase "^4.1.0" -yargs@^11.0.0: +yargs@11.1.0, yargs@^11.0.0: version "11.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==