Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
a555ebc8
Unverified
Commit
a555ebc8
authored
Feb 24, 2021
by
yann300
Committed by
GitHub
Feb 24, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #891 from ethereum/defaultVersion081
default solidity compiler version set to 0.8.1
parents
c01837c7
c1cf2a57
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
52 additions
and
52 deletions
+52
-52
example-contracts.ts
apps/remix-ide-e2e/src/examples/example-contracts.ts
+4
-4
ballot.test.ts
apps/remix-ide-e2e/src/tests/ballot.test.ts
+3
-3
debugger.test.ts
apps/remix-ide-e2e/src/tests/debugger.test.ts
+27
-27
fileManager_api.test.ts
apps/remix-ide-e2e/src/tests/fileManager_api.test.ts
+1
-1
runAndDeploy.ts
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
+3
-3
signingMessage.test.ts
apps/remix-ide-e2e/src/tests/signingMessage.test.ts
+1
-1
solidityUnittests.test.ts
apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
+4
-4
transactionExecution.test.ts
apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
+1
-1
makeMockCompiler.js
apps/remix-ide/ci/makeMockCompiler.js
+1
-1
examples.js
apps/remix-ide/src/app/editor/examples.js
+4
-4
compilerContainer.js
apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
+1
-1
testTab.js
apps/remix-ide/src/app/tabs/testTab/testTab.js
+1
-1
package.json
package.json
+1
-1
No files found.
apps/remix-ide-e2e/src/examples/example-contracts.ts
View file @
a555ebc8
'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";
...
...
apps/remix-ide-e2e/src/tests/ballot.test.ts
View file @
a555ebc8
...
...
@@ -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
)
},
...
...
apps/remix-ide-e2e/src/tests/debugger.test.ts
View file @
a555ebc8
...
...
@@ -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)"]'
,
4
5000
)
.
waitForElementPresent
(
'*[title="Deploy - transact (not payable)"]'
,
6
5000
)
.
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:
\
n
92
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
51
'
)
},
'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:
\
n
91
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n
91
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
50
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n
50
'
)
.
click
(
'*[data-id="buttonNavigatorIntoForward"]'
)
.
pause
(
2000
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
92
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n
92
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
51
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n
51
'
)
},
'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
(
2
000
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
184
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n
184
'
)
.
pause
(
10
000
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
348
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'execution step:
\
n
348
'
)
},
'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
(
3
000
)
.
journalChildIncludes
(
'
{ "gas": "0x2dc6c0", "return": "0x
", "structLogs":'
)
.
pause
(
5
000
)
.
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:
\
n
9
'
)
.
assert
.
containsText
(
'*[data-id="stepdetail"]'
,
'vm trace step:
\
n
154
'
)
.
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', '0xb
175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50
')
const result = await remix.call('debugger', 'getTrace', '0xb
f309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af
')
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', '0xb
175c3c9a9cd6bee3b6cc8be3369a945ac9611516005f8cba27a43486ff2bc50
')
const result = await remix.call('debugger', 'debug', '0xb
f309c0d71579d595f04a42e89d66d1ec17523dd3edea710b03f46a9b82ee0af
')
console.log('result ', result)
} catch (e) {
console.log(e.message)
...
...
apps/remix-ide-e2e/src/tests/fileManager_api.test.ts
View file @
a555ebc8
...
...
@@ -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
)
{
...
...
apps/remix-ide-e2e/src/tests/runAndDeploy.ts
View file @
a555ebc8
...
...
@@ -55,9 +55,9 @@ module.exports = {
.
waitForElementPresent
(
'*[data-id="Deploy - transact (not payable)"]'
,
45000
)
.
click
(
'*[data-id="Deploy - transact (not payable)"]'
)
.
pause
(
5000
)
.
testFunction
(
'0x
82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b
'
,
{
.
testFunction
(
'0x
cc391e151ace69f4cfb51cda42fb6c2e1092f28c8c2757af20b1aae5ec076ead
'
,
{
status
:
'true Transaction mined and execution succeed'
,
'transaction hash'
:
'0x
82f6c88a909b49d6cc003fb302a6e0184c3f08e942b62e1c95dec326d4c6020b
'
'transaction hash'
:
'0x
cc391e151ace69f4cfb51cda42fb6c2e1092f28c8c2757af20b1aae5ec076ead
'
})
},
...
...
@@ -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;
...
...
apps/remix-ide-e2e/src/tests/signingMessage.test.ts
View file @
a555ebc8
...
...
@@ -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);
...
...
apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
View file @
a555ebc8
...
...
@@ -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.
...
...
apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
View file @
a555ebc8
...
...
@@ -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 (byte
s1
_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";
...
...
apps/remix-ide/ci/makeMockCompiler.js
View file @
a555ebc8
...
...
@@ -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
)
=>
{
...
...
apps/remix-ide/src/app/editor/examples.js
View file @
a555ebc8
...
...
@@ -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";
...
...
apps/remix-ide/src/app/tabs/compileTab/compilerContainer.js
View file @
a555ebc8
...
...
@@ -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)
}
}
...
...
apps/remix-ide/src/app/tabs/testTab/testTab.js
View file @
a555ebc8
...
...
@@ -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
}
...
...
package.json
View file @
a555ebc8
...
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment