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
ba6bbd85
Commit
ba6bbd85
authored
Apr 16, 2018
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove no longer needed files
parent
6b2270d5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
191 deletions
+0
-191
simple_storage.sol
examples2/simple_storage.sol
+0
-17
simple_storage2_test.sol
examples2/simple_storage2_test.sol
+0
-26
simple_storage_test.sol
examples2/simple_storage_test.sol
+0
-44
mytest.sol
mytest.sol
+0
-20
test.js
test.js
+0
-62
test.sol
test.sol
+0
-22
No files found.
examples2/simple_storage.sol
deleted
100644 → 0
View file @
6b2270d5
pragma solidity ^0.4.7;
contract SimpleStorage {
uint public storedData;
function SimpleStorage() public {
storedData = 100;
}
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint retVal) {
return storedData;
}
}
examples2/simple_storage2_test.sol
deleted
100644 → 0
View file @
6b2270d5
pragma solidity ^0.4.7;
import "./tests.sol";
import "./simple_storage.sol";
contract MyTest2 {
SimpleStorage foo;
uint i = 0;
function beforeEach() {
foo = new SimpleStorage();
//if (i == 1) {
// foo.set(200);
//}
//i += 1;
}
function initialValueShouldBe100() public constant returns (bool) {
return Assert.equal(foo.get(), 100, "initial value is not correct");
//return foo.get() == 100;
}
//function initialValueShouldBe200() public constant returns (bool) {
// return Assert.equal(foo.get(), 200, "initial value is not correct");
//}
}
examples2/simple_storage_test.sol
deleted
100644 → 0
View file @
6b2270d5
pragma solidity ^0.4.7;
import "./tests.sol";
import "./simple_storage.sol";
//contract MyTest {
// SimpleStorage foo;
//
// function beforeAll() {
// foo = new SimpleStorage();
// }
//
// function initialValueShouldBe100() public {
// Assert.equal(foo.get(), 100, "initial value is not correct");
// }
//
// function initialValueShouldBe200() public {
// Assert.equal(foo.get(), 200, "initial value is not correct");
// }
//
//}
contract MyTest {
SimpleStorage foo;
uint i = 0;
function beforeEach() {
foo = new SimpleStorage();
//if (i == 1) {
// foo.set(200);
//}
//i += 1;
}
function initialValueShouldBe100() public constant returns (bool) {
return Assert.equal(foo.get(), 100, "initial value is not correct");
}
//function initialValueShouldBe200() public constant returns (bool) {
// return Assert.equal(foo.get(), 200, "initial value is not correct");
//}
}
mytest.sol
deleted
100644 → 0
View file @
6b2270d5
pragma solidity ^0.4.7;
import "./tests.sol";
contract MyTest {
SimpleStorage foo;
function beforeAll() {
foo = new SimpleStorage();
}
function initialValueShouldBe100() public {
Assert.equal(foo.get(), 100, "initial value is not correct");
}
function initialValueShouldBe200() public {
Assert.equal(foo.get(), 200, "initial value is not correct");
}
}
test.js
deleted
100644 → 0
View file @
6b2270d5
var
async
=
require
(
'async'
)
const
Web3
=
require
(
'web3'
)
const
Provider
=
require
(
'./src/provider.js'
)
const
Compiler
=
require
(
'./src/compiler.js'
)
let
web3
=
new
Web3
()
web3
.
setProvider
(
new
Provider
())
let
accounts
=
[];
async
.
waterfall
([
function
compileContract
(
next
)
{
Compiler
.
compileFileOrFiles
(
'test.sol'
,
false
,
next
);
},
function
getAccounts
(
contracts
,
next
)
{
web3
.
eth
.
getAccounts
((
err
,
_accounts
)
=>
{
accounts
=
_accounts
;
next
(
null
,
contracts
);
});
},
function
deployContract
(
contracts
,
next
)
{
let
contract
=
contracts
[
'test.sol'
].
SimpleStorage
;
let
abi
=
contract
.
abi
;
let
code
=
contract
.
evm
.
bytecode
.
object
;
console
.
dir
(
contracts
);
let
contractObject
=
new
web3
.
eth
.
Contract
(
abi
)
let
deployObject
=
contractObject
.
deploy
({
arguments
:
[],
data
:
code
})
deployObject
.
send
({
from
:
accounts
[
0
],
gas
:
1200000
}).
on
(
'receipt'
,
function
(
receipt
)
{
console
.
dir
(
"==== got the receipt"
);
console
.
dir
(
receipt
);
contractObject
.
options
.
address
=
receipt
.
contractAddress
contractObject
.
options
.
from
=
accounts
[
0
]
contractObject
.
options
.
gas
=
5000
*
1000
//next(null, receipt.contractAddress);
next
(
null
,
contractObject
);
})
},
function
callContract
(
contract
,
next
)
{
console
.
dir
(
'=============='
);
console
.
dir
(
contract
);
//contract.methods.storedData().call(console.dir);
//contract.methods.get().call(console.dir);
contract
.
methods
.
set
(
50
).
send
({
from
:
accounts
[
0
]}).
then
(()
=>
{
console
.
dir
(
'value was set'
);
next
(
null
,
contract
);
});
},
function
callContract2
(
contract
,
next
)
{
contract
.
methods
.
get2
().
call
(
console
.
dir
);
next
(
null
,
contract
);
}
],
function
(
err
,
results
)
{
//console.dir(arguments);
});
test.sol
deleted
100644 → 0
View file @
6b2270d5
pragma solidity ^0.4.7;
contract SimpleStorage {
uint public storedData;
function SimpleStorage() public {
storedData = 100;
}
function set(uint x) public {
storedData = x;
}
function get() public view returns (uint retVal) {
return storedData;
}
function get2() public constant returns (bool) {
return storedData != 2;
}
}
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