Skip to content

L-04: Misleading Documentation Regarding DEFAULT_ADMIN_ROLE #429

@0xisk

Description

@0xisk

Source: OpenZeppelin Midnight - Compact Contracts Audit

Description

The AccessControl contract documents a mechanism to customize the DEFAULT_ADMIN_ROLE, which is used as the default administrator for other roles.

However, the contract does not use the DEFAULT_ADMIN_ROLE in storage. Instead, when there is no explicit admin entry, getRoleAdmin returns a hardcoded constant (all zeros). Any customizations to the DEFAULT_ADMIN_ROLE ledger entry are non-functional and misleading.

Consider removing the DEFAULT_ADMIN_ROLE ledger entry and associated documentation.

Metadata

Metadata

Assignees

Labels

auditIssues reported by an audit

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions