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
df2fa668
Commit
df2fa668
authored
Oct 22, 2020
by
aniket-engg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts updated
parent
0b59cf9d
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
49 additions
and
49 deletions
+49
-49
example-contracts.ts
apps/remix-ide-e2e/src/examples/example-contracts.ts
+7
-7
debugger.test.ts
apps/remix-ide-e2e/src/tests/debugger.test.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
+13
-13
staticAnalysis.test.ts
apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts
+1
-1
usingWebWorker.test.ts
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
+2
-2
testTab.js
apps/remix-ide/src/app/tabs/testTab/testTab.js
+1
-1
debugger.js
libs/remix-debug/test/debugger.js
+2
-2
txFormat.js
libs/remix-lib/test/txFormat.js
+3
-3
tests.sol.ts
libs/remix-tests/sol/tests.sol.ts
+1
-1
simple_storage.sol
libs/remix-tests/tests/examples_1/simple_storage.sol
+2
-2
simple_storage_test.sol
libs/remix-tests/tests/examples_1/simple_storage_test.sol
+1
-1
simple_storage.sol
libs/remix-tests/tests/examples_2/simple_storage.sol
+1
-1
simple_storage_test.sol
libs/remix-tests/tests/examples_2/simple_storage_test.sol
+1
-1
simple_string.sol
libs/remix-tests/tests/examples_3/simple_string.sol
+1
-1
simple_string_test.sol
libs/remix-tests/tests/examples_3/simple_string_test.sol
+1
-1
SafeMath.sol
libs/remix-tests/tests/examples_4/SafeMath.sol
+1
-1
SafeMathProxy.sol
libs/remix-tests/tests/examples_4/SafeMathProxy.sol
+1
-1
SafeMath_test.sol
libs/remix-tests/tests/examples_4/SafeMath_test.sol
+1
-1
simple_storage.sol
.../remix-tests/tests/examples_5/contract/simple_storage.sol
+2
-2
EvenOdd.sol
libs/remix-tests/tests/examples_5/lib/EvenOdd.sol
+1
-1
simple_storage_test.sol
...remix-tests/tests/examples_5/test/simple_storage_test.sol
+1
-1
number_test.sol
libs/remix-tests/tests/number/number_test.sol
+1
-1
No files found.
apps/remix-ide-e2e/src/examples/example-contracts.ts
View file @
df2fa668
'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";
...
...
apps/remix-ide-e2e/src/tests/debugger.test.ts
View file @
df2fa668
...
...
@@ -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);
...
...
apps/remix-ide-e2e/src/tests/signingMessage.test.ts
View file @
df2fa668
...
...
@@ -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);
...
...
apps/remix-ide-e2e/src/tests/solidityUnittests.test.ts
View file @
df2fa668
...
...
@@ -172,7 +172,7 @@ function runTests (browser: NightwatchBrowser) {
.
pause
(
500
)
.
scrollAndClick
(
'#runTestsTabRunAction'
)
.
waitForElementPresent
(
'*[data-id="testTabSolidityUnitTestsOutputheader"]'
,
40000
)
.
waitForElementPresent
(
'#solidityUnittestsOutput div[class^="testPass"]'
,
7
000
)
.
waitForElementPresent
(
'#solidityUnittestsOutput div[class^="testPass"]'
,
10
000
)
.
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 {
...
...
apps/remix-ide-e2e/src/tests/staticAnalysis.test.ts
View file @
df2fa668
...
...
@@ -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 {
...
...
apps/remix-ide-e2e/src/tests/usingWebWorker.test.ts
View file @
df2fa668
...
...
@@ -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() {}
}`
}}
]
...
...
apps/remix-ide/src/app/tabs/testTab/testTab.js
View file @
df2fa668
...
...
@@ -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
}
...
...
libs/remix-debug/test/debugger.js
View file @
df2fa668
...
...
@@ -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
...
...
libs/remix-lib/test/txFormat.js
View file @
df2fa668
...
...
@@ -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 {
...
...
libs/remix-tests/sol/tests.sol.ts
View file @
df2fa668
module
.
exports
=
`
pragma solidity >=0.4.22 <0.
7
.0;
pragma solidity >=0.4.22 <0.
8
.0;
library Assert {
...
...
libs/remix-tests/tests/examples_1/simple_storage.sol
View file @
df2fa668
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;
}
...
...
libs/remix-tests/tests/examples_1/simple_storage_test.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
import "./simple_storage.sol";
contract MyTest {
...
...
libs/remix-tests/tests/examples_2/simple_storage.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
contract SimpleStorage {
uint public storedData;
...
...
libs/remix-tests/tests/examples_2/simple_storage_test.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
import "./simple_storage.sol";
contract MyTest {
...
...
libs/remix-tests/tests/examples_3/simple_string.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
contract SimpleString {
string public storedData;
...
...
libs/remix-tests/tests/examples_3/simple_string_test.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
import "./simple_string.sol";
contract StringTest {
...
...
libs/remix-tests/tests/examples_4/SafeMath.sol
View file @
df2fa668
// Copyright (c) 2016 Smart Contract Solutions, Inc.
pragma solidity >=0.4.22 <0.
7
.0;
pragma solidity >=0.4.22 <0.
8
.0;
/**
...
...
libs/remix-tests/tests/examples_4/SafeMathProxy.sol
View file @
df2fa668
pragma solidity >=0.4.22 <0.
7
.0;
pragma solidity >=0.4.22 <0.
8
.0;
import "./SafeMath.sol";
/*
...
...
libs/remix-tests/tests/examples_4/SafeMath_test.sol
View file @
df2fa668
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";
...
...
libs/remix-tests/tests/examples_5/contract/simple_storage.sol
View file @
df2fa668
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;
}
...
...
libs/remix-tests/tests/examples_5/lib/EvenOdd.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
contract EvenOdd {
...
...
libs/remix-tests/tests/examples_5/test/simple_storage_test.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
import "./../contract/simple_storage.sol";
contract StorageResolveTest {
...
...
libs/remix-tests/tests/number/number_test.sol
View file @
df2fa668
pragma solidity >= 0.5.0 < 0.
7
.0;
pragma solidity >= 0.5.0 < 0.
8
.0;
contract IntegerTest {
...
...
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