Skip to content

Commit

Permalink
finish migrating to truffle 4
Browse files Browse the repository at this point in the history
  • Loading branch information
flockonus committed Nov 14, 2017
1 parent d9ac2cd commit ac5ea23
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2,808 deletions.
8 changes: 4 additions & 4 deletions contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.4;
pragma solidity ^0.4.17;

contract Migrations {
address public owner;
Expand All @@ -8,15 +8,15 @@ contract Migrations {
if (msg.sender == owner) _;
}

function Migrations() {
function Migrations() public {
owner = msg.sender;
}

function setCompleted(uint completed) restricted {
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}

function upgrade(address new_address) restricted {
function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/Random.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ contract Random {
uint256 _seed;

// The upper bound of the number returns is 2^bits - 1
function _bitSlice(uint256 n, uint256 bits, uint256 slot) internal constant returns(uint256) {
function bitSlice(uint256 n, uint256 bits, uint256 slot) public pure returns(uint256) {
uint256 offset = slot * bits;
// mask is made by shifting left an offset number of times
uint256 mask = uint256((2**bits) - 1) << offset;
Expand Down
2 changes: 1 addition & 1 deletion contracts/RandomWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ contract RandomWrapper {
Random random;
uint256 public output;

function RandomWrapper(address randomContractAddress) {
function RandomWrapper(address randomContractAddress) public {
random = Random(randomContractAddress);
}

Expand Down
8 changes: 4 additions & 4 deletions example/contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pragma solidity ^0.4.4;
pragma solidity ^0.4.17;

contract Migrations {
address public owner;
Expand All @@ -8,15 +8,15 @@ contract Migrations {
if (msg.sender == owner) _;
}

function Migrations() {
function Migrations() public {
owner = msg.sender;
}

function setCompleted(uint completed) restricted {
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}

function upgrade(address new_address) restricted {
function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
}
Expand Down
Loading

0 comments on commit ac5ea23

Please sign in to comment.