Skip to content

Commit 2940663

Browse files
committed
[update] update all tutorials for truffle 4
1 parent 2a54bf9 commit 2940663

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+67
-13
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pragma solidity ^0.4.4;
2+
3+
contract HelloEthSalon {
4+
string message = "Hello Ethereum Salon!";
5+
6+
function HelloEthSalon() {
7+
// constructor
8+
}
9+
10+
function GetMessage() returns (string) {
11+
return message;
12+
}
13+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
pragma solidity ^0.4.17;
2+
3+
contract Migrations {
4+
address public owner;
5+
uint public last_completed_migration;
6+
7+
modifier restricted() {
8+
if (msg.sender == owner) _;
9+
}
10+
11+
function Migrations() public {
12+
owner = msg.sender;
13+
}
14+
15+
function setCompleted(uint completed) public restricted {
16+
last_completed_migration = completed;
17+
}
18+
19+
function upgrade(address new_address) public restricted {
20+
Migrations upgraded = Migrations(new_address);
21+
upgraded.setCompleted(last_completed_migration);
22+
}
23+
}

01-HelloWorld/truffle-config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
// See <http://truffleframework.com/docs/advanced/configuration>
3+
// to customize your Truffle configuration!
4+
};

01-HelloWorld/truffle.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
// See <http://truffleframework.com/docs/advanced/configuration>
3+
// to customize your Truffle configuration!
4+
};

02-Testing/start/truffle.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)