contract owned {
    address public owner;


    //一个判断当前合约调用者是否是创建者的 modifier, 什么是 modifier?你可以理解成 python 的装饰器,具体请看:
    //http://solidity.readthedocs.io/en/develop/structure-of-a-contract.html?highlight=modifiersolidity
 
    modifier onlyOwner {
        require (msg.sender == owner);
        _;
    }

    /**
     * 指派一个新的管理员
     * @param  newOwner address 新的管理员帐户地址
     */
    function transferOwner(address newOwner) onlyOwner public {
        owner = newOwner;
    }
}
/**
 * owned 是一个管理者
 */
function transferOwner(address newOwner) onlyOwner public {
    owner = newOwner;
}

/**
 * 指派一个新的管理员
 * @param  newOwner address 新的管理员帐户地址
 */