contract owned {

    address public owner;

    constructor() public {
    owner = msg.sender;
    }

    /* modifier是修改标志 */
    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    /* 修改管理员账户， onlyOwner代表只能是用户管理员来修改 */
    function transferOwnership(address newOwner) onlyOwner public {
        owner = newOwner;
    }   
}
/* 创建一个父类， 账户管理员 */
function transferOwnership(address newOwner) onlyOwner public {
    owner = newOwner;
}   

/* 修改管理员账户， onlyOwner代表只能是用户管理员来修改 */