KYCRegistry
Inherits: ElaraBase, IKYCRegistry
Title: KYC Registry Contract
Manages KYC approval status for addresses in the Elara protocol
Centralized KYC management with bulk operations support Invariants:
Only authorized accounts can grant or revoke KYC approval via grantKycInBulk and revokeKycInBulk
KYC status changes are properly logged with {KycGranted} and {KycRevoked} events
Zero addresses are rejected in bulk operations via {InvalidAddress} error
Empty arrays are rejected in bulk operations via {EmptyArray} error Upgradeability:
Uses {ElaraBase} for UUPS upgradeability pattern
Initializer must be called exactly once; preserve storage layout for upgrade safety
All upgradeable contracts should inherit from {ElaraBase} to ensure consistent security controls
Note: security-contact: [email protected]
State Variables
isKycApproved
Mapping of addresses to their KYC approval status
Tracks whether an address has been KYC approved for protocol interactions
True indicates the address has passed KYC requirements
False or unset indicates the address is not KYC approved
Status can be granted or revoked by authorized accounts
__gap
Storage gap for future upgrades (EIP-1967)
Functions
initialize
Initializes registry with the AccessManager contract
Security:
Only callable during initialization via {initializer} modifier
Sets up the base contract via {ElaraBase-__ElaraBase_init}
Access control is managed by the {AccessManagedUpgradeable} contract
Parameters
_accessManager
address
Address of the AccessManager contract
grantKycInBulk
Reverts if any address is zero or array is empty. Updates KYC status for all provided addresses.
revokeKycInBulk
Reverts if any address is zero or array is empty. Updates KYC status for all provided addresses.
Events
KYCRegistryInitialized
Emitted when the contract is initialized
Parameters
accessManager
address
Address of the access manager
Last updated
Was this helpful?