2018-09-05 22:05:38 -03:00
|
|
|
pragma solidity ^0.4.24;
|
2018-04-23 01:58:58 -03:00
|
|
|
|
|
|
|
contract Controlled {
|
|
|
|
/// @notice The address of the controller is the only address that can call
|
|
|
|
/// a function with this modifier
|
|
|
|
modifier onlyController {
|
|
|
|
require(msg.sender == controller);
|
|
|
|
_;
|
|
|
|
}
|
|
|
|
|
|
|
|
address public controller;
|
|
|
|
|
2018-05-07 23:38:54 -03:00
|
|
|
constructor() internal {
|
2018-04-23 01:58:58 -03:00
|
|
|
controller = msg.sender;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// @notice Changes the controller of the contract
|
|
|
|
/// @param _newController The new controller of the contract
|
|
|
|
function changeController(address _newController) public onlyController {
|
|
|
|
controller = _newController;
|
|
|
|
}
|
|
|
|
}
|