transferOwnership(address) will grantRoles([address], OWNERS_ROLE) and then revokeRoles(msg.caller, OWNERS_ROLE). There is no need to have transferRole() function because normally no one can transfer their own roles unilaterally, except owners. Instead they manage roles under them.
The function renounceOwnership() will simply revokeRoles(getAddresses(OWNERS_ROLE), OWNERS_ROLE) from everyone who has it, including the caller. This function is irreversible. The contract will be ownerless. The trackers should see the appropriate events/logs as from any Ownable interface.
Please rename
isAccountHasRole
tohasRole
, and all calls in our repos to itImplement
Ownable
interface exactly as OpenZeppelin ABI suggests, but semantics are different:owner()
returns the first address in getAddresses(OWNERS_ROLE)isOwner(address)
returns hasRole(address, OWNERS_ROLE)transferOwnership(address)
willgrantRoles([address], OWNERS_ROLE)
and thenrevokeRoles(msg.caller, OWNERS_ROLE)
. There is no need to havetransferRole()
function because normally no one can transfer their own roles unilaterally, except owners. Instead they manage roles under them.renounceOwnership()
will simplyrevokeRoles(getAddresses(OWNERS_ROLE), OWNERS_ROLE)
from everyone who has it, including the caller. This function is irreversible. The contract will be ownerless. The trackers should see the appropriate events/logs as from any Ownable interface.Add
plugins/Users/views/Users/templates/Ownable.abi.json