mirror of
https://github.com/status-im/gitpivot.git
synced 2026-08-27 16:41:08 +00:00
25 lines
557 B
Solidity
25 lines
557 B
Solidity
pragma solidity ^0.4.4;
|
|
|
|
|
|
contract Migrations {
|
|
address public owner;
|
|
uint public last_completed_migration;
|
|
|
|
modifier restricted() {
|
|
if (msg.sender == owner) _;
|
|
}
|
|
|
|
function Migrations() public {
|
|
owner = msg.sender;
|
|
}
|
|
|
|
function setCompleted(uint _completed) public restricted {
|
|
last_completed_migration = _completed;
|
|
}
|
|
|
|
function upgrade(address _newAddress) public restricted {
|
|
Migrations upgraded = Migrations(_newAddress);
|
|
upgraded.setCompleted(last_completed_migration);
|
|
}
|
|
}
|