roberts / standard

Drew Roberts Contract Standard for ERC-20 Tokens
https://DrewRoberts.com
MIT License
0 stars 1 forks source link

transferOwnership() Function #14

Open drewroberts opened 8 months ago

drewroberts commented 8 months ago

This function transfers the contract to another owner address.

drewroberts commented 8 months ago

Here is that function in my old contract standard:

    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(
            newOwner != address(0),
            "Ownable: new owner is the zero address"
        );
        _transferOwnership(newOwner);
    }