FunctionalContractRegistry
Source: contracts/core/FunctionalContractRegistry.sol
Functions that change state
Function
Who can call
Also
grantRole(bytes32 role, address account)The role's admin role (
DEFAULT_ADMIN_ROLE unless set otherwise)register(address fc, uint8 kinds)onlyRole(REGISTRAR_ROLE)remove(address fc)onlyRole(REMOVER_ROLE)renounceRole(bytes32 role, address account)Only the account renouncing its own role
revokeRole(bytes32 role, address account)The role's admin role (
DEFAULT_ADMIN_ROLE unless set otherwise)Read functions
Anyone can call these; they change nothing.
Function
Returns
DEFAULT_ADMIN_ROLE()bytes32
getRoleAdmin(bytes32 role)bytes32
hasRole(bytes32 role, address account)bool
isActive(address fc)bool
KIND_COOP_AGENT()uint8
KIND_CUSTODY()uint8
kindOf(address fc)uint8 kinds, bool active
REGISTRAR_ROLE()bytes32
REMOVER_ROLE()bytes32
supportsInterface(bytes4 interfaceId)bool
Events
Event
FunctionalContractRegistered(address fc indexed, uint8 kinds)FunctionalContractRemoved(address fc indexed)RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)Errors
Error
InvalidKinds(uint8 kinds)NotAContract(address account)NotRegistered(address fc)