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

Merge pull request #891 from ethereum/defaultVersion081

default solidity compiler version set to 0.8.1
parents c01837c7 c1cf2a57
'use strict'
const storage = `pragma solidity >=0.7.0 <0.8.0;
const storage = `pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
......@@ -27,7 +27,7 @@ contract Storage {
}
}`
const owner = `pragma solidity >=0.7.0 <0.8.0;
const owner = `pragma solidity >=0.7.0 <0.9.0;
/**
* @title Owner
......@@ -77,7 +77,7 @@ contract Owner {
}
}`
const ballot = `pragma solidity >=0.7.0 <0.8.0;
const ballot = `pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
......@@ -281,7 +281,7 @@ contract Ballot {
}
}`
const ballotTest = `pragma solidity >=0.4.22 <0.8.0;
const ballotTest = `pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../3_Ballot.sol";
......
......@@ -40,12 +40,12 @@ module.exports = {
browser.pause(500)
.click('*[data-id="txLoggerDebugButton0x41fab8ea5b1d9fba5e0a6545ca1a2d62fff518578802c033c2b9a031a01c31b3"]')
.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
// .clickLaunchIcon('debugger')
// .clickLaunchIcon('debugger')
.click('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]')
.pause(2000)
.waitForElementVisible('#stepdetail')
.goToVMTraceStep(79)
.pause(1000)
.goToVMTraceStep(144)
// .pause(1000)
.checkVariableDebug('soliditystate', stateCheck)
.checkVariableDebug('soliditylocals', localsCheck)
},
......
......@@ -16,7 +16,7 @@ module.exports = {
'Should launch debugger': function (browser: NightwatchBrowser) {
browser.addFile('blah.sol', sources[0]['browser/blah.sol'])
.clickLaunchIcon('udapp')
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 45000)
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 65000)
.click('*[title="Deploy - transact (not payable)"]')
.debugTransaction(0)
.assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER')
......@@ -40,12 +40,13 @@ module.exports = {
'Should debug transaction using slider': function (browser: NightwatchBrowser) {
browser.waitForElementVisible('*[data-id="verticalIconsKindudapp"]')
.waitForElementVisible('*[data-id="slider"]')
.click('*[data-id="slider"]')
.setValue('*[data-id="slider"]', '50')
// eslint-disable-next-line dot-notation
.execute(function () { document.getElementById('slider')['value'] = '50' }) // It only moves slider to 50 but vm traces are not updated
.setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW))
.pause(2000)
.click('*[data-id="dropdownPanelSolidityLocals"]')
.assert.containsText('*[data-id="solidityLocals"]', 'no locals')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n51')
},
'Should step back and forward transaction': function (browser: NightwatchBrowser) {
......@@ -53,12 +54,12 @@ module.exports = {
.waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]')
.scrollAndClick('*[data-id="buttonNavigatorIntoBack"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n91')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n50')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n50')
.click('*[data-id="buttonNavigatorIntoForward"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n92')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n51')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n51')
},
'Should jump through breakpoints': function (browser: NightwatchBrowser) {
......@@ -71,17 +72,14 @@ module.exports = {
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n0')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n0')
.click('*[data-id="buttonNavigatorJumpNextBreakpoint"]')
.pause(2000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n184')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n184')
.pause(10000)
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n348')
.assert.containsText('*[data-id="stepdetail"]', 'execution step:\n348')
},
'Should display solidity imported code while debugging github import': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.8.0+commit.c7dfd78e.js')
.pause(2000)
.clickLaunchIcon('udapp')
.testContracts('externalImport.sol', sources[1]['browser/externalImport.sol'], ['ERC20'])
.clickLaunchIcon('udapp')
.waitForElementPresent('*[title="Deploy - transact (not payable)"]', 35000)
......@@ -154,8 +152,10 @@ module.exports = {
.pause(2000)
.debugTransaction(6)
.waitForElementVisible('*[data-id="slider"]')
.click('*[data-id="slider"]')
.setValue('*[data-id="slider"]', '5000')
// .setValue('*[data-id="slider"]', '5000') // Like this, setValue doesn't work properly for input type = range
// eslint-disable-next-line dot-notation
.execute(function () { document.getElementById('slider')['value'] = '7450' }) // It only moves slider to 7450 but vm traces are not updated
.setValue('*[data-id="slider"]', new Array(3).fill(browser.Keys.RIGHT_ARROW)) // This will press NEXT 3 times and will update the trace details
.waitForElementPresent('*[data-id="treeViewDivtreeViewItemarray"]')
.click('*[data-id="treeViewDivtreeViewItemarray"]')
.waitForElementPresent('*[data-id="treeViewDivtreeViewLoadMore"]')
......@@ -166,7 +166,6 @@ module.exports = {
'Should debug using generated sources': function (browser: NightwatchBrowser) {
browser
.clickLaunchIcon('solidity')
.setSolidityCompilerVersion('soljson-v0.7.2+commit.51b20bc0.js')
.pause(2000)
.testContracts('withGeneratedSources.sol', sources[4]['browser/withGeneratedSources.sol'], ['A'])
.clickLaunchIcon('udapp')
......@@ -189,8 +188,8 @@ module.exports = {
browser
.addFile('test_jsGetTrace.js', { content: jsGetTrace })
.executeScript('remix.exeCurrent()')
.pause(3000)
.journalChildIncludes('{ "gas": "0x2dc6c0", "return": "0x", "structLogs":')
.pause(5000)
.journalChildIncludes('result { "gas": "0x5863", "return": "0x0000000000000000000000000000000000000000000000000000000000000000", "structLogs":')
},
'Should call the debugger api: debug': function (browser: NightwatchBrowser) {
......@@ -200,15 +199,16 @@ module.exports = {
.pause(3000)
.clickLaunchIcon('debugger')
.waitForElementVisible('*[data-id="slider"]')
.click('*[data-id="slider"]')
.setValue('*[data-id="slider"]', '5')
// eslint-disable-next-line dot-notation
.execute(function () { document.getElementById('slider')['value'] = '153' }) // It only moves slider to 153 but vm traces are not updated
.setValue('*[data-id="slider"]', new Array(1).fill(browser.Keys.RIGHT_ARROW))
.pause(1000)
/*
setting the slider to 5 leads to "vm trace step: 91" for chrome and "vm trace step: 92" for firefox
=> There is something going wrong with the nightwatch API here.
As we are only testing if debugger is active, this is ok to keep that for now.
*/
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n9')
.assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n154')
.end()
},
......@@ -219,7 +219,7 @@ const sources = [
{
'browser/blah.sol': {
content: `
pragma solidity >=0.7.0 <0.8.0;
pragma solidity >=0.7.0 <0.9.0;
contract Kickstarter {
......@@ -279,7 +279,7 @@ const sources = [
{
'browser/locals.sol': {
content: `
pragma solidity ^0.7.0;
pragma solidity ^0.8.0;
contract testLocals {
function t () public {
uint[] memory array = new uint[](150);
......@@ -369,9 +369,9 @@ const localVariable_step717_ABIEncoder = { // eslint-disable-line
}
}
const jsGetTrace = `(async () => {
const jsGetTrace = `(async () => {
try {
const result = await remix.call('debugger', 'getTrace', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50')
const result = await remix.call('debugger', 'getTrace', '0xbf309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af')
console.log('result ', result)
} catch (e) {
console.log(e.message)
......@@ -380,7 +380,7 @@ const jsGetTrace = `(async () => {
const jsDebug = `(async () => {
try {
const result = await remix.call('debugger', 'debug', '0xb175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50')
const result = await remix.call('debugger', 'debug', '0xbf309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af')
console.log('result ', result)
} catch (e) {
console.log(e.message)
......
......@@ -55,7 +55,7 @@ module.exports = {
.addFile('copyFile.js', { content: executeCopyFile })
.executeScript('remix.exeCurrent()')
.pause(2000)
.journalLastChildIncludes('pragma solidity >=0.7.0 <0.8.0;')
.journalLastChildIncludes('pragma solidity >=0.7.0 <0.9.0;')
},
'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) {
......
......@@ -55,9 +55,9 @@ module.exports = {
.waitForElementPresent('*[data-id="Deploy - transact (not payable)"]', 45000)
.click('*[data-id="Deploy - transact (not payable)"]')
.pause(5000)
.testFunction('0x82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b', {
.testFunction('0xcc391e151ace69f4cfb51cda42fb6c2e1092f28c8c2757af20b1aae5ec076ead', {
status: 'true Transaction mined and execution succeed',
'transaction hash': '0x82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b'
'transaction hash': '0xcc391e151ace69f4cfb51cda42fb6c2e1092f28c8c2757af20b1aae5ec076ead'
})
},
......@@ -208,7 +208,7 @@ const sources = [
'browser/Greet.sol': {
content:
`
pragma solidity ^0.7.0;
pragma solidity ^0.8.0;
contract helloWorld {
string public message;
......
......@@ -59,7 +59,7 @@ const sources = [
{
'browser/signMassage.sol': {
content: `
pragma solidity >=0.4.22 <0.8.0;
pragma solidity >=0.4.22 <0.9.0;
contract SignMassageTest {
function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) {
return ecrecover(h, v, r, s);
......
......@@ -185,7 +185,7 @@ const sources = [
{
'browser/simple_storage.sol': {
content: `
pragma solidity >=0.4.22 <0.8.0;
pragma solidity >=0.4.22 <0.9.0;
contract SimpleStorage {
uint public storedData;
......@@ -206,7 +206,7 @@ const sources = [
},
'browser/tests/simple_storage_test.sol': {
content: `
pragma solidity >=0.4.22 <0.8.0;
pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol";
import "../simple_storage.sol";
......@@ -235,7 +235,7 @@ const sources = [
},
'browser/ks2a.sol': {
content: `
pragma solidity >=0.4.22 <0.8.0;
pragma solidity >=0.4.22 <0.9.0;
contract Kickstarter {
enum State { Started, Completed }
......@@ -289,7 +289,7 @@ const sources = [
},
'browser/tests/ks2b_test.sol': {
content: `
pragma solidity >=0.4.22 <0.8.0;
pragma solidity >=0.4.22 <0.9.0;
pragma experimental ABIEncoderV2;
import "remix_tests.sol"; // this import is automatically injected by Remix.
......
......@@ -178,7 +178,7 @@ const sources = [
_a = msg.sender;
}
function retunValues2 () public returns (byte _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) {
function retunValues2 () public returns (bytes1 _b, bytes2 _b2, bytes3 _b3, bytes memory _blit, bytes5 _b5, bytes6 _b6, string memory _str, bytes7 _b7, bytes22 _b22, bytes32 _b32) {
_b = 0x12;
_b2 = 0x1223;
_b5 = hex"043245";
......
......@@ -3,7 +3,7 @@
var fs = require('fs')
var compiler = require('solc')
var compilerInput = require('@remix-project/remix-solidity').CompilerInput
var defaultVersion = 'v0.7.4+commit.3f05b770'
var defaultVersion = 'soljson-v0.8.1+commit.df193b15.js'
const path = require('path')
compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => {
......
......@@ -2,7 +2,7 @@
const storage = `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
......@@ -31,7 +31,7 @@ contract Storage {
const owner = `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Owner
......@@ -83,7 +83,7 @@ contract Owner {
const ballot = `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Ballot
......@@ -223,7 +223,7 @@ contract Ballot {
const ballotTest = `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../contracts/3_Ballot.sol";
......
......@@ -23,7 +23,7 @@ class CompilerContainer {
timeout: 300,
allversions: null,
selectedVersion: null,
defaultVersion: 'soljson-v0.7.4+commit.3f05b770.js' // this default version is defined: in makeMockCompiler (for browser test)
defaultVersion: 'soljson-v0.8.1+commit.df193b15.js' // this default version is defined: in makeMockCompiler (for browser test)
}
}
......
......@@ -64,7 +64,7 @@ class TestTabLogic {
const comment = hasCurrent ? `import "${relative}/${remixPath.basename(fileToImport)}";` : '// Import here the file to test.'
return `// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.8.0;
pragma solidity >=0.4.22 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "remix_accounts.sol";
${comment}
......
......@@ -50,7 +50,7 @@
"bumpVersion:libs": "gulp & gulp syncLibVersions;",
"browsertest": "sleep 5 && npm run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/src/assets/css/font-awesome.min.css' apps/remix-ide/src/assets/css/",
"downloadsolc_assets": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.7.4+commit.3f05b770.js -O ./apps/remix-ide/src/assets/js/soljson.js",
"downloadsolc_assets": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.8.1+commit.df193b15.js -O ./apps/remix-ide/src/assets/js/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"nightwatch_parallel": "npm run build:e2e & nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox",
......
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