transferOwnership
Contract: JBToken
Interface: IJBToken
- Step by step
- Code
- Bug bounty
Transfer ownership of this contract to another address.
Only the owner of this contract can transfer it.
Definition
function transferOwnership(uint256 _projectId, address _newOwner)
public
virtual
override
onlyOwner { ... }
- Arguments:
_projectId
is the ID of the project to which the token belongs. This is ignored._newOwner
is the new owner.
- Through the
onlyOwner
modifier, this function can only be accessed by the address that owns this contract. - The function overrides a function definition from the
IJBToken
interface. - The function returns nothing.
Body
-
Forward the call to the inherited version from
Ownable
.return super.transferOwnership(_newOwner);
Inherited references:
/**
@notice
Transfer ownership of this contract to another address.
@dev
Only the owner of this contract can transfer it.
@param _projectId The ID of the project to which the token belongs. This is ignored.
@param _newOwner The new owner.
*/
function transferOwnership(uint256 _projectId, address _newOwner)
public
virtual
override
onlyOwner
{
_projectId; // Prevents unused var compiler and natspec complaints.
return super.transferOwnership(_newOwner);
}
Category | Description | Reward |
---|---|---|
Optimization | Help make this operation more efficient. | 0.5ETH |
Low severity | Identify a vulnerability in this operation that could lead to an inconvenience for a user of the protocol or for a protocol developer. | 1ETH |
High severity | Identify a vulnerability in this operation that could lead to data corruption or loss of funds. | 5+ETH |