mirror of
https://github.com/status-im/ens-usernames.git
synced 2025-02-23 07:38:21 +00:00
* trim trailing spaces * update to embark 4.0.2 * bump to solc 0.5.4 * use .selector * use solidity function selector * update to embark 6.0.0 * use mocks instead of "instanceOf" tool+tests fix * update to solidity 0.5.11 * update to solidity 0.5.11 * add spdx license identifiers * update ENS contracts * natspec fix return values
25 lines
670 B
Solidity
25 lines
670 B
Solidity
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
pragma solidity 0.5.11;
|
|
|
|
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, "Unauthorized");
|
|
_;
|
|
}
|
|
|
|
address payable public controller;
|
|
|
|
constructor() internal {
|
|
controller = msg.sender;
|
|
}
|
|
|
|
/// @notice Changes the controller of the contract
|
|
/// @param _newController The new controller of the contract
|
|
function changeController(address payable _newController) public onlyController {
|
|
controller = _newController;
|
|
}
|
|
}
|