Minor modifications.

This commit is contained in:
Sowmayjain 2018-10-24 22:52:58 +05:30
parent 6428bfa76f
commit 0f04dc81d4
3 changed files with 21 additions and 21 deletions

View File

@ -1,30 +1,29 @@
pragma solidity 0.4.24; pragma solidity 0.4.24;
/* solium-disable mixedcase */ /* solium-disable mixedcase */
contract Migrations { contract Migrations {
address public owner; address public owner;
uint public last_completed_migration; uint public last_completed_migration;
modifier restricted() { modifier restricted() {
if (msg.sender == owner) if (msg.sender == owner)
_; _;
} }
constructor() constructor()
public public
{ {
owner = msg.sender; owner = msg.sender;
} }
function setCompleted(uint completed) public restricted { function setCompleted(uint completed) public restricted {
last_completed_migration = completed; last_completed_migration = completed;
} }
function upgrade(address _newAddress) public restricted { function upgrade(address _newAddress) public restricted {
Migrations upgraded = Migrations(_newAddress); Migrations upgraded = Migrations(_newAddress);
upgraded.setCompleted(last_completed_migration); upgraded.setCompleted(last_completed_migration);
} }
} }
/* solium-enable mixedcase */ /* solium-enable mixedcase */

View File

@ -1,4 +1,4 @@
// Implement the proper governance mechanism to update the addresses // Implement the proper governance mechanism to update the admin address like admin have rights to upgrade anything but not just "admin". Governance will be used to set admin address.
pragma solidity ^0.4.24; pragma solidity ^0.4.24;

View File

@ -74,6 +74,7 @@ contract MoatAsset is AllowedResolver {
} }
// received ether directly from protocols like Kyber Network // received ether directly from protocols like Kyber Network
// emit an event atleast
function () public payable {} function () public payable {}
function Deposit() public payable { function Deposit() public payable {