Unverified Commit bb355c6b authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #2021 from ethereum/bumpDefaultSolidityVersion

bump default solidity version
parents fa42adc5 bfdba2be
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
var fs = require('fs') var fs = require('fs')
var compiler = require('solc') var compiler = require('solc')
var compilerInput = require('remix-solidity').CompilerInput var compilerInput = require('remix-solidity').CompilerInput
var defaultVersion = 'v0.5.1+commit.c8a2cb62' var defaultVersion = 'v0.5.11+commit.c082d0b4'
compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => { compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => {
if (error) console.log(error) if (error) console.log(error)
...@@ -44,6 +44,12 @@ function compile (solcSnapshot, source, optimization, addCompilationResult) { ...@@ -44,6 +44,12 @@ function compile (solcSnapshot, source, optimization, addCompilationResult) {
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} }
if (result && (result.error || (result.errors && result.errors.length > 0))) {
console.log(result.error, result.errors)
}
if (result) {
console.log(result.error, result.errors)
}
var ret = { var ret = {
key: input, key: input,
source: source, source: source,
......
pragma solidity ^0.5.10;
import "./contract.sol"; import "./contract.sol";
contract Assets { contract Assets {
uint[] proposals; uint[] proposals;
......
This diff is collapsed.
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
"remix-solidity": "0.3.10", "remix-solidity": "0.3.10",
"remix-tabs": "1.0.48", "remix-tabs": "1.0.48",
"remix-tests": "0.1.13", "remix-tests": "0.1.13",
"remixd": "0.1.8-alpha.6", "remixd": "0.1.8-alpha.7",
"request": "^2.83.0", "request": "^2.83.0",
"rimraf": "^2.6.1", "rimraf": "^2.6.1",
"selenium-standalone": "^6.0.1", "selenium-standalone": "^6.0.1",
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
"dependencies": { "dependencies": {
"@remixproject/engine": "^0.1.14", "@remixproject/engine": "^0.1.14",
"http-server": "^0.11.1", "http-server": "^0.11.1",
"remixd": "0.1.8-alpha.6", "remixd": "0.1.8-alpha.7",
"standard": "^8.5.0" "standard": "^8.5.0"
}, },
"repository": { "repository": {
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
"build_debugger": "browserify src/app/debugger/remix-debugger/index.js -o src/app/debugger/remix-debugger/build/app.js", "build_debugger": "browserify src/app/debugger/remix-debugger/index.js -o src/app/debugger/remix-debugger/build/app.js",
"browsertest": "sleep 5 && npm run nightwatch_local", "browsertest": "sleep 5 && npm run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='assets/css/font-awesome.min.css' assets/css/", "csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='assets/css/font-awesome.min.css' assets/css/",
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.5.1+commit.c8a2cb62.js -O soljson.js", "downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.5.11+commit.c082d0b4.js -O soljson.js",
"lint": "standard | notify-error", "lint": "standard | notify-error",
"make-mock-compiler": "node ci/makeMockCompiler.js", "make-mock-compiler": "node ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
"nightwatch_local_solidityImport": "nightwatch ./test-browser/tests/solidityImport.js --config nightwatch.js --env chrome ", "nightwatch_local_solidityImport": "nightwatch ./test-browser/tests/solidityImport.js --config nightwatch.js --env chrome ",
"nightwatch_local_recorder": "nightwatch ./test-browser/tests/recorder.js --config nightwatch.js --env local ", "nightwatch_local_recorder": "nightwatch ./test-browser/tests/recorder.js --config nightwatch.js --env local ",
"nightwatch_local_transactionExecution": "nightwatch ./test-browser/tests/transactionExecution.js --config nightwatch.js --env chrome ", "nightwatch_local_transactionExecution": "nightwatch ./test-browser/tests/transactionExecution.js --config nightwatch.js --env chrome ",
"nightwatch_local_staticAnalysis": "nightwatch ./test-browser/tests/staticanalysis.js --config nightwatch.js --env chrome ", "nightwatch_local_staticAnalysis": "nightwatch ./test-browser/tests/staticAnalysis.js --config nightwatch.js --env chrome ",
"nightwatch_local_signingMessage": "nightwatch ./test-browser/tests/signingMessage.js --config nightwatch.js --env chrome ", "nightwatch_local_signingMessage": "nightwatch ./test-browser/tests/signingMessage.js --config nightwatch.js --env chrome ",
"nightwatch_local_remixd": "nightwatch ./test-browser/tests/remix.js --config nightwatch.js --env chrome ", "nightwatch_local_remixd": "nightwatch ./test-browser/tests/remix.js --config nightwatch.js --env chrome ",
"nightwatch_local_console": "nightwatch ./test-browser/tests/console.js --config nightwatch.js --env chrome ", "nightwatch_local_console": "nightwatch ./test-browser/tests/console.js --config nightwatch.js --env chrome ",
......
...@@ -23,7 +23,7 @@ class CompilerContainer { ...@@ -23,7 +23,7 @@ class CompilerContainer {
timeout: 300, timeout: 300,
allversions: null, allversions: null,
selectedVersion: null, selectedVersion: null,
defaultVersion: 'soljson-v0.5.1+commit.c8a2cb62.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler defaultVersion: 'soljson-v0.5.11+commit.c082d0b4.js', // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler
baseurl: 'https://solc-bin.ethereum.org/bin' baseurl: 'https://solc-bin.ethereum.org/bin'
} }
} }
......
module.exports = function (browser, callback) { module.exports = function (browser, callback) {
browser browser
.url('http://127.0.0.1:8080/#version=builtin') .url('http://127.0.0.1:8080')
.injectScript('test-browser/helpers/applytestmode.js', function () { .injectScript('test-browser/helpers/applytestmode.js', function () {
browser.resizeWindow(2560, 1440, () => { browser.resizeWindow(2560, 1440, () => {
initModules(browser, () => { initModules(browser, () => {
...@@ -19,6 +19,7 @@ function initModules (browser, callback) { ...@@ -19,6 +19,7 @@ function initModules (browser, callback) {
document.querySelector('div[id="pluginManager"]').scrollTop = document.querySelector('div[id="pluginManager"]').scrollHeight document.querySelector('div[id="pluginManager"]').scrollTop = document.querySelector('div[id="pluginManager"]').scrollHeight
}, [], function () { }, [], function () {
browser.click('#pluginManager article[id="remixPluginManagerListItem_solidity"] button') browser.click('#pluginManager article[id="remixPluginManagerListItem_solidity"] button')
.pause(5000)
.click('#pluginManager article[id="remixPluginManagerListItem_udapp"] button') .click('#pluginManager article[id="remixPluginManagerListItem_udapp"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button') .click('#pluginManager article[id="remixPluginManagerListItem_solidityStaticAnalysis"] button')
.click('#pluginManager article[id="remixPluginManagerListItem_debugger"] button') .click('#pluginManager article[id="remixPluginManagerListItem_debugger"] button')
......
...@@ -36,7 +36,7 @@ module.exports = { ...@@ -36,7 +36,7 @@ module.exports = {
.clickLaunchIcon('debugger') .clickLaunchIcon('debugger')
.click('#jumppreviousbreakpoint') .click('#jumppreviousbreakpoint')
.pause(2000) .pause(2000)
.goToVMTraceStep(59) .goToVMTraceStep(58)
.pause(1000) .pause(1000)
.checkVariableDebug('soliditystate', stateCheck) .checkVariableDebug('soliditystate', stateCheck)
.checkVariableDebug('soliditylocals', localsCheck) .checkVariableDebug('soliditylocals', localsCheck)
......
...@@ -48,6 +48,7 @@ module.exports = { ...@@ -48,6 +48,7 @@ module.exports = {
var sources = [ var sources = [
{ {
'browser/signMassage.sol': {content: ` 'browser/signMassage.sol': {content: `
pragma solidity >=0.4.22 <0.6.0;
contract SignMassageTest { contract SignMassageTest {
function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) {
return ecrecover(h, v, r, s); return ecrecover(h, v, r, s);
......
...@@ -5,6 +5,7 @@ var sauce = require('./sauce') ...@@ -5,6 +5,7 @@ var sauce = require('./sauce')
var sources = [ var sources = [
{ {
'browser/Untitled.sol': {content: ` 'browser/Untitled.sol': {content: `
pragma solidity >=0.4.22 <0.6.0;
contract test1 { address test = tx.origin; } contract test1 { address test = tx.origin; }
contract test2 {} contract test2 {}
contract TooMuchGas { contract TooMuchGas {
...@@ -38,7 +39,7 @@ function runTests (browser) { ...@@ -38,7 +39,7 @@ function runTests (browser) {
.clickLaunchIcon('solidityStaticAnalysis') .clickLaunchIcon('solidityStaticAnalysis')
.click('#staticanalysisView button') .click('#staticanalysisView button')
.waitForElementPresent('#staticanalysisresult .staticAnalysisWarning', 2000, true, function () { .waitForElementPresent('#staticanalysisresult .staticAnalysisWarning', 2000, true, function () {
listSelectorContains(['browser/Untitled.sol:2:33:Use of tx.origin', listSelectorContains(['browser/Untitled.sol:3:33:Use of tx.origin',
'Fallback function of contract TooMuchGas requires too much gas', 'Fallback function of contract TooMuchGas requires too much gas',
'TooMuchGas.() : Variables have very similar names test and test1.'], 'TooMuchGas.() : Variables have very similar names test and test1.'],
'#staticanalysisresult .staticAnalysisWarning', '#staticanalysisresult .staticAnalysisWarning',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment