Files: 0288fd21356a15c8f3f95a9f431bc370405ac46c / contracts / Migrations.sol
498 bytesRaw
1 | pragma solidity ^0.4.4; |
2 | |
3 | |
4 | contract Migrations { |
5 | address public owner; |
6 | uint public last_completed_migration; |
7 | |
8 | modifier restricted() { |
9 | if (msg.sender == owner) |
10 | _; |
11 | } |
12 | |
13 | function Migrations() { |
14 | owner = msg.sender; |
15 | } |
16 | |
17 | function setCompleted(uint completed) restricted { |
18 | last_completed_migration = completed; |
19 | } |
20 | |
21 | function upgrade(address new_address) restricted { |
22 | Migrations upgraded = Migrations(new_address); |
23 | upgraded.setCompleted(last_completed_migration); |
24 | } |
25 | } |
26 |
Built with git-ssb-web