diff --git a/.gitignore b/.gitignore index 478c3cc..a28f1ed 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,7 @@ installed_contracts/* coverage\.json build/merged/ + +scTopics + +allFiredEvents diff --git a/build/contracts/ERC20.json b/build/contracts/ERC20.json deleted file mode 100644 index de8a683..0000000 --- a/build/contracts/ERC20.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "contractName": "ERC20", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "who", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [ - { - "name": "owner", - "type": "address" - }, - { - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "from", - "type": "address" - }, - { - "name": "to", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "spender", - "type": "address" - }, - { - "name": "value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x", - "deployedBytecode": "0x", - "compiler": { - "name": "solc", - "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0" -} diff --git a/build/contracts/StandardToken.json b/build/contracts/StandardToken.json deleted file mode 100644 index 7af80cc..0000000 --- a/build/contracts/StandardToken.json +++ /dev/null @@ -1,232 +0,0 @@ -{ - "contractName": "StandardToken", - "abi": [ - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "balance", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "from", - "type": "address" - }, - { - "indexed": true, - "name": "to", - "type": "address" - }, - { - "indexed": false, - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "remaining", - "type": "uint256" - } - ], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_addedValue", - "type": "uint256" - } - ], - "name": "increaseApproval", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseApproval", - "outputs": [ - { - "name": "success", - "type": "bool" - } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } - ], - "bytecode": "0x6060604052341561000f57600080fd5b6106698061001e6000396000f30060606040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100c857806323b872dd146100ed578063661884631461011557806370a0823114610137578063a9059cbb14610156578063d73dd62314610178578063dd62ed3e1461019a575b600080fd5b341561009d57600080fd5b6100b4600160a060020a03600435166024356101bf565b604051901515815260200160405180910390f35b34156100d357600080fd5b6100db61022b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b4600160a060020a0360043581169060243516604435610231565b341561012057600080fd5b6100b4600160a060020a036004351660243561035b565b341561014257600080fd5b6100db600160a060020a0360043516610455565b341561016157600080fd5b6100b4600160a060020a0360043516602435610470565b341561018357600080fd5b6100b4600160a060020a0360043516602435610546565b34156101a557600080fd5b6100db600160a060020a03600435811690602435166105ea565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600080600160a060020a038416151561024957600080fd5b50600160a060020a0380851660008181526002602090815260408083203390951683529381528382205492825260019052919091205461028f908463ffffffff61061516565b600160a060020a0380871660009081526001602052604080822093909355908616815220546102c4908463ffffffff61062716565b600160a060020a0385166000908152600160205260409020556102ed818463ffffffff61061516565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156103b857600160a060020a0333811660009081526002602090815260408083209388168352929052908120556103ef565b6103c8818463ffffffff61061516565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b6000600160a060020a038316151561048757600080fd5b600160a060020a0333166000908152600160205260409020546104b0908363ffffffff61061516565b600160a060020a0333811660009081526001602052604080822093909355908516815220546104e5908363ffffffff61062716565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461057e908363ffffffff61062716565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561062157fe5b50900390565b60008282018381101561063657fe5b93925050505600a165627a7a72305820d496f10ceb27c0ef3f427bd2220a816682cbe2cac8aaee830d873f8d657c53cf0029", - "deployedBytecode": "0x60606040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100c857806323b872dd146100ed578063661884631461011557806370a0823114610137578063a9059cbb14610156578063d73dd62314610178578063dd62ed3e1461019a575b600080fd5b341561009d57600080fd5b6100b4600160a060020a03600435166024356101bf565b604051901515815260200160405180910390f35b34156100d357600080fd5b6100db61022b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b4600160a060020a0360043581169060243516604435610231565b341561012057600080fd5b6100b4600160a060020a036004351660243561035b565b341561014257600080fd5b6100db600160a060020a0360043516610455565b341561016157600080fd5b6100b4600160a060020a0360043516602435610470565b341561018357600080fd5b6100b4600160a060020a0360043516602435610546565b34156101a557600080fd5b6100db600160a060020a03600435811690602435166105ea565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600080600160a060020a038416151561024957600080fd5b50600160a060020a0380851660008181526002602090815260408083203390951683529381528382205492825260019052919091205461028f908463ffffffff61061516565b600160a060020a0380871660009081526001602052604080822093909355908616815220546102c4908463ffffffff61062716565b600160a060020a0385166000908152600160205260409020556102ed818463ffffffff61061516565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156103b857600160a060020a0333811660009081526002602090815260408083209388168352929052908120556103ef565b6103c8818463ffffffff61061516565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526001602052604090205490565b6000600160a060020a038316151561048757600080fd5b600160a060020a0333166000908152600160205260409020546104b0908363ffffffff61061516565b600160a060020a0333811660009081526001602052604080822093909355908516815220546104e5908363ffffffff61062716565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461057e908363ffffffff61062716565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60008282111561062157fe5b50900390565b60008282018381101561063657fe5b93925050505600a165627a7a72305820d496f10ceb27c0ef3f427bd2220a816682cbe2cac8aaee830d873f8d657c53cf0029", - "compiler": { - "name": "solc", - "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" - }, - "networks": {}, - "schemaVersion": "2.0.0" -} diff --git a/e2e/src/pages/home.po.ts b/e2e/src/pages/home.po.ts index 8b34c2b..70a7bed 100644 --- a/e2e/src/pages/home.po.ts +++ b/e2e/src/pages/home.po.ts @@ -42,6 +42,7 @@ export class LandingHomePage extends Page { } async getSectionContent(sectionNumber: number): Promise<{h2?: string, h3?: string, p?: string[]}> { + await browser.sleep(200); const section: ElementFinder = await this.getSection(sectionNumber); const getTextOf = async (selector: string) => { const contentElem = section.element(by.css(selector)); diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 7b8d315..9f00825 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -5,39 +5,28 @@ const KudosPollFactory = artifacts.require("KudosPollFactory"); const KudosStruct = artifacts.require("KudosStructs"); const StringUtils = artifacts.require("StringUtils"); -module.exports = function(deployer) { - deployer.deploy(KudosStruct) - .then(() => { - deployer.link(KudosStruct, [KudosTokenFactory, KudosPollFactory]); - return deployer.deploy(StringUtils); - }) - .then(() => { - deployer.link(StringUtils, KudosTokenFactory); - return deployer.deploy(KudosPollFactory); - }) - .then(() => { - deployer.link(KudosPollFactory, KudosTokenFactory); - return deployer.deploy(KudosTokenFactory); - }) - .then(() => { - deployer.link(KudosTokenFactory, KudosOrganisations); - return deployer.deploy(KudosRouter); - }) - .then(() => { - deployer.link(KudosRouter, [KudosTokenFactory, KudosOrganisations]); - - return KudosPollFactory.deployed().then(kudosPollFactory => { - return KudosTokenFactory.deployed().then(kudosTokenFactory => { - return KudosRouter.deployed().then(kudosRouter => { - return kudosRouter.setResource('KudosPollFactory', '0.1', KudosPollFactory.address) - .then(() => { - return kudosRouter.setResource('KudosTokenFactory', '0.1', KudosTokenFactory.address); - }) - .then(() => { - return deployer.deploy(KudosOrganisations, KudosRouter.address); - }); - }); - }); - }); - }); +module.exports = async function(deployer) { + await deployer.deploy(KudosStruct); + deployer.link(KudosStruct, [KudosTokenFactory, KudosPollFactory]); + + await deployer.deploy(StringUtils); + deployer.link(StringUtils, KudosTokenFactory); + + await deployer.deploy(KudosPollFactory); + deployer.link(KudosPollFactory, KudosTokenFactory); + + await deployer.deploy(KudosTokenFactory); + deployer.link(KudosTokenFactory, KudosOrganisations); + + await deployer.deploy(KudosRouter); + deployer.link(KudosRouter, [KudosTokenFactory, KudosOrganisations]); + + const kudosPollFactory = await KudosPollFactory.deployed(); + const kudosTokenFactory = await KudosTokenFactory.deployed(); + const kudosRouter = await KudosRouter.deployed(); + + await kudosRouter.setResource('KudosPollFactory', await kudosPollFactory.version(), KudosPollFactory.address); + await kudosRouter.setResource('KudosTokenFactory', await kudosTokenFactory.version(), KudosTokenFactory.address); + + await deployer.deploy(KudosOrganisations, KudosRouter.address); }; diff --git a/package-lock.json b/package-lock.json index 85c23a1..07e69dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5569,7 +5569,7 @@ "ethereumjs-tx": "1.3.7", "ethereumjs-util": "5.2.0", "ethjs-util": "0.1.6", - "json-rpc-engine": "3.7.3", + "json-rpc-engine": "3.8.0", "pify": "2.3.0", "tape": "4.9.1" }, @@ -5599,7 +5599,7 @@ "requires": { "cross-fetch": "2.2.2", "eth-json-rpc-middleware": "1.6.0", - "json-rpc-engine": "3.7.3", + "json-rpc-engine": "3.8.0", "json-rpc-error": "2.0.0", "tape": "4.9.1" } @@ -5618,7 +5618,7 @@ "ethereumjs-util": "5.2.0", "ethereumjs-vm": "2.4.0", "fetch-ponyfill": "4.1.0", - "json-rpc-engine": "3.7.3", + "json-rpc-engine": "3.8.0", "json-rpc-error": "2.0.0", "json-stable-stringify": "1.0.1", "promise-to-callback": "1.0.0", @@ -5691,6 +5691,14 @@ "ethereumjs-util": "5.2.0" }, "dependencies": { + "ethereumjs-abi": { + "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", + "dev": true, + "requires": { + "bn.js": "4.11.8", + "ethereumjs-util": "5.2.0" + } + }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -5755,7 +5763,7 @@ "ethereumjs-tx": "1.3.7", "ethereumjs-util": "5.2.0", "ethjs-util": "0.1.6", - "json-rpc-engine": "3.7.3", + "json-rpc-engine": "3.8.0", "pify": "2.3.0", "tape": "4.9.1" }, @@ -5804,7 +5812,7 @@ "ethereumjs-util": "5.2.0", "fake-merkle-patricia-tree": "1.0.1", "functional-red-black-tree": "1.0.1", - "merkle-patricia-tree": "2.3.1", + "merkle-patricia-tree": "2.3.2", "rustbn.js": "0.1.2", "safe-buffer": "5.1.1" } @@ -5850,31 +5858,6 @@ "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", "dev": true }, - "ethereumjs-abi": { - "version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#00ba8463a7f7a67fcad737ff9c2ebd95643427f7", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "ethereumjs-util": "5.2.0" - }, - "dependencies": { - "ethereumjs-util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", - "integrity": "sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA==", - "dev": true, - "requires": { - "bn.js": "4.11.8", - "create-hash": "1.2.0", - "ethjs-util": "0.1.6", - "keccak": "1.4.0", - "rlp": "2.1.0", - "safe-buffer": "5.1.1", - "secp256k1": "3.5.2" - } - } - } - }, "ethereumjs-account": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", @@ -5913,7 +5896,7 @@ "ethereum-common": "0.2.0", "ethereumjs-tx": "1.3.7", "ethereumjs-util": "5.2.0", - "merkle-patricia-tree": "2.3.1" + "merkle-patricia-tree": "2.3.2" }, "dependencies": { "async": { @@ -6023,7 +6006,7 @@ "ethereumjs-util": "5.2.0", "fake-merkle-patricia-tree": "1.0.1", "functional-red-black-tree": "1.0.1", - "merkle-patricia-tree": "2.3.1", + "merkle-patricia-tree": "2.3.2", "rustbn.js": "0.2.0", "safe-buffer": "5.1.1" }, @@ -8138,6 +8121,28 @@ "sparkles": "1.0.1" } }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true, + "requires": { + "decompress-response": "3.3.0", + "duplexer3": "0.1.4", + "get-stream": "3.0.0", + "is-plain-obj": "1.1.0", + "is-retry-allowed": "1.1.0", + "is-stream": "1.1.0", + "isurl": "1.0.0", + "lowercase-keys": "1.0.1", + "p-cancelable": "0.3.0", + "p-timeout": "1.2.1", + "safe-buffer": "5.1.1", + "timed-out": "4.0.1", + "url-parse-lax": "1.0.0", + "url-to-options": "1.0.1" + } + }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", @@ -10281,17 +10286,17 @@ "dev": true }, "json-rpc-engine": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.7.3.tgz", - "integrity": "sha512-+FO3UWu/wafh/+MZ6BXy0HZU+f5plwUn82FgxpC0scJkEh5snOjFrAAtqCITPDfvfLHRUFOG5pQDUx2pspfERQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz", + "integrity": "sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA==", "dev": true, "requires": { "async": "2.6.1", "babel-preset-env": "1.7.0", "babelify": "7.3.0", - "clone": "2.1.2", "json-rpc-error": "2.0.0", - "promise-to-callback": "1.0.0" + "promise-to-callback": "1.0.0", + "safe-event-emitter": "1.0.1" }, "dependencies": { "async": { @@ -10303,12 +10308,6 @@ "lodash": "4.17.11" } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -12458,9 +12457,9 @@ } }, "merkle-patricia-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz", - "integrity": "sha512-Qp9Mpb3xazznXzzGQBqHbqCpT2AR9joUOHYYPiQjYCarrdCPCnLWXo4BFv77y4xN26KR224xoU1n/qYY7RYYgw==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", "dev": true, "requires": { "async": "1.5.2", @@ -13668,6 +13667,12 @@ "os-tmpdir": "1.0.2" } }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -13697,6 +13702,15 @@ "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", "dev": true }, + "p-timeout": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.1.tgz", + "integrity": "sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y=", + "dev": true, + "requires": { + "p-finally": "1.0.0" + } + }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", @@ -14045,6 +14059,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, "preserve": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", @@ -15157,6 +15177,23 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, + "safe-event-emitter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", + "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "dev": true, + "requires": { + "events": "3.0.0" + }, + "dependencies": { + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true + } + } + }, "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", @@ -17481,140 +17518,14 @@ } }, "truffle": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/truffle/-/truffle-4.1.11.tgz", - "integrity": "sha512-VNhc6jexZeM92sNJJr4U8ln3uJ/mJEQO/0y9ZLYc4pccyIskPtl+3r4mzymgGM/Mq5v6MpoQVD6NZgHUVKX+Dw==", + "version": "5.0.0-beta.1", + "resolved": "https://registry.npmjs.org/truffle/-/truffle-5.0.0-beta.1.tgz", + "integrity": "sha512-U9vNwUAX0kb+pgpUWsWDFQeU2XeCHYm4swVxQdRi37mDQCOedEVgiE+Lr87LNQMAIuAY+8sG/9KF7HwVks0ncQ==", "dev": true, "requires": { "mocha": "4.1.0", "original-require": "1.0.1", - "solc": "0.4.24" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "1.0.2", - "strip-ansi": "3.0.1", - "wrap-ansi": "2.1.0" - } - }, - "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, - "requires": { - "number-is-nan": "1.0.1" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "1.0.0" - } - }, - "require-from-string": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", - "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=", - "dev": true - }, - "solc": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", - "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", - "dev": true, - "requires": { - "fs-extra": "0.30.0", - "memorystream": "0.3.1", - "require-from-string": "1.2.1", - "semver": "5.5.0", - "yargs": "4.8.1" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "1.1.0", - "is-fullwidth-code-point": "1.0.0", - "strip-ansi": "3.0.1" - } - }, - "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, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "window-size": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", - "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=", - "dev": true - }, - "yargs": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", - "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", - "dev": true, - "requires": { - "cliui": "3.2.0", - "decamelize": "1.2.0", - "get-caller-file": "1.0.2", - "lodash.assign": "4.2.0", - "os-locale": "1.4.0", - "read-pkg-up": "1.0.1", - "require-directory": "2.1.1", - "require-main-filename": "1.0.1", - "set-blocking": "2.0.0", - "string-width": "1.0.2", - "which-module": "1.0.0", - "window-size": "0.2.0", - "y18n": "3.2.1", - "yargs-parser": "2.4.1" - } - }, - "yargs-parser": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", - "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", - "dev": true, - "requires": { - "camelcase": "3.0.0", - "lodash.assign": "4.2.0" - } - } + "solc": "0.4.25" } }, "truffle-blockchain-utils": { @@ -17682,32 +17593,328 @@ "integrity": "sha1-S/VSQuFN7uHHGUkycJGC3v8sl8o=" }, "truffle-hdwallet-provider": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.6.tgz", - "integrity": "sha512-vh1nCk9+COz9Z1BnDYjrZEc8Z4KCWeoThAX6U13SpHMuSL7gX40ZDWszlVmovPLEwHSJBh/OaFmaduKfeXT9rA==", + "version": "1.0.0-web3one.0", + "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-1.0.0-web3one.0.tgz", + "integrity": "sha512-rd/3KsE/wWy9YB10cKy4RbUgXjftVLPQ03LiCdr+bqHQDHfNHaNZdZq/zrWueufTfXaKwvTzJPMFxBnDuc6amw==", "dev": true, "requires": { "bip39": "2.5.0", "ethereumjs-wallet": "0.6.0", - "web3": "0.18.4", - "web3-provider-engine": "14.0.6" + "web3": "1.0.0-beta.33", + "web3-provider-engine": "git+https://github.com/cgewecke/provider-engine.git#be7d1e895918eb05c7893fc00a7053fe4abb4233" }, "dependencies": { + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", + "dev": true + }, + "eventemitter3": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.1.1.tgz", + "integrity": "sha1-R3hr2qCHyvext15zq8XH1UAVjNA=", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "utf8": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.1.tgz", + "integrity": "sha1-LgHbAvfY0JRPdxBPFgnrDDBM92g=", + "dev": true + }, + "uuid": { + "version": "2.0.1", + "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz", + "integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=", + "dev": true + }, "web3": { - "version": "0.18.4", - "resolved": "https://registry.npmjs.org/web3/-/web3-0.18.4.tgz", - "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", + "version": "1.0.0-beta.33", + "resolved": "http://registry.npmjs.org/web3/-/web3-1.0.0-beta.33.tgz", + "integrity": "sha1-xgIbV2mSdyY3HBhLhoRFMRsTkpU=", "dev": true, "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "crypto-js": "3.1.8", - "utf8": "2.1.2", - "xhr2": "0.1.4", - "xmlhttprequest": "1.8.0" + "web3-bzz": "1.0.0-beta.33", + "web3-core": "1.0.0-beta.33", + "web3-eth": "1.0.0-beta.33", + "web3-eth-personal": "1.0.0-beta.33", + "web3-net": "1.0.0-beta.33", + "web3-shh": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-bzz": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.0.0-beta.33.tgz", + "integrity": "sha1-MVAPaZt+cO31FJDFXv+0J7+7OwE=", + "dev": true, + "requires": { + "got": "7.1.0", + "swarm-js": "0.1.37", + "underscore": "1.8.3" + } + }, + "web3-core": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.0.0-beta.33.tgz", + "integrity": "sha1-+C7VJfW2auzale7O08rSvWlfeDk=", + "dev": true, + "requires": { + "web3-core-helpers": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-core-requestmanager": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-core-helpers": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.33.tgz", + "integrity": "sha1-Kvcz5QTbBefDZIwdrPV3sOwV3EM=", + "dev": true, + "requires": { + "underscore": "1.8.3", + "web3-eth-iban": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-core-method": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.0.0-beta.33.tgz", + "integrity": "sha1-7Y7ExK+rIdwJid41g2hEZlIrboY=", + "dev": true, + "requires": { + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.33", + "web3-core-promievent": "1.0.0-beta.33", + "web3-core-subscriptions": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-core-promievent": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.0.0-beta.33.tgz", + "integrity": "sha1-0fXrtgFSfdSWViw2IXblWNly01g=", + "dev": true, + "requires": { + "any-promise": "1.3.0", + "eventemitter3": "1.1.1" + } + }, + "web3-core-requestmanager": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.0.0-beta.33.tgz", + "integrity": "sha1-ejbEA1QALfsXnKLb22pgEsn3Ges=", + "dev": true, + "requires": { + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.33", + "web3-providers-http": "1.0.0-beta.33", + "web3-providers-ipc": "1.0.0-beta.33", + "web3-providers-ws": "1.0.0-beta.33" + } + }, + "web3-core-subscriptions": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.0.0-beta.33.tgz", + "integrity": "sha1-YCh1yfTV9NDhYhRitfwewZs1veM=", + "dev": true, + "requires": { + "eventemitter3": "1.1.1", + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.33" + } + }, + "web3-eth": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.0.0-beta.33.tgz", + "integrity": "sha1-hKn5TallUnyS2DitTlcN8CWJhJ8=", + "dev": true, + "requires": { + "underscore": "1.8.3", + "web3-core": "1.0.0-beta.33", + "web3-core-helpers": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-core-subscriptions": "1.0.0-beta.33", + "web3-eth-abi": "1.0.0-beta.33", + "web3-eth-accounts": "1.0.0-beta.33", + "web3-eth-contract": "1.0.0-beta.33", + "web3-eth-iban": "1.0.0-beta.33", + "web3-eth-personal": "1.0.0-beta.33", + "web3-net": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-eth-abi": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.33.tgz", + "integrity": "sha1-IiH3FRZDZgAypN80D2EjSRaMgko=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-eth-accounts": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.0.0-beta.33.tgz", + "integrity": "sha1-JajX9OWOHpk7kvBpVILMzckhL5E=", + "dev": true, + "requires": { + "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.33", + "web3-core-helpers": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + }, + "dependencies": { + "eth-lib": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.2.7.tgz", + "integrity": "sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "elliptic": "6.4.1", + "xhr-request-promise": "0.1.2" + } + } + } + }, + "web3-eth-contract": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.0.0-beta.33.tgz", + "integrity": "sha1-nlkZ8pF6PGe0+2Vp1JxeMDiSW84=", + "dev": true, + "requires": { + "underscore": "1.8.3", + "web3-core": "1.0.0-beta.33", + "web3-core-helpers": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-core-promievent": "1.0.0-beta.33", + "web3-core-subscriptions": "1.0.0-beta.33", + "web3-eth-abi": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-eth-iban": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.33.tgz", + "integrity": "sha1-HXPQxSiKRWWxdUp1tfs+oLd6Uy8=", + "dev": true, + "requires": { + "bn.js": "4.11.6", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-eth-personal": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.0.0-beta.33.tgz", + "integrity": "sha1-tOSFh8xOfrAY2ib947Tzul+bmO8=", + "dev": true, + "requires": { + "web3-core": "1.0.0-beta.33", + "web3-core-helpers": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-net": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-net": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.0.0-beta.33.tgz", + "integrity": "sha1-tskNGg4WJuquiz2SKsFTZy/VZEU=", + "dev": true, + "requires": { + "web3-core": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-utils": "1.0.0-beta.33" + } + }, + "web3-providers-http": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.0.0-beta.33.tgz", + "integrity": "sha1-OzWuAO599blrSTSWKtSobypVmcE=", + "dev": true, + "requires": { + "web3-core-helpers": "1.0.0-beta.33", + "xhr2": "0.1.4" + } + }, + "web3-providers-ipc": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.0.0-beta.33.tgz", + "integrity": "sha1-Twrcmv6dEsBm5L5cPFNvUHPLB8Y=", + "dev": true, + "requires": { + "oboe": "2.1.3", + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.33" + } + }, + "web3-providers-ws": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.0.0-beta.33.tgz", + "integrity": "sha1-j93qQuGbvyUh7IeVRkV6Yjqdye8=", + "dev": true, + "requires": { + "underscore": "1.8.3", + "web3-core-helpers": "1.0.0-beta.33", + "websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" + } + }, + "web3-shh": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.0.0-beta.33.tgz", + "integrity": "sha1-+Z4mVz9uCZMhrw2fK/z+Pe01UKE=", + "dev": true, + "requires": { + "web3-core": "1.0.0-beta.33", + "web3-core-method": "1.0.0-beta.33", + "web3-core-subscriptions": "1.0.0-beta.33", + "web3-net": "1.0.0-beta.33" + } + }, + "web3-utils": { + "version": "1.0.0-beta.33", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.0.0-beta.33.tgz", + "integrity": "sha1-4JG3mU8JtxSwGYpAV9OtLrjL4jg=", + "dev": true, + "requires": { + "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" } } } }, + "truffle-privatekey-provider": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/truffle-privatekey-provider/-/truffle-privatekey-provider-0.1.0.tgz", + "integrity": "sha512-PGYFIv3n/RfMyJeiw7vxIz8VjsZxduvyVwg8OhsQodeAc/0aWbNJom4Og4rh9XWYB5kBg1bZ1rgNnpZbsZKWFw==", + "dev": true, + "requires": { + "ethereumjs-wallet": "0.6.0", + "web3": "1.0.0-beta.35", + "web3-provider-engine": "git+https://github.com/cgewecke/provider-engine.git#be7d1e895918eb05c7893fc00a7053fe4abb4233" + } + }, "ts-node": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", @@ -18230,6 +18437,15 @@ "requires-port": "1.0.0" } }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true, + "requires": { + "prepend-http": "1.0.4" + } + }, "url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", @@ -19728,9 +19944,7 @@ } }, "web3-provider-engine": { - "version": "14.0.6", - "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-14.0.6.tgz", - "integrity": "sha512-tr5cGSyxfSC/JqiUpBlJtfZpwQf1yAA8L/zy1C6fDFm0ntR974pobJ4v4676atpZne4Ze5VFy3kPPahHe9gQiQ==", + "version": "git+https://github.com/cgewecke/provider-engine.git#be7d1e895918eb05c7893fc00a7053fe4abb4233", "dev": true, "requires": { "async": "2.6.1", @@ -21342,6 +21556,16 @@ "webpack-core": "0.6.9" } }, + "websocket": { + "version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2", + "dev": true, + "requires": { + "debug": "2.6.9", + "nan": "2.10.0", + "typedarray-to-buffer": "3.1.5", + "yaeti": "0.0.6" + } + }, "websocket-driver": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz", diff --git a/package.json b/package.json index 6b64f80..30aeb9c 100644 --- a/package.json +++ b/package.json @@ -112,8 +112,9 @@ "rxjs-tslint-rules": "^4.7.2", "solidity-coverage": "^0.5.7", "solium": "^1.1.8", - "truffle": "4.1.11", - "truffle-hdwallet-provider": "0.0.6", + "truffle": "^5.0.0-beta.1", + "truffle-hdwallet-provider": "1.0.0-web3one.0", + "truffle-privatekey-provider": "0.1.0", "ts-node": "~7.0.1", "tslint": "~5.11.0", "typescript": "^2.9.2" diff --git a/src/environments/environment.e2e.ts b/src/environments/environment.e2e.ts index 33e4ae6..f395a96 100644 --- a/src/environments/environment.e2e.ts +++ b/src/environments/environment.e2e.ts @@ -1,7 +1,7 @@ -import HDWalletProvider from 'truffle-hdwallet-provider'; +import PrivateKeyProvider from 'truffle-privatekey-provider'; -const defaultGanacheMneonic = 'myth like bonus scare over problem client lizard pioneer submit female collect'; -const ganacheProvider = new HDWalletProvider(defaultGanacheMneonic, `http://localhost:8545`, 0, 10); +const privateKey = '4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d'; +const ganacheProvider = new PrivateKeyProvider(privateKey, 'http://localhost:8545'); export const environment = { production: false, diff --git a/test/KudosPoll.js b/test/KudosPoll.js index 6e0a722..8a0951d 100644 --- a/test/KudosPoll.js +++ b/test/KudosPoll.js @@ -145,7 +145,7 @@ contract('KudosPoll', accounts => { assert.equal(+(gratitudesSize), 1, `1 wasn\'t the number of gratitudes of ${accounts[1]}`); const gratitude = await instance.getGratitudeOf.call(accounts[1], 0); - const [kudos, message, fromAddress] = gratitude; + const {kudos, message, from: fromAddress} = gratitude; assert.equal(kudos, 100, `1.00 wasn\'t the kudos sent`); assert.equal(message, 'Test message', `'Test message' wasn\'t the message sent`); @@ -220,7 +220,7 @@ contract('KudosPoll', accounts => { const resultsPromises = Array.from(new Array(+(await instance.getPollResultsSize()))) .map((_, i) => instance.getPollResult(i)); const results = (await Promise.all(resultsPromises)) - .map(([member, kudos]) => ({member, kudos: +kudos})) + .map(({member, kudos}) => ({member, kudos: +kudos})) .sort((a, b) => b.kudos - a.kudos); const compared = [ diff --git a/test/KudosRouter.js b/test/KudosRouter.js index ee175bc..d467de2 100644 --- a/test/KudosRouter.js +++ b/test/KudosRouter.js @@ -18,7 +18,7 @@ contract('KudosRouter', accounts => { }); it('should be able to get a resource', async () => { - const [version, at] = await instance.getResource('Test'); + const {version, at} = await instance.getResource('Test'); assert.equal(at, '0x0000000000000000000000000000000000000001', 'Must be 1 the address of the resource'); assert.equal(version, '0.1', 'Must be 0.1 the version of the resource'); @@ -47,7 +47,7 @@ contract('KudosRouter', accounts => { it('should be able to overwrite a resource', async () => { await instance.setResource('Test', '0.2', '0x0000000000000000000000000000000000000002'); - const [version, at] = await instance.getResource('Test'); + const {version, at} = await instance.getResource('Test'); assert.equal(at, '0x0000000000000000000000000000000000000002', 'Must be 2 the address of the resource'); assert.equal(version, '0.2', 'Must be 0.2 the version of the resource'); diff --git a/test/KudosToken.js b/test/KudosToken.js index 45d4a9a..22f5966 100644 --- a/test/KudosToken.js +++ b/test/KudosToken.js @@ -191,7 +191,7 @@ contract('KudosToken', accounts => { }); it('should know the address of the current poll', async () => { - assert.ok(/^0x[0-9a-f]{40}$/.test(await instance.activePoll()), 'Wasn\'t an address'); + assert.ok(/^0x[0-9a-f]{40}$/i.test(await instance.activePoll()), 'Wasn\'t an address'); }); it('should add the members to new poll', async () => { diff --git a/truffle.js b/truffle.js index 07ff2ae..dff6be1 100644 --- a/truffle.js +++ b/truffle.js @@ -7,19 +7,24 @@ module.exports = { dev: { host: "127.0.0.1", port: 8545, - network_id: "*" + network_id: "*", }, ropsten: { provider: new HDWalletProvider(TRUFFLE_MNEMONIC, `https://ropsten.infura.io/${TRUFFLE_INFURA_API_KEY}`, 0, 10), gas: 4600000, gasPrice: 40 * 1000000000, - network_id: 3 - } + network_id: 3, + }, }, solc: { optimizer: { enabled: true, - runs: 200 - } + runs: 200, + }, + }, + compilers: { + solc: { + version: '0.4.21', + }, }, };