From 3143673ec539b6533387587c7943904da306fe58 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 21 Oct 2020 16:14:36 +0530 Subject: [PATCH 01/15] update default Solidity version to 0.7.4 --- apps/remix-ide/ci/makeMockCompiler.js | 2 +- apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix-ide/ci/makeMockCompiler.js b/apps/remix-ide/ci/makeMockCompiler.js index 5ad561ede7..155331d4cf 100644 --- a/apps/remix-ide/ci/makeMockCompiler.js +++ b/apps/remix-ide/ci/makeMockCompiler.js @@ -3,7 +3,7 @@ var fs = require('fs') var compiler = require('solc') var compilerInput = require('@remix-project/remix-solidity').CompilerInput -var defaultVersion = 'v0.6.6+commit.6c089d02' +var defaultVersion = 'v0.7.4+commit.3f05b770' const path = require('path') compiler.loadRemoteVersion(defaultVersion, (error, solcSnapshot) => { diff --git a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js index d5b6449d35..a874880d61 100644 --- a/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js +++ b/apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js @@ -23,7 +23,7 @@ class CompilerContainer { timeout: 300, allversions: null, selectedVersion: null, - defaultVersion: 'soljson-v0.6.6+commit.6c089d02.js' // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler + defaultVersion: 'soljson-v0.7.4+commit.3f05b770.js' // this default version is defined: in makeMockCompiler (for browser test) and in package.json (downloadsolc_root) for the builtin compiler } } diff --git a/package.json b/package.json index 7b2b5a1eba..3a7af0876c 100644 --- a/package.json +++ b/package.json @@ -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/assets/css/font-awesome.min.css' apps/remix-ide/assets/css/", - "downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.6.6+commit.6c089d02.js -O ./apps/remix-ide/soljson.js", + "downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.7.4+commit.3f05b770.js -O ./apps/remix-ide/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": "nx build remix-ide-e2e; nx e2e remix-ide-e2e -env=chrome,firefox", From 9c8b9e9f2136d4212727063010e53ade46818c35 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Wed, 21 Oct 2020 16:33:34 +0530 Subject: [PATCH 02/15] example contracts updated --- apps/remix-ide/src/app/editor/example-contracts.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/editor/example-contracts.js b/apps/remix-ide/src/app/editor/example-contracts.js index a825255904..b47928fa2e 100644 --- a/apps/remix-ide/src/app/editor/example-contracts.js +++ b/apps/remix-ide/src/app/editor/example-contracts.js @@ -1,6 +1,6 @@ 'use strict' -const storage = `pragma solidity >=0.4.22 <0.7.0; +const storage = `pragma solidity >=0.4.22 <0.8.0; /** * @title Storage @@ -27,7 +27,7 @@ contract Storage { } }` -const owner = `pragma solidity >=0.4.22 <0.7.0; +const owner = `pragma solidity >=0.4.22 <0.8.0; /** * @title Owner @@ -54,7 +54,7 @@ contract Owner { /** * @dev Set contract deployer as owner */ - constructor() public { + constructor() { owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor emit OwnerSet(address(0), owner); } @@ -77,7 +77,7 @@ contract Owner { } }` -const ballot = `pragma solidity >=0.4.22 <0.7.0; +const ballot = `pragma solidity >=0.4.22 <0.8.0; /** * @title Ballot @@ -109,7 +109,7 @@ contract Ballot { * @dev Create a new ballot to choose one of 'proposalNames'. * @param proposalNames names of proposals */ - constructor(bytes32[] memory proposalNames) public { + constructor(bytes32[] memory proposalNames) { chairperson = msg.sender; voters[chairperson].weight = 1; @@ -215,7 +215,7 @@ contract Ballot { } ` -var ballotTest = `pragma solidity >=0.4.22 <0.7.0; +var ballotTest = `pragma solidity >=0.4.22 <0.8.0; import "remix_tests.sol"; // this import is automatically injected by Remix. import "../3_Ballot.sol"; From e11ec599495ddf57f7a48465689981d5ffc9e09e Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 22 Oct 2020 13:01:37 +0530 Subject: [PATCH 03/15] tests fix --- apps/remix-ide-e2e/src/tests/fileManager_api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts index f9416e4cff..88383b409f 100644 --- a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts @@ -55,7 +55,7 @@ module.exports = { .addFile('copyFile.js', { content: executeCopyFile }) .executeScript(`remix.exeCurrent()`) .pause(2000) - .journalLastChildIncludes('pragma solidity >=0.4.22 <0.7.0;') + .journalLastChildIncludes('pragma solidity >=0.4.22 <0.8.0;') }, 'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) { From 00bb25b8a3ebbaa86469e51369a709f6216319ca Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 22 Oct 2020 13:58:52 +0530 Subject: [PATCH 04/15] run and deploy tests fix --- apps/remix-ide-e2e/src/tests/runAndDeploy.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts index ce3d664b99..532fbd2027 100644 --- a/apps/remix-ide-e2e/src/tests/runAndDeploy.ts +++ b/apps/remix-ide-e2e/src/tests/runAndDeploy.ts @@ -44,12 +44,12 @@ module.exports = { .addFile('Greet.sol', sources[0]['browser/Greet.sol']) .clickLaunchIcon('udapp') .selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c') - .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]') + .waitForElementPresent('*[data-id="Deploy - transact (not payable)"]', 45000) .click('*[data-id="Deploy - transact (not payable)"]') .pause(5000) - .testFunction('0xc39ee005c1e1368c84f02e458de4b41dbb966631a8714d15ef8362dada249ede', { + .testFunction('0x82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b', { status: 'true Transaction mined and execution succeed', - 'transaction hash': '0xc39ee005c1e1368c84f02e458de4b41dbb966631a8714d15ef8362dada249ede' + 'transaction hash': '0x82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b' }) }, @@ -191,7 +191,7 @@ const sources = [ 'browser/Greet.sol': { content: ` - pragma solidity ^0.6.0; + pragma solidity ^0.7.0; contract helloWorld { string public message; From ce41dcea607368b99ff1fa0746e8e3fa00b35a54 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 22 Oct 2020 14:19:28 +0530 Subject: [PATCH 05/15] css test fix --- apps/remix-ide-e2e/src/tests/generalSettings.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts index a3ddde4d1d..e86197fb47 100644 --- a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts +++ b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts @@ -178,7 +178,7 @@ const remixIdeThemes = { primary: '#2A9FD6', secondary: '#555', success: '#77B300', - info: '#9933CC', + info: '#93C', warning: '#FF8800', danger: '#CC0000' } From 7f62795452feab5f39add3c65351d603f745854c Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 22 Oct 2020 16:23:20 +0530 Subject: [PATCH 06/15] tests css fix --- apps/remix-ide-e2e/src/tests/generalSettings.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts index e86197fb47..cff0a64686 100644 --- a/apps/remix-ide-e2e/src/tests/generalSettings.test.ts +++ b/apps/remix-ide-e2e/src/tests/generalSettings.test.ts @@ -179,7 +179,7 @@ const remixIdeThemes = { secondary: '#555', success: '#77B300', info: '#93C', - warning: '#FF8800', - danger: '#CC0000' + warning: '#F80', + danger: '#C00' } } From ce6e2e74b8e74b986f3a1779f007ae7b781a5870 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 22 Oct 2020 19:16:35 +0530 Subject: [PATCH 07/15] contracts updated --- .../src/examples/example-contracts.ts | 14 +++++----- apps/remix-ide-e2e/src/tests/debugger.test.ts | 6 ++--- .../src/tests/signingMessage.test.ts | 2 +- .../src/tests/solidityUnittests.test.ts | 26 +++++++++---------- .../src/tests/staticAnalysis.test.ts | 2 +- .../src/tests/usingWebWorker.test.ts | 4 +-- .../remix-ide/src/app/tabs/testTab/testTab.js | 2 +- libs/remix-debug/test/debugger.js | 4 +-- libs/remix-lib/test/txFormat.js | 6 ++--- libs/remix-tests/sol/tests.sol.ts | 2 +- .../tests/examples_1/simple_storage.sol | 4 +-- .../tests/examples_1/simple_storage_test.sol | 2 +- .../tests/examples_2/simple_storage.sol | 2 +- .../tests/examples_2/simple_storage_test.sol | 2 +- .../tests/examples_3/simple_string.sol | 2 +- .../tests/examples_3/simple_string_test.sol | 2 +- .../remix-tests/tests/examples_4/SafeMath.sol | 2 +- .../tests/examples_4/SafeMathProxy.sol | 2 +- .../tests/examples_4/SafeMath_test.sol | 2 +- .../examples_5/contract/simple_storage.sol | 4 +-- .../tests/examples_5/lib/EvenOdd.sol | 2 +- .../examples_5/test/simple_storage_test.sol | 2 +- libs/remix-tests/tests/number/number_test.sol | 2 +- 23 files changed, 49 insertions(+), 49 deletions(-) diff --git a/apps/remix-ide-e2e/src/examples/example-contracts.ts b/apps/remix-ide-e2e/src/examples/example-contracts.ts index 1247244df0..aa2904d7d5 100644 --- a/apps/remix-ide-e2e/src/examples/example-contracts.ts +++ b/apps/remix-ide-e2e/src/examples/example-contracts.ts @@ -1,6 +1,6 @@ 'use strict' -const storage = `pragma solidity >=0.4.22 <0.7.0; +const storage = `pragma solidity >=0.4.22 <0.8.0; /** * @title Storage @@ -27,7 +27,7 @@ contract Storage { } }` -const owner = `pragma solidity >=0.4.22 <0.7.0; +const owner = `pragma solidity >=0.4.22 <0.8.0; /** * @title Owner @@ -54,7 +54,7 @@ contract Owner { /** * @dev Set contract deployer as owner */ - constructor() public { + constructor() { owner = msg.sender; // 'msg.sender' is sender of current call, contract deployer for a constructor emit OwnerSet(address(0), owner); } @@ -77,7 +77,7 @@ contract Owner { } }` -const ballot = `pragma solidity >=0.4.22 <0.7.0; +const ballot = `pragma solidity >=0.4.22 <0.8.0; /** * @title Ballot @@ -109,7 +109,7 @@ contract Ballot { * @dev Create a new ballot to choose one of 'proposalNames'. * @param proposalNames names of proposals */ - constructor(bytes32[] memory proposalNames) public { + constructor(bytes32[] memory proposalNames) { chairperson = msg.sender; voters[chairperson].weight = 1; @@ -215,7 +215,7 @@ contract Ballot { } ` -const ballot_0_4_11 = `pragma solidity >=0.4.10 <0.7.0; +const ballot_0_4_11 = `pragma solidity >=0.4.10 <0.8.0; contract Ballot { struct Voter { @@ -281,7 +281,7 @@ contract Ballot { } }` -const ballotTest = `pragma solidity >=0.4.22 <0.7.0; +const ballotTest = `pragma solidity >=0.4.22 <0.8.0; import "remix_tests.sol"; // this import is automatically injected by Remix. import "../3_Ballot.sol"; diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index f95ae93049..477e513845 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -178,7 +178,7 @@ const sources = [ { 'browser/blah.sol': { content: ` - pragma solidity >=0.4.22 <0.6.0; + pragma solidity >=0.4.22 <0.8.0; contract Kickstarter { @@ -193,7 +193,7 @@ const sources = [ Project[] public projects; - constructor() public { + constructor() { } @@ -236,7 +236,7 @@ const sources = [ { 'browser/locals.sol': { content: ` - pragma solidity ^0.6.0; + pragma solidity ^0.7.0; contract test { function t () public { uint[] memory array = new uint[](150); diff --git a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts index 67c405d30a..28a88d3d22 100644 --- a/apps/remix-ide-e2e/src/tests/signingMessage.test.ts +++ b/apps/remix-ide-e2e/src/tests/signingMessage.test.ts @@ -55,7 +55,7 @@ module.exports = { const sources = [ { 'browser/signMassage.sol': {content: ` - pragma solidity >=0.4.22 <0.7.0; + pragma solidity >=0.4.22 <0.8.0; contract SignMassageTest { function testRecovery(bytes32 h, uint8 v, bytes32 r, bytes32 s) public pure returns (address) { return ecrecover(h, v, r, s); diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 80757def5d..ddd1190080 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -172,7 +172,7 @@ function runTests (browser: NightwatchBrowser) { .pause(500) .scrollAndClick('#runTestsTabRunAction') .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) - .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 7000) + .waitForElementPresent('#solidityUnittestsOutput div[class^="testPass"]', 10000) .assert.containsText('#solidityUnittestsOutput', 'browser/tests/4_Ballot_test.sol') .assert.containsText('#solidityUnittestsOutput', '✓ Check winning proposal') .assert.containsText('#solidityUnittestsOutput', '✓ Check winnin proposal with return value') @@ -183,12 +183,12 @@ const sources = [ { 'browser/simple_storage.sol': { content: ` - pragma solidity >=0.4.22 <0.7.0; + pragma solidity >=0.4.22 <0.8.0; contract SimpleStorage { uint public storedData; - constructor() public { + constructor() { storedData = 100; } @@ -204,7 +204,7 @@ const sources = [ }, 'browser/tests/simple_storage_test.sol': { content: ` - pragma solidity >=0.4.22 <0.7.0; + pragma solidity >=0.4.22 <0.8.0; import "remix_tests.sol"; import "../simple_storage.sol"; @@ -233,7 +233,7 @@ const sources = [ }, 'browser/ks2a.sol': { content: ` - pragma solidity >=0.4.22 <0.6.0; + pragma solidity >=0.4.22 <0.8.0; contract Kickstarter { enum State { Started, Completed } @@ -246,14 +246,14 @@ const sources = [ State state; mapping(address => uint) funders; // added } - + uint numProjects; Project[] public projects; - constructor() public { + constructor() { } function createProject(string memory name, uint goal) public { - projects.length++; // new line + projects.push(); // new line Project storage project = projects[projects.length - 1]; project.name = name; project.goal = goal; @@ -287,7 +287,7 @@ const sources = [ }, 'browser/tests/ks2b_test.sol': { content: ` - pragma solidity >=0.4.22 <0.6.0; + pragma solidity >=0.4.22 <0.8.0; pragma experimental ABIEncoderV2; import "remix_tests.sol"; // this import is automatically injected by Remix. @@ -336,7 +336,7 @@ const sources = [ } function checkProjectIsFundable () public { - kickstarter.fundProject.value(120000)(0); + kickstarter.fundProject{value:120000}(0); (address owner, string memory name, uint goal, uint fundsAvailable, uint amountContributed, Kickstarter.State state) = kickstarter.projects(0); Assert.equal(amountContributed, 120000, "contributed amount is incorrect"); } @@ -357,10 +357,10 @@ const sources = [ }, 'browser/tests/deployError_test.sol': { content: ` - pragma solidity ^0.6.0; + pragma solidity ^0.8.0; contract failingDeploy { - constructor() public { + constructor() { revert('Deploy Failed'); } } @@ -368,7 +368,7 @@ const sources = [ }, 'browser/tests/methodFailure_test.sol': { content: ` - pragma solidity ^0.6.0; + pragma solidity ^0.8.0; contract methodfailure { function add(uint a, uint b) public { diff --git a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts index c7c37043d2..9e4fcbdead 100644 --- a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts +++ b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts @@ -6,7 +6,7 @@ import sauce from './sauce' const sources = [ { 'browser/Untitled.sol': {content: ` -pragma solidity >=0.4.22 <0.6.0; +pragma solidity >=0.4.22 <0.8.0; contract test1 { address test = tx.origin; } contract test2 {} contract TooMuchGas { diff --git a/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts b/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts index d5dc8f52cd..f909863f67 100644 --- a/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts +++ b/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts @@ -5,14 +5,14 @@ import sauce from './sauce' const sources = [ {'browser/basic.sol': { content: - `pragma solidity >=0.2.0 <0.7.0; + `pragma solidity >=0.2.0 <0.8.0; /** * @title Basic contract */ contract Basic { uint someVar; - constructor() public {} + constructor() {} }` }} ] diff --git a/apps/remix-ide/src/app/tabs/testTab/testTab.js b/apps/remix-ide/src/app/tabs/testTab/testTab.js index 964b431337..f0a7399811 100644 --- a/apps/remix-ide/src/app/tabs/testTab/testTab.js +++ b/apps/remix-ide/src/app/tabs/testTab/testTab.js @@ -63,7 +63,7 @@ class TestTabLogic { let relative = remixPath.relative(this.currentPath, remixPath.dirname(fileToImport)) if (relative === '') relative = '.' const comment = hasCurrent ? `import "${relative}/${remixPath.basename(fileToImport)}";` : '// Import here the file to test.' - return `pragma solidity >=0.4.22 <0.7.0; + return `pragma solidity >=0.4.22 <0.8.0; import "remix_tests.sol"; // this import is automatically injected by Remix. ${comment} diff --git a/libs/remix-debug/test/debugger.js b/libs/remix-debug/test/debugger.js index aba3a821db..cd9e723279 100644 --- a/libs/remix-debug/test/debugger.js +++ b/libs/remix-debug/test/debugger.js @@ -8,7 +8,7 @@ var vmCall = require('./vmCall') var Debugger = require('../src/Ethdebugger') var compiler = require('solc') -var ballot = `pragma solidity >=0.4.22 <0.7.0; +var ballot = `pragma solidity >=0.4.22 <0.8.0; /** * @title Ballot @@ -40,7 +40,7 @@ contract Ballot { * @dev Create a new ballot to choose one of 'proposalNames'. * @param proposalNames names of proposals */ - constructor(bytes32[] memory proposalNames) public { + constructor(bytes32[] memory proposalNames) { uint p = 45; chairperson = msg.sender; address addressLocal = msg.sender; // copy of state variable diff --git a/libs/remix-lib/test/txFormat.js b/libs/remix-lib/test/txFormat.js index 9d897d53f4..fc07cd604d 100644 --- a/libs/remix-lib/test/txFormat.js +++ b/libs/remix-lib/test/txFormat.js @@ -376,7 +376,7 @@ const nestedArrayContract = `contract nestedArrayContractTest { } }` -const deploySimpleLib = `pragma solidity >= 0.5.0 < 0.7.0; +const deploySimpleLib = `pragma solidity >= 0.5.0 < 0.8.0; library lib1 { function getEmpty () public { @@ -397,14 +397,14 @@ contract testContractLinkLibrary { } }` -const encodeFunctionCall = `pragma solidity >= 0.5.0 < 0.7.0; +const encodeFunctionCall = `pragma solidity >= 0.5.0 < 0.8.0; contract testContractLinkLibrary { function get (uint _p, string memory _o) public { } }` -const fallbackAndReceiveFunction = `pragma solidity >= 0.5.0 < 0.7.0; +const fallbackAndReceiveFunction = `pragma solidity >= 0.5.0 < 0.8.0; contract fallbackAndReceiveFunctionContract { function get (uint _p, string memory _o) public { diff --git a/libs/remix-tests/sol/tests.sol.ts b/libs/remix-tests/sol/tests.sol.ts index b745399b1a..edbe332a3a 100644 --- a/libs/remix-tests/sol/tests.sol.ts +++ b/libs/remix-tests/sol/tests.sol.ts @@ -1,5 +1,5 @@ module.exports = ` -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; library Assert { diff --git a/libs/remix-tests/tests/examples_1/simple_storage.sol b/libs/remix-tests/tests/examples_1/simple_storage.sol index 402c9b8955..962f48db0d 100644 --- a/libs/remix-tests/tests/examples_1/simple_storage.sol +++ b/libs/remix-tests/tests/examples_1/simple_storage.sol @@ -1,8 +1,8 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract SimpleStorage { uint public storedData; - constructor() public { + constructor() { storedData = 100; } diff --git a/libs/remix-tests/tests/examples_1/simple_storage_test.sol b/libs/remix-tests/tests/examples_1/simple_storage_test.sol index 6e6518c7be..958788563a 100644 --- a/libs/remix-tests/tests/examples_1/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_1/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./simple_storage.sol"; contract MyTest { diff --git a/libs/remix-tests/tests/examples_2/simple_storage.sol b/libs/remix-tests/tests/examples_2/simple_storage.sol index 7ce910b014..7ee2ffdc6d 100644 --- a/libs/remix-tests/tests/examples_2/simple_storage.sol +++ b/libs/remix-tests/tests/examples_2/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract SimpleStorage { uint public storedData; diff --git a/libs/remix-tests/tests/examples_2/simple_storage_test.sol b/libs/remix-tests/tests/examples_2/simple_storage_test.sol index 68efe17ac3..a0c3a0d6ca 100644 --- a/libs/remix-tests/tests/examples_2/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_2/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./simple_storage.sol"; contract MyTest { diff --git a/libs/remix-tests/tests/examples_3/simple_string.sol b/libs/remix-tests/tests/examples_3/simple_string.sol index 6daed1d02a..1bc847f984 100644 --- a/libs/remix-tests/tests/examples_3/simple_string.sol +++ b/libs/remix-tests/tests/examples_3/simple_string.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract SimpleString { string public storedData; diff --git a/libs/remix-tests/tests/examples_3/simple_string_test.sol b/libs/remix-tests/tests/examples_3/simple_string_test.sol index a96582b735..3157f53c35 100644 --- a/libs/remix-tests/tests/examples_3/simple_string_test.sol +++ b/libs/remix-tests/tests/examples_3/simple_string_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./simple_string.sol"; contract StringTest { diff --git a/libs/remix-tests/tests/examples_4/SafeMath.sol b/libs/remix-tests/tests/examples_4/SafeMath.sol index 8d262fb1f8..a93aedaf44 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath.sol @@ -1,6 +1,6 @@ // Copyright (c) 2016 Smart Contract Solutions, Inc. -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; /** diff --git a/libs/remix-tests/tests/examples_4/SafeMathProxy.sol b/libs/remix-tests/tests/examples_4/SafeMathProxy.sol index 502f5c2ccf..805c6d9112 100644 --- a/libs/remix-tests/tests/examples_4/SafeMathProxy.sol +++ b/libs/remix-tests/tests/examples_4/SafeMathProxy.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; import "./SafeMath.sol"; /* diff --git a/libs/remix-tests/tests/examples_4/SafeMath_test.sol b/libs/remix-tests/tests/examples_4/SafeMath_test.sol index 72be6b2f17..aa5112dc64 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath_test.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath_test.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.4.22 <0.8.0; import "remix_tests.sol"; import "./SafeMath.sol"; import "./SafeMathProxy.sol"; diff --git a/libs/remix-tests/tests/examples_5/contract/simple_storage.sol b/libs/remix-tests/tests/examples_5/contract/simple_storage.sol index ec8d01ad2c..ebc18f96cc 100644 --- a/libs/remix-tests/tests/examples_5/contract/simple_storage.sol +++ b/libs/remix-tests/tests/examples_5/contract/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "../../examples_4/SafeMath.sol"; import "../lib/EvenOdd.sol"; @@ -7,7 +7,7 @@ contract SimpleStorage is EvenOdd{ using SafeMath for uint256; uint public storedData; - constructor() public { + constructor() { storedData = 100; } diff --git a/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol b/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol index eca275a7a7..a1536375a6 100644 --- a/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol +++ b/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract EvenOdd { diff --git a/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol b/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol index 4f472cf28a..c5ef812a61 100644 --- a/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; import "./../contract/simple_storage.sol"; contract StorageResolveTest { diff --git a/libs/remix-tests/tests/number/number_test.sol b/libs/remix-tests/tests/number/number_test.sol index 9e62d01b9a..3bbfbc14f0 100644 --- a/libs/remix-tests/tests/number/number_test.sol +++ b/libs/remix-tests/tests/number/number_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.7.0; +pragma solidity >= 0.5.0 < 0.8.0; contract IntegerTest { From 21a208e6f0df27ece91b60f66af75210da12c4f6 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Fri, 23 Oct 2020 19:50:24 +0530 Subject: [PATCH 08/15] libs test fixed --- libs/remix-debug/test/debugger.js | 4 ++-- libs/remix-lib/test/txFormat.js | 6 +++--- libs/remix-tests/tests/examples_1/simple_storage.sol | 4 ++-- libs/remix-tests/tests/examples_1/simple_storage_test.sol | 2 +- libs/remix-tests/tests/examples_2/simple_storage.sol | 2 +- libs/remix-tests/tests/examples_2/simple_storage_test.sol | 2 +- libs/remix-tests/tests/examples_3/simple_string.sol | 2 +- libs/remix-tests/tests/examples_3/simple_string_test.sol | 2 +- libs/remix-tests/tests/examples_4/SafeMath.sol | 2 +- libs/remix-tests/tests/examples_4/SafeMathProxy.sol | 2 +- libs/remix-tests/tests/examples_4/SafeMath_test.sol | 2 +- .../tests/examples_5/contract/simple_storage.sol | 4 ++-- libs/remix-tests/tests/examples_5/lib/EvenOdd.sol | 2 +- .../tests/examples_5/test/simple_storage_test.sol | 2 +- libs/remix-tests/tests/number/number_test.sol | 2 +- 15 files changed, 20 insertions(+), 20 deletions(-) diff --git a/libs/remix-debug/test/debugger.js b/libs/remix-debug/test/debugger.js index cd9e723279..aba3a821db 100644 --- a/libs/remix-debug/test/debugger.js +++ b/libs/remix-debug/test/debugger.js @@ -8,7 +8,7 @@ var vmCall = require('./vmCall') var Debugger = require('../src/Ethdebugger') var compiler = require('solc') -var ballot = `pragma solidity >=0.4.22 <0.8.0; +var ballot = `pragma solidity >=0.4.22 <0.7.0; /** * @title Ballot @@ -40,7 +40,7 @@ contract Ballot { * @dev Create a new ballot to choose one of 'proposalNames'. * @param proposalNames names of proposals */ - constructor(bytes32[] memory proposalNames) { + constructor(bytes32[] memory proposalNames) public { uint p = 45; chairperson = msg.sender; address addressLocal = msg.sender; // copy of state variable diff --git a/libs/remix-lib/test/txFormat.js b/libs/remix-lib/test/txFormat.js index fc07cd604d..9d897d53f4 100644 --- a/libs/remix-lib/test/txFormat.js +++ b/libs/remix-lib/test/txFormat.js @@ -376,7 +376,7 @@ const nestedArrayContract = `contract nestedArrayContractTest { } }` -const deploySimpleLib = `pragma solidity >= 0.5.0 < 0.8.0; +const deploySimpleLib = `pragma solidity >= 0.5.0 < 0.7.0; library lib1 { function getEmpty () public { @@ -397,14 +397,14 @@ contract testContractLinkLibrary { } }` -const encodeFunctionCall = `pragma solidity >= 0.5.0 < 0.8.0; +const encodeFunctionCall = `pragma solidity >= 0.5.0 < 0.7.0; contract testContractLinkLibrary { function get (uint _p, string memory _o) public { } }` -const fallbackAndReceiveFunction = `pragma solidity >= 0.5.0 < 0.8.0; +const fallbackAndReceiveFunction = `pragma solidity >= 0.5.0 < 0.7.0; contract fallbackAndReceiveFunctionContract { function get (uint _p, string memory _o) public { diff --git a/libs/remix-tests/tests/examples_1/simple_storage.sol b/libs/remix-tests/tests/examples_1/simple_storage.sol index 962f48db0d..402c9b8955 100644 --- a/libs/remix-tests/tests/examples_1/simple_storage.sol +++ b/libs/remix-tests/tests/examples_1/simple_storage.sol @@ -1,8 +1,8 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; contract SimpleStorage { uint public storedData; - constructor() { + constructor() public { storedData = 100; } diff --git a/libs/remix-tests/tests/examples_1/simple_storage_test.sol b/libs/remix-tests/tests/examples_1/simple_storage_test.sol index 958788563a..6e6518c7be 100644 --- a/libs/remix-tests/tests/examples_1/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_1/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; import "./simple_storage.sol"; contract MyTest { diff --git a/libs/remix-tests/tests/examples_2/simple_storage.sol b/libs/remix-tests/tests/examples_2/simple_storage.sol index 7ee2ffdc6d..7ce910b014 100644 --- a/libs/remix-tests/tests/examples_2/simple_storage.sol +++ b/libs/remix-tests/tests/examples_2/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; contract SimpleStorage { uint public storedData; diff --git a/libs/remix-tests/tests/examples_2/simple_storage_test.sol b/libs/remix-tests/tests/examples_2/simple_storage_test.sol index a0c3a0d6ca..68efe17ac3 100644 --- a/libs/remix-tests/tests/examples_2/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_2/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; import "./simple_storage.sol"; contract MyTest { diff --git a/libs/remix-tests/tests/examples_3/simple_string.sol b/libs/remix-tests/tests/examples_3/simple_string.sol index 1bc847f984..6daed1d02a 100644 --- a/libs/remix-tests/tests/examples_3/simple_string.sol +++ b/libs/remix-tests/tests/examples_3/simple_string.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; contract SimpleString { string public storedData; diff --git a/libs/remix-tests/tests/examples_3/simple_string_test.sol b/libs/remix-tests/tests/examples_3/simple_string_test.sol index 3157f53c35..a96582b735 100644 --- a/libs/remix-tests/tests/examples_3/simple_string_test.sol +++ b/libs/remix-tests/tests/examples_3/simple_string_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; import "./simple_string.sol"; contract StringTest { diff --git a/libs/remix-tests/tests/examples_4/SafeMath.sol b/libs/remix-tests/tests/examples_4/SafeMath.sol index a93aedaf44..8d262fb1f8 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath.sol @@ -1,6 +1,6 @@ // Copyright (c) 2016 Smart Contract Solutions, Inc. -pragma solidity >=0.4.22 <0.8.0; +pragma solidity >=0.4.22 <0.7.0; /** diff --git a/libs/remix-tests/tests/examples_4/SafeMathProxy.sol b/libs/remix-tests/tests/examples_4/SafeMathProxy.sol index 805c6d9112..502f5c2ccf 100644 --- a/libs/remix-tests/tests/examples_4/SafeMathProxy.sol +++ b/libs/remix-tests/tests/examples_4/SafeMathProxy.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.22 <0.8.0; +pragma solidity >=0.4.22 <0.7.0; import "./SafeMath.sol"; /* diff --git a/libs/remix-tests/tests/examples_4/SafeMath_test.sol b/libs/remix-tests/tests/examples_4/SafeMath_test.sol index aa5112dc64..72be6b2f17 100644 --- a/libs/remix-tests/tests/examples_4/SafeMath_test.sol +++ b/libs/remix-tests/tests/examples_4/SafeMath_test.sol @@ -1,4 +1,4 @@ -pragma solidity >=0.4.22 <0.8.0; +pragma solidity >=0.4.22 <0.7.0; import "remix_tests.sol"; import "./SafeMath.sol"; import "./SafeMathProxy.sol"; diff --git a/libs/remix-tests/tests/examples_5/contract/simple_storage.sol b/libs/remix-tests/tests/examples_5/contract/simple_storage.sol index ebc18f96cc..ec8d01ad2c 100644 --- a/libs/remix-tests/tests/examples_5/contract/simple_storage.sol +++ b/libs/remix-tests/tests/examples_5/contract/simple_storage.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; import "../../examples_4/SafeMath.sol"; import "../lib/EvenOdd.sol"; @@ -7,7 +7,7 @@ contract SimpleStorage is EvenOdd{ using SafeMath for uint256; uint public storedData; - constructor() { + constructor() public { storedData = 100; } diff --git a/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol b/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol index a1536375a6..eca275a7a7 100644 --- a/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol +++ b/libs/remix-tests/tests/examples_5/lib/EvenOdd.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; contract EvenOdd { diff --git a/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol b/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol index c5ef812a61..4f472cf28a 100644 --- a/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol +++ b/libs/remix-tests/tests/examples_5/test/simple_storage_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; import "./../contract/simple_storage.sol"; contract StorageResolveTest { diff --git a/libs/remix-tests/tests/number/number_test.sol b/libs/remix-tests/tests/number/number_test.sol index 3bbfbc14f0..9e62d01b9a 100644 --- a/libs/remix-tests/tests/number/number_test.sol +++ b/libs/remix-tests/tests/number/number_test.sol @@ -1,4 +1,4 @@ -pragma solidity >= 0.5.0 < 0.8.0; +pragma solidity >= 0.5.0 < 0.7.0; contract IntegerTest { From eda4c5be2af55cbe266bb4ec6b0a241eff1acb6d Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 14:32:08 +0530 Subject: [PATCH 09/15] range updated for contracts --- apps/remix-ide-e2e/src/examples/example-contracts.ts | 8 ++++---- apps/remix-ide-e2e/src/tests/debugger.test.ts | 4 ++-- apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts | 2 +- apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts | 4 ++-- apps/remix-ide/src/app/editor/example-contracts.js | 8 ++++---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/remix-ide-e2e/src/examples/example-contracts.ts b/apps/remix-ide-e2e/src/examples/example-contracts.ts index aa2904d7d5..a02bf6d608 100644 --- a/apps/remix-ide-e2e/src/examples/example-contracts.ts +++ b/apps/remix-ide-e2e/src/examples/example-contracts.ts @@ -1,6 +1,6 @@ 'use strict' -const storage = `pragma solidity >=0.4.22 <0.8.0; +const storage = `pragma solidity >=0.7.0 <0.8.0; /** * @title Storage @@ -27,7 +27,7 @@ contract Storage { } }` -const owner = `pragma solidity >=0.4.22 <0.8.0; +const owner = `pragma solidity >=0.7.0 <0.8.0; /** * @title Owner @@ -77,7 +77,7 @@ contract Owner { } }` -const ballot = `pragma solidity >=0.4.22 <0.8.0; +const ballot = `pragma solidity >=0.7.0 <0.8.0; /** * @title Ballot @@ -215,7 +215,7 @@ contract Ballot { } ` -const ballot_0_4_11 = `pragma solidity >=0.4.10 <0.8.0; +const ballot_0_4_11 = `pragma solidity >=0.4.10 <0.7.0; contract Ballot { struct Voter { diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 477e513845..fe9204348d 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -178,7 +178,7 @@ const sources = [ { 'browser/blah.sol': { content: ` - pragma solidity >=0.4.22 <0.8.0; + pragma solidity >=0.4.22 <0.7.0; contract Kickstarter { @@ -193,7 +193,7 @@ const sources = [ Project[] public projects; - constructor() { + constructor() public { } diff --git a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts index 9e4fcbdead..f07fc59e5d 100644 --- a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts +++ b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts @@ -6,7 +6,7 @@ import sauce from './sauce' const sources = [ { 'browser/Untitled.sol': {content: ` -pragma solidity >=0.4.22 <0.8.0; +pragma solidity >=0.4.22 <0.7.0; contract test1 { address test = tx.origin; } contract test2 {} contract TooMuchGas { diff --git a/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts b/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts index f909863f67..d5dc8f52cd 100644 --- a/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts +++ b/apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts @@ -5,14 +5,14 @@ import sauce from './sauce' const sources = [ {'browser/basic.sol': { content: - `pragma solidity >=0.2.0 <0.8.0; + `pragma solidity >=0.2.0 <0.7.0; /** * @title Basic contract */ contract Basic { uint someVar; - constructor() {} + constructor() public {} }` }} ] diff --git a/apps/remix-ide/src/app/editor/example-contracts.js b/apps/remix-ide/src/app/editor/example-contracts.js index b47928fa2e..bbf637f8e4 100644 --- a/apps/remix-ide/src/app/editor/example-contracts.js +++ b/apps/remix-ide/src/app/editor/example-contracts.js @@ -1,6 +1,6 @@ 'use strict' -const storage = `pragma solidity >=0.4.22 <0.8.0; +const storage = `pragma solidity >=0.7.0 <0.8.0; /** * @title Storage @@ -27,7 +27,7 @@ contract Storage { } }` -const owner = `pragma solidity >=0.4.22 <0.8.0; +const owner = `pragma solidity >=0.7.0 <0.8.0; /** * @title Owner @@ -77,7 +77,7 @@ contract Owner { } }` -const ballot = `pragma solidity >=0.4.22 <0.8.0; +const ballot = `pragma solidity >=0.7.0 <0.8.0; /** * @title Ballot @@ -215,7 +215,7 @@ contract Ballot { } ` -var ballotTest = `pragma solidity >=0.4.22 <0.8.0; +var ballotTest = `pragma solidity >=0.7.0 <0.8.0; import "remix_tests.sol"; // this import is automatically injected by Remix. import "../3_Ballot.sol"; From 5c1c523622264d5f85fc98421cce4e2a3afe45ef Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 14:34:23 +0530 Subject: [PATCH 10/15] unittesting e2e test fix --- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index ddd1190080..7081f0055b 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -90,7 +90,7 @@ module.exports = { .scrollAndClick('*[data-id="testTabRunTestsTabRunAction"]') .pause(5000) .click('*[data-id="testTabRunTestsTabStopAction"]') - .pause(1000) + // .pause(1000) .assert.containsText('*[data-id="testTabRunTestsTabStopAction"]', 'Stopping') .waitForElementPresent('*[data-id="testTabSolidityUnitTestsOutputheader"]', 40000) .assert.containsText('*[data-id="testTabSolidityUnitTestsOutput"]', 'browser/tests/ks2b_test.sol') From 1d2862f81842a67c9dc21cf492f812389cf4b180 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 14:52:45 +0530 Subject: [PATCH 11/15] e2e test fix --- apps/remix-ide-e2e/src/tests/fileManager_api.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts index 88383b409f..ea48ae6f47 100644 --- a/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts +++ b/apps/remix-ide-e2e/src/tests/fileManager_api.test.ts @@ -55,7 +55,7 @@ module.exports = { .addFile('copyFile.js', { content: executeCopyFile }) .executeScript(`remix.exeCurrent()`) .pause(2000) - .journalLastChildIncludes('pragma solidity >=0.4.22 <0.8.0;') + .journalLastChildIncludes('pragma solidity >=0.7.0 <0.8.0;') }, 'Should execute `rename` api from file manager external api': function (browser: NightwatchBrowser) { From e344488d899852cd7315c8e8facab93e5722606e Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 17:09:21 +0530 Subject: [PATCH 12/15] more e2e tests fixed --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 6 +++--- apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts | 6 +++--- apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index fe9204348d..cdde3de806 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -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)"]') + .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 35000) .click('*[title="Deploy - transact (not payable)"]') .debugTransaction(0) .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') @@ -178,7 +178,7 @@ const sources = [ { 'browser/blah.sol': { content: ` - pragma solidity >=0.4.22 <0.7.0; + pragma solidity >=0.7.0 <0.8.0; contract Kickstarter { @@ -193,7 +193,7 @@ const sources = [ Project[] public projects; - constructor() public { + constructor() { } diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts index 7081f0055b..512c00a1bd 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts @@ -346,7 +346,7 @@ const sources = [ }, 'browser/compilationError_test.sol': { content: ` - pragma solidity ^0.6.1; + pragma solidity ^0.7.0; contract failOnCompilation { fallback() { @@ -357,7 +357,7 @@ const sources = [ }, 'browser/tests/deployError_test.sol': { content: ` - pragma solidity ^0.8.0; + pragma solidity ^0.7.0; contract failingDeploy { constructor() { @@ -368,7 +368,7 @@ const sources = [ }, 'browser/tests/methodFailure_test.sol': { content: ` - pragma solidity ^0.8.0; + pragma solidity ^0.7.0; contract methodfailure { function add(uint a, uint b) public { diff --git a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts index f07fc59e5d..cf8750f159 100644 --- a/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts +++ b/apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts @@ -6,12 +6,12 @@ import sauce from './sauce' const sources = [ { 'browser/Untitled.sol': {content: ` -pragma solidity >=0.4.22 <0.7.0; +pragma solidity >=0.6.0 <0.8.0; contract test1 { address test = tx.origin; } contract test2 {} contract TooMuchGas { uint x; - function() external { + fallback() external { x++; uint test; uint test1; @@ -36,6 +36,7 @@ function runTests (browser: NightwatchBrowser) { browser .waitForElementVisible('#icon-panel', 10000) .clickLaunchIcon('solidity') + .pause(10000) .testContracts('Untitled.sol', sources[0]['browser/Untitled.sol'], ['TooMuchGas', 'test1', 'test2']) .clickLaunchIcon('solidityStaticAnalysis') .click('#staticanalysisView button') From 8387ead465ec109db77bf8654d523a9f41089c9d Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 18:19:24 +0530 Subject: [PATCH 13/15] debugger tests fixed --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index cdde3de806..e013d7970e 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -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)"]', 35000) + .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 45000) .click('*[title="Deploy - transact (not payable)"]') .debugTransaction(0) .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'DEBUGGER') @@ -43,7 +43,7 @@ module.exports = { .click('*[data-id="slider"]') .setValue('*[data-id="slider"]', '50') .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n91') }, 'Should step back and forward transaction': function (browser: NightwatchBrowser) { @@ -51,12 +51,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:\n90') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n90') .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:\n91') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91') }, 'Should jump through breakpoints': function (browser: NightwatchBrowser) { @@ -78,8 +78,10 @@ module.exports = { browser .clickLaunchIcon('solidity') .setSolidityCompilerVersion('soljson-v0.6.12+commit.27d51765.js') - .clickLaunchIcon('udapp') + .pause(2000) + .clickLaunchIcon('udapp') .testContracts('externalImport.sol', sources[1]['browser/externalImport.sol'], ['ERC20']) + .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 35000) .selectContract('ERC20') .createContract('"tokenName", "symbol"') .debugTransaction(2) @@ -135,6 +137,7 @@ module.exports = { browser.addFile('locals.sol', sources[3]['browser/locals.sol']) .clickLaunchIcon('udapp') .createContract('') + .pause(2000) .clickInstance(3) .clickFunction('t - transact (not payable)') .pause(2000) @@ -154,7 +157,8 @@ module.exports = { browser .clickLaunchIcon('solidity') .setSolidityCompilerVersion('soljson-v0.7.2+commit.51b20bc0.js') - .clickLaunchIcon('udapp') + .clickLaunchIcon('udapp') + .pause(2000) .testContracts('withGeneratedSources.sol', sources[4]['browser/withGeneratedSources.sol'], ['A']) .createContract('') .clickInstance(4) From 2ffd9a10929ff604e6657d4eb606fa743e1bb221 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 18:37:52 +0530 Subject: [PATCH 14/15] tests fixes --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index e013d7970e..56b1bb1c82 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -43,7 +43,7 @@ module.exports = { .click('*[data-id="slider"]') .setValue('*[data-id="slider"]', '50') .assert.containsText('*[data-id="solidityLocals"]', 'no locals') - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n91') + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') }, 'Should step back and forward transaction': function (browser: NightwatchBrowser) { @@ -51,12 +51,12 @@ module.exports = { .waitForElementPresent('*[data-id="buttonNavigatorIntoBack"]') .scrollAndClick('*[data-id="buttonNavigatorIntoBack"]') .pause(2000) - .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n90') - .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n90') - .click('*[data-id="buttonNavigatorIntoForward"]') - .pause(2000) .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n91') .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n91') + .click('*[data-id="buttonNavigatorIntoForward"]') + .pause(2000) + .assert.containsText('*[data-id="stepdetail"]', 'vm trace step:\n92') + .assert.containsText('*[data-id="stepdetail"]', 'execution step:\n92') }, 'Should jump through breakpoints': function (browser: NightwatchBrowser) { From 8113524024051ead7de483f7d23c1db054d5edf2 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Mon, 26 Oct 2020 18:59:20 +0530 Subject: [PATCH 15/15] added timeout --- apps/remix-ide-e2e/src/tests/debugger.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide-e2e/src/tests/debugger.test.ts b/apps/remix-ide-e2e/src/tests/debugger.test.ts index 56b1bb1c82..93bbae00f2 100644 --- a/apps/remix-ide-e2e/src/tests/debugger.test.ts +++ b/apps/remix-ide-e2e/src/tests/debugger.test.ts @@ -136,6 +136,7 @@ module.exports = { 'Should load more solidity locals array': function (browser: NightwatchBrowser) { browser.addFile('locals.sol', sources[3]['browser/locals.sol']) .clickLaunchIcon('udapp') + .waitForElementPresent('*[title="Deploy - transact (not payable)"]', 40000) .createContract('') .pause(2000) .clickInstance(3)