diff --git a/lib/contracts/code_generator.js b/lib/contracts/code_generator.js index ac1d4b22..964a54ff 100644 --- a/lib/contracts/code_generator.js +++ b/lib/contracts/code_generator.js @@ -35,14 +35,14 @@ class CodeGenerator { listenToCommands() { let self = this; - this.events.setCommandHandlerOnce('provider-code', function(cb) { + this.events.setCommandHandler('provider-code', function(cb) { let providerCode = self.generateProvider(false); cb(providerCode); }); // new events - this.events.setCommandHandlerOnce('code-vanila', function(cb) { + this.events.setCommandHandler('code-vanila', function(cb) { self.events.request("contracts:list", (contractsList) => { let vanillaABI = self.generateABI(contractsList, {useEmbarkJS: false}); let contractsJSON = self.generateContractsJSON(contractsList); @@ -50,7 +50,7 @@ class CodeGenerator { }); }); - this.events.setCommandHandlerOnce('code', function(cb) { + this.events.setCommandHandler('code', function(cb) { self.events.request("contracts:list", (contractsList) => { let embarkJSABI = self.generateABI(contractsList, {useEmbarkJS: true}); let contractsJSON = self.generateContractsJSON(contractsList); @@ -58,7 +58,7 @@ class CodeGenerator { }); }); - this.events.setCommandHandlerOnce('code-contracts-vanila', function(cb) { + this.events.setCommandHandler('code-contracts-vanila', function(cb) { self.events.request("contracts:list", (contractsList) => { let vanillaContractsABI = self.generateContracts(contractsList, false, true, false); let contractsJSON = self.generateContractsJSON(contractsList); @@ -66,7 +66,7 @@ class CodeGenerator { }); }); - this.events.setCommandHandlerOnce('code-vanila-deployment', function(cb) { + this.events.setCommandHandler('code-vanila-deployment', function(cb) { self.events.request("contracts:list", (contractsList) => { let vanillaABI = self.generateABI(contractsList, {useEmbarkJS: false, deployment: true}); let contractsJSON = self.generateContractsJSON(contractsList); @@ -74,7 +74,7 @@ class CodeGenerator { }); }); - this.events.setCommandHandlerOnce('code-generator:web3js', function(cb) { + this.events.setCommandHandler('code-generator:web3js', function(cb) { self.buildWeb3JS(cb); }); diff --git a/package-lock.json b/package-lock.json index 728c99ec..89074a3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3867,7 +3867,7 @@ "readable-stream": "2.3.5", "request": "2.85.0", "semaphore": "1.1.0", - "solc": "0.4.23", + "solc": "0.4.24", "tape": "4.9.0", "xhr": "2.4.1", "xtend": "4.0.1" @@ -10852,9 +10852,9 @@ } }, "solc": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.23.tgz", - "integrity": "sha512-AT7anLHY6uIRg2It6N0UlCHeZ7YeecIkUhnlirrCgCPCUevtnoN48BxvgigN/4jJTRljv5oFhAJtI6gvHzT5DQ==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.24.tgz", + "integrity": "sha512-2xd7Cf1HeVwrIb6Bu1cwY2/TaLRodrppCq3l7rhLimFQgmxptXhTC3+/wesVLpB09F1A2kZgvbMOgH7wvhFnBQ==", "requires": { "fs-extra": "0.30.0", "memorystream": "0.3.1", @@ -13072,7 +13072,46 @@ "p-finally": "1.0.0" } }, - "prepend-http": { + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + } + } + }, + "webcrypto-shim": { + "version": "github:dignifiedquire/webcrypto-shim#190bc9ec341375df6025b17ae12ddb2428ea49c8" + }, + "webpack": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.11.0.tgz", + "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", + "requires": { + "acorn": "5.5.3", + "acorn-dynamic-import": "2.0.2", + "ajv": "6.2.1", + "ajv-keywords": "3.1.0", + "async": "2.6.0", + "enhanced-resolve": "3.4.1", + "escope": "3.6.0", + "interpret": "1.1.0", + "json-loader": "0.5.7", + "json5": "0.5.1", + "loader-runner": "2.3.0", + "loader-utils": "1.1.0", + "memory-fs": "0.4.1", + "mkdirp": "0.5.1", + "node-libs-browser": "2.1.0", + "source-map": "0.5.7", + "supports-color": "4.5.0", + "tapable": "0.2.8", + "uglifyjs-webpack-plugin": "0.4.6", + "watchpack": "1.6.0", + "webpack-sources": "1.1.0", + "yargs": "8.0.2" + }, + "dependencies": { + "has-flag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=" diff --git a/package.json b/package.json index e6ffb76b..6d013652 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "request": "^2.85.0", "serve-static": "^1.11.1", "shelljs": "^0.5.0", - "solc": "0.4.23", + "solc": "0.4.24", "string-replace-async": "^1.2.1", "style-loader": "^0.19.0", "tar": "^3.1.5", diff --git a/templates/boilerplate/embark.json b/templates/boilerplate/embark.json index d0bfeb7a..34b29498 100644 --- a/templates/boilerplate/embark.json +++ b/templates/boilerplate/embark.json @@ -10,7 +10,7 @@ "config": "config/", "versions": { "web3": "1.0.0-beta", - "solc": "0.4.23", + "solc": "0.4.24", "ipfs-api": "17.2.4", "p-iteration": "1.1.7" }, diff --git a/templates/demo/embark.json b/templates/demo/embark.json index 05855ace..f5706720 100644 --- a/templates/demo/embark.json +++ b/templates/demo/embark.json @@ -9,7 +9,7 @@ "config": "config/", "versions": { "web3": "1.0.0-beta", - "solc": "0.4.23", + "solc": "0.4.24", "ipfs-api": "17.2.4", "p-iteration": "1.1.7" }, diff --git a/templates/simple/embark.json b/templates/simple/embark.json index 81232490..e7907501 100644 --- a/templates/simple/embark.json +++ b/templates/simple/embark.json @@ -10,7 +10,7 @@ "webserver": false }, "versions": { - "solc": "0.4.23" + "solc": "0.4.24" }, "plugins": {} } diff --git a/test/compiler.js b/test/compiler.js index e79fcd52..4bc48160 100644 --- a/test/compiler.js +++ b/test/compiler.js @@ -8,7 +8,7 @@ let readFile = function(file) { return new File({filename: file, type: File.types.dapp_file, path: file}); }; -var solcVersion = "0.4.23"; +var solcVersion = "0.4.24"; var TestEvents = { request: (cmd, cb) => { @@ -34,9 +34,27 @@ describe('embark.Compiler', function() { let expectedObject = {}; - expectedObject["SimpleStorage"] = {"code":"608060405234801561001057600080fd5b50604051602080610114833981016040525160005560e1806100336000396000f30060806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a72305820194e9895d54b0b5d8b469e794926ef9115b42631ab9a06ce726f9fea067633850029","runtimeBytecode":"60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a72305820194e9895d54b0b5d8b469e794926ef9115b42631ab9a06ce726f9fea067633850029","realRuntimeBytecode":"60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a72305820","swarmHash":"194e9895d54b0b5d8b469e794926ef9115b42631ab9a06ce726f9fea06763385","gasEstimates":{"creation":{"codeDepositCost":"45000","executionCost":"20141","totalCost":"65141"},"external":{"get()":"428","set(uint256)":"20161","storedData()":"384"}},"functionHashes":{"get()":"6d4ce63c","set(uint256)":"60fe47b1","storedData()":"2a1afcd9"},"abiDefinition":[{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"initialValue","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}],"filename":"test/contracts/simple_storage.sol"}; + expectedObject["SimpleStorage"] = { + "code":"608060405234801561001057600080fd5b50604051602080610114833981016040525160005560e1806100336000396000f30060806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a723058200d15419363aede339114aad0374f61d748071e4d9cd677583967b8b94eeb35ed0029", + "runtimeBytecode":"60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a723058200d15419363aede339114aad0374f61d748071e4d9cd677583967b8b94eeb35ed0029", + "realRuntimeBytecode":"60806040526004361060525763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632a1afcd98114605757806360fe47b114607b5780636d4ce63c146092575b600080fd5b348015606257600080fd5b50606960a4565b60408051918252519081900360200190f35b348015608657600080fd5b50609060043560aa565b005b348015609d57600080fd5b50606960af565b60005481565b600055565b600054905600a165627a7a72305820", + "swarmHash":"0d15419363aede339114aad0374f61d748071e4d9cd677583967b8b94eeb35ed", + "gasEstimates":{"creation":{"codeDepositCost":"45000","executionCost":"20141","totalCost":"65141"},"external":{"get()":"428","set(uint256)":"20161","storedData()":"384"}}, + "functionHashes":{"get()":"6d4ce63c","set(uint256)":"60fe47b1","storedData()":"2a1afcd9"}, + "abiDefinition":[{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"initialValue","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}], + "filename":"test/contracts/simple_storage.sol" + }; - expectedObject["Token"] = {"code":"608060405234801561001057600080fd5b5060405160208061047e8339810160409081529051600160a060020a033316600090815260208190529190912081905560025561042c806100526000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100b457806323b872dd146100db57806370a0823114610105578063a9059cbb14610126578063dd62ed3e1461014a575b600080fd5b34801561008857600080fd5b506100a0600160a060020a0360043516602435610171565b604080519115158252519081900360200190f35b3480156100c057600080fd5b506100c96101db565b60408051918252519081900360200190f35b3480156100e757600080fd5b506100a0600160a060020a03600435811690602435166044356101e1565b34801561011157600080fd5b506100c9600160a060020a03600435166102f2565b34801561013257600080fd5b506100a0600160a060020a036004351660243561030d565b34801561015657600080fd5b506100c9600160a060020a03600435811690602435166103ce565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526020819052604081205482111561020657600080fd5b600160a060020a038085166000908152600160209081526040808320339094168352929052205482111561023957600080fd5b600160a060020a03831660009081526020819052604090205461025c90836103f9565b151561026757600080fd5b600160a060020a038085166000818152600160209081526040808320338616845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600160a060020a03331660009081526020819052604081205482111561033257600080fd5b600160a060020a03831660009081526020819052604090205461035590836103f9565b151561036057600080fd5b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b81011015905600a165627a7a72305820c34209c42f57b08f62d29e65db6744b4c8991eee33c4c83e0d81674550945da80029","runtimeBytecode":"6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100b457806323b872dd146100db57806370a0823114610105578063a9059cbb14610126578063dd62ed3e1461014a575b600080fd5b34801561008857600080fd5b506100a0600160a060020a0360043516602435610171565b604080519115158252519081900360200190f35b3480156100c057600080fd5b506100c96101db565b60408051918252519081900360200190f35b3480156100e757600080fd5b506100a0600160a060020a03600435811690602435166044356101e1565b34801561011157600080fd5b506100c9600160a060020a03600435166102f2565b34801561013257600080fd5b506100a0600160a060020a036004351660243561030d565b34801561015657600080fd5b506100c9600160a060020a03600435811690602435166103ce565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526020819052604081205482111561020657600080fd5b600160a060020a038085166000908152600160209081526040808320339094168352929052205482111561023957600080fd5b600160a060020a03831660009081526020819052604090205461025c90836103f9565b151561026757600080fd5b600160a060020a038085166000818152600160209081526040808320338616845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600160a060020a03331660009081526020819052604081205482111561033257600080fd5b600160a060020a03831660009081526020819052604090205461035590836103f9565b151561036057600080fd5b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b81011015905600a165627a7a72305820c34209c42f57b08f62d29e65db6744b4c8991eee33c4c83e0d81674550945da80029","realRuntimeBytecode":"6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100b457806323b872dd146100db57806370a0823114610105578063a9059cbb14610126578063dd62ed3e1461014a575b600080fd5b34801561008857600080fd5b506100a0600160a060020a0360043516602435610171565b604080519115158252519081900360200190f35b3480156100c057600080fd5b506100c96101db565b60408051918252519081900360200190f35b3480156100e757600080fd5b506100a0600160a060020a03600435811690602435166044356101e1565b34801561011157600080fd5b506100c9600160a060020a03600435166102f2565b34801561013257600080fd5b506100a0600160a060020a036004351660243561030d565b34801561015657600080fd5b506100c9600160a060020a03600435811690602435166103ce565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b600160a060020a03831660009081526020819052604081205482111561020657600080fd5b600160a060020a038085166000908152600160209081526040808320339094168352929052205482111561023957600080fd5b600160a060020a03831660009081526020819052604090205461025c90836103f9565b151561026757600080fd5b600160a060020a038085166000818152600160209081526040808320338616845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600160a060020a03331660009081526020819052604081205482111561033257600080fd5b600160a060020a03831660009081526020819052604090205461035590836103f9565b151561036057600080fd5b600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b81011015905600a165627a7a72305820","swarmHash":"c34209c42f57b08f62d29e65db6744b4c8991eee33c4c83e0d81674550945da8","gasEstimates":{"creation":{"codeDepositCost":"213600","executionCost":"40466","totalCost":"254066"},"external":{"allowance(address,address)":"818","approve(address,uint256)":"22344","balanceOf(address)":"675","totalSupply()":"406","transfer(address,uint256)":"43625","transferFrom(address,address,uint256)":"64402"},"internal":{"safeToAdd(uint256,uint256)":"24"}},"functionHashes":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"},"abiDefinition":[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"supply","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":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"_allowance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"initial_balance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"},{"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"}],"filename":"test/contracts/token.sol"}; + expectedObject["Token"] = { + "code":"608060405234801561001057600080fd5b506040516020806104618339810160409081529051336000908152602081905291909120819055600255610418806100496000396000f3006080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100b457806323b872dd146100db57806370a0823114610105578063a9059cbb14610126578063dd62ed3e1461014a575b600080fd5b34801561008857600080fd5b506100a0600160a060020a0360043516602435610171565b604080519115158252519081900360200190f35b3480156100c057600080fd5b506100c96101d7565b60408051918252519081900360200190f35b3480156100e757600080fd5b506100a0600160a060020a03600435811690602435166044356101dd565b34801561011157600080fd5b506100c9600160a060020a03600435166102e9565b34801561013257600080fd5b506100a0600160a060020a0360043516602435610304565b34801561015657600080fd5b506100c9600160a060020a03600435811690602435166103ba565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b600160a060020a03831660009081526020819052604081205482111561020257600080fd5b600160a060020a038416600090815260016020908152604080832033845290915290205482111561023257600080fd5b600160a060020a03831660009081526020819052604090205461025590836103e5565b151561026057600080fd5b600160a060020a03808516600081815260016020908152604080832033845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b3360009081526020819052604081205482111561032057600080fd5b600160a060020a03831660009081526020819052604090205461034390836103e5565b151561034e57600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b81011015905600a165627a7a72305820f4d3e54bdfabcdb60435da61d6a6d650b6814ec3bfa0ac2cb0e4eec3795d11a20029", + "runtimeBytecode":"6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100b457806323b872dd146100db57806370a0823114610105578063a9059cbb14610126578063dd62ed3e1461014a575b600080fd5b34801561008857600080fd5b506100a0600160a060020a0360043516602435610171565b604080519115158252519081900360200190f35b3480156100c057600080fd5b506100c96101d7565b60408051918252519081900360200190f35b3480156100e757600080fd5b506100a0600160a060020a03600435811690602435166044356101dd565b34801561011157600080fd5b506100c9600160a060020a03600435166102e9565b34801561013257600080fd5b506100a0600160a060020a0360043516602435610304565b34801561015657600080fd5b506100c9600160a060020a03600435811690602435166103ba565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b600160a060020a03831660009081526020819052604081205482111561020257600080fd5b600160a060020a038416600090815260016020908152604080832033845290915290205482111561023257600080fd5b600160a060020a03831660009081526020819052604090205461025590836103e5565b151561026057600080fd5b600160a060020a03808516600081815260016020908152604080832033845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b3360009081526020819052604081205482111561032057600080fd5b600160a060020a03831660009081526020819052604090205461034390836103e5565b151561034e57600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b81011015905600a165627a7a72305820f4d3e54bdfabcdb60435da61d6a6d650b6814ec3bfa0ac2cb0e4eec3795d11a20029", + "realRuntimeBytecode":"6080604052600436106100775763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461007c57806318160ddd146100b457806323b872dd146100db57806370a0823114610105578063a9059cbb14610126578063dd62ed3e1461014a575b600080fd5b34801561008857600080fd5b506100a0600160a060020a0360043516602435610171565b604080519115158252519081900360200190f35b3480156100c057600080fd5b506100c96101d7565b60408051918252519081900360200190f35b3480156100e757600080fd5b506100a0600160a060020a03600435811690602435166044356101dd565b34801561011157600080fd5b506100c9600160a060020a03600435166102e9565b34801561013257600080fd5b506100a0600160a060020a0360043516602435610304565b34801561015657600080fd5b506100c9600160a060020a03600435811690602435166103ba565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b600160a060020a03831660009081526020819052604081205482111561020257600080fd5b600160a060020a038416600090815260016020908152604080832033845290915290205482111561023257600080fd5b600160a060020a03831660009081526020819052604090205461025590836103e5565b151561026057600080fd5b600160a060020a03808516600081815260016020908152604080832033845282528083208054889003905583835282825280832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b3360009081526020819052604081205482111561032057600080fd5b600160a060020a03831660009081526020819052604090205461034390836103e5565b151561034e57600080fd5b3360008181526020818152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b81011015905600a165627a7a72305820", + "swarmHash":"f4d3e54bdfabcdb60435da61d6a6d650b6814ec3bfa0ac2cb0e4eec3795d11a2", + "gasEstimates":{"creation":{"codeDepositCost":"209600","executionCost":"40385","totalCost":"249985"},"external":{"allowance(address,address)":"818","approve(address,uint256)":"22332","balanceOf(address)":"675","totalSupply()":"406","transfer(address,uint256)":"43544","transferFrom(address,address,uint256)":"64387"},"internal":{"safeToAdd(uint256,uint256)":"24"}}, + "functionHashes":{"allowance(address,address)":"dd62ed3e","approve(address,uint256)":"095ea7b3","balanceOf(address)":"70a08231","totalSupply()":"18160ddd","transfer(address,uint256)":"a9059cbb","transferFrom(address,address,uint256)":"23b872dd"}, + "abiDefinition":[{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"supply","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":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"ok","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"_allowance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"initial_balance","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"},{"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"}], + "filename":"test/contracts/token.sol" + }; it('should generate compiled code and abi', function(done) { compiler.compile_solidity([ diff --git a/test_apps/contracts_app/embark.json b/test_apps/contracts_app/embark.json index 4f2b9380..cf27cae3 100644 --- a/test_apps/contracts_app/embark.json +++ b/test_apps/contracts_app/embark.json @@ -10,6 +10,6 @@ }, "versions": { "web3": "1.0.0-beta", - "solc": "0.4.17" + "solc": "0.4.24" } } diff --git a/test_apps/test_app/embark.json b/test_apps/test_app/embark.json index 1ae6c162..3a5f72bc 100644 --- a/test_apps/test_app/embark.json +++ b/test_apps/test_app/embark.json @@ -15,7 +15,7 @@ "buildDir": "dist/", "config": "config/", "versions": { - "solc": "0.4.18", + "solc": "0.4.24", "web3": "1.0.0-beta.34", "ipfs-api": "17.2.7", "p-iteration": "1.1.7"