mirror of
https://github.com/Instadapp/InstaContract.git
synced 2024-07-29 22:47:45 +00:00
Minor modifications.
This commit is contained in:
parent
6428bfa76f
commit
0f04dc81d4
|
|
@ -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 */
|
||||||
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user