Assessment reports>Nukem Loans>Threat Model>hasRole

Function: hasRole(address account, bytes32 role)

This checks whether the account has a specific role.

Inputs

  • account

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The account whose role is being checked.

  • role

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: The role being checked for the account.

Branches and code coverage (including function calls)

Intended branches

  • Check whether account is the owner or not.

  • If not, check whether the account has the role (as a form of ERC-721 token ID ownership) or not.

Zellic © 2024Back to top ↑