solidity/test/compilationTests/zeppelin/lifecycle/Migrations.sol

22 lines
544 B
Solidity
Raw Normal View History

2017-07-05 10:28:15 +00:00
pragma solidity ^0.4.11;
import '../ownership/Ownable.sol';
/**
* @title Migrations
* @dev This is a truffle contract, needed for truffle integration, not meant for use by Zeppelin users.
*/
contract Migrations is Ownable {
uint256 public lastCompletedMigration;
2018-07-04 17:20:51 +00:00
function setCompleted(uint256 completed) public onlyOwner {
2017-07-05 10:28:15 +00:00
lastCompletedMigration = completed;
}
2018-07-04 17:20:51 +00:00
function upgrade(address newAddress) public onlyOwner {
2017-07-05 10:28:15 +00:00
Migrations upgraded = Migrations(newAddress);
upgraded.setCompleted(lastCompletedMigration);
}
}