23 lines
612 B
Solidity
23 lines
612 B
Solidity
|
pragma solidity ^0.4.8;
|
||
|
|
||
|
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;
|
||
|
|
||
|
function Controlled() public {
|
||
|
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;
|
||
|
}
|
||
|
}
|