-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathITIP20RolesAuth.sol
More file actions
20 lines (17 loc) · 997 Bytes
/
ITIP20RolesAuth.sol
File metadata and controls
20 lines (17 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.13 <0.9.0;
interface ITIP20RolesAuthErr {
/// @notice Thrown when the caller lacks the required role for the requested action
error Unauthorized();
}
/// @title The interface for interacting with TIP-20 token authorization-related features.
interface ITIP20RolesAuth is ITIP20RolesAuthErr {
event RoleMembershipUpdated(bytes32 indexed role, address indexed account, address indexed sender, bool hasRole);
event RoleAdminUpdated(bytes32 indexed role, bytes32 indexed newAdminRole, address indexed sender);
function hasRole(address account, bytes32 role) external view returns (bool);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function renounceRole(bytes32 role) external;
function setRoleAdmin(bytes32 role, bytes32 adminRole) external;
}