contract owned {
    address public owner;

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

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }
    // 实现所有权转移
    function transferOwnership(address newOwner) onlyOwner public {
        owner = newOwner;
    }
}
//构造owned合约
function transferOwnership(address newOwner) onlyOwner public {
    owner = newOwner;
}

// 实现所有权转移