Identity Registry
Overview
The IdentityRegistry
contract manages identity verification, AML/KYC compliance, and accreditation status for token holders. It's used by the RestrictedLockupToken
and TransferRules
contracts to define and enforce transfer restrictions.
Architecture
The IdentityRegistry
maintains identity information for each wallet address, including:
- Regions: Array of integer region identifiers
- AML/KYC Status: Boolean flag indicating whether the wallet has passed AML/KYC verification
- Accreditation Type: An integer indicating the wallet's accreditation status
- Timestamps: Timestamps of the last AML/KYC status change and last accreditation change
Key Features
- Centralized Identity Management: One contract can be reused for multiple instances of the
RestrictedLockupToken
contract - Flexible Identity Updates: Admins can update individual components of identity information
- Event Logging: All identity changes are logged via events for audit trails
- ERC-165 Interface Support: Implements standardized interface detection
- ERC-2771 Support: Compatible with ERC-2771 trusted forwarder
Usage
Identity Information Structure
struct IdentityInfo {
uint256[] regions;
uint256 accreditationType;
uint256 lastAmlKycChangeTimestamp;
uint256 lastAccreditationChangeTimestamp;
bool amlKycPassed;
}
Field Descriptions
regions
: Array of integer region IDs representing the holder's jurisdictionsaccreditationType
: Holder's accreditation typelastAmlKycChangeTimestamp
: Updated when AML/KYC status changes viagrantAmlKyc()
orrevokeAmlKyc()
, supports custom timestamps or defaults toblock.timestamp
lastAccreditationChangeTimestamp
: Updated when accreditation type changes viagrantAccreditation()
orrevokeAccreditation()
, supports custom timestamps or defaults toblock.timestamp
amlKycPassed
: Boolean flag indicating whether the holder has passed AML/KYC verification
AML/KYC Validity Duration
The IdentityRegistry
includes a configurable AML/KYC validity duration system:
- Global Setting:
amlKycValidityDuration
is set during contract deployment and can be updated by Contract Admin - Zero Duration Behavior: When set to
0
, AML/KYC status never expires - Non-Zero Duration: When set to a value > 0, AML/KYC status expires after the specified duration in seconds
- Validity Checking: The
isAmlKycPassed()
function considers both the AML/KYC status flag AND the validity duration - Automatic Expiration: AML/KYC status automatically becomes invalid when
block.timestamp
exceedslastAmlKycChangeTimestamp + amlKycValidityDuration
RestrictedLockupToken
The RestrictedLockupToken
integrates with IdentityRegistry
to enforce compliance-based transfer restrictions:
- Integration Point: The token contract holds a reference to the IdentityRegistry via the
identityRegistry
property - Transfer Validation: During every token transfer, the system validates both sender and recipient AML/KYC status
- Compliance Enforcement: Transfers are automatically blocked if either party fails AML/KYC verification
- Administrative Control: Only Wallets Admin can update identity information
AML/KYC Transfer Validation Flow
Administrative Functions
The IdentityRegistry provides several administrative functions for managing wallet identities:
Function | Description | Access Control |
---|---|---|
setIdentity(owner, info) | Set complete identity information with IdentityInfo struct (supports custom timestamps) | Wallets Admin |
batchSetIdentity(owners[], info) | Set same identity information for multiple wallets | Wallets Admin |
removeIdentity(owner) | Remove all identity information for a wallet | Wallets Admin |
setRegions(owner, regions[]) | Replace entire regions array | Wallets Admin |
addRegion(owner, region) | Add a single region to existing regions | Wallets Admin |
removeRegion(owner, region) | Remove a specific region from regions array | Wallets Admin |
grantAmlKyc(owner, timestamp) | Mark wallet as AML/KYC passed with optional custom timestamp | Wallets Admin |
revokeAmlKyc(owner, timestamp) | Mark wallet as AML/KYC failed with optional custom timestamp | Wallets Admin |
grantAccreditation(owner, level, timestamp) | Set accreditation level with optional custom timestamp | Wallets Admin |
revokeAccreditation(owner, timestamp) | Remove accreditation with optional custom timestamp | Wallets Admin |
setAmlKycValidityDuration(duration) | Set global AML/KYC validity duration in seconds | Contract Admin |
Timestamp Functionality
Custom Timestamp Support
The IdentityRegistry
can be used with both manual and automatic timestamps for the identity changes, supporting the following use cases:
-
Retroactive Data Migration: Import historical compliance data with original timestamps
-
Off-chain Integration: Synchronize with external compliance systems that track verification dates
-
Audit Compliance: Maintain accurate historical records for regulatory reporting and auditing
-
Flexibility: Wallets Admin can choose between automatic timestamping (pass 0) or precise control (provide specific timestamp)
-
setIdentity(owner, info)
: TheIdentityInfo
struct includeslastAmlKycChangeTimestamp
andlastAccreditationChangeTimestamp
fields- When these timestamp fields are non-zero, the contract uses the provided custom timestamps
- When these timestamp fields are 0, the contract automatically sets them to
block.timestamp
-
AML/KYC Functions -
grantAmlKyc(owner, timestamp)
andrevokeAmlKyc(owner, timestamp)
:timestamp
parameter: when non-zero, uses the custom timestamp; when 0, usesblock.timestamp
- Updates the
lastAmlKycChangeTimestamp
field in the wallet's identity record
-
Accreditation Functions -
grantAccreditation(owner, level, timestamp)
andrevokeAccreditation(owner, timestamp)
:timestamp
parameter: when non-zero, uses the custom timestamp; when 0, usesblock.timestamp
- Updates the
lastAccreditationChangeTimestamp
field in the wallet's identity record
Example Usage:
// Using automatic timestamp (current block time)
identityRegistry.grantAmlKyc(walletAddress, 0);
// Using custom timestamp (e.g., when the verification actually occurred off-chain)
uint256 verificationDate = 1640995200; // Jan 1, 2022
identityRegistry.grantAmlKyc(walletAddress, verificationDate);
// Setting identity with mixed timestamp approach
uint256[] memory regions = new uint256[](2);
regions[0] = 840; // United States
regions[1] = 826; // United Kingdom
IdentityInfo memory identity = IdentityInfo({
regions: regions,
accreditationType: 2, // Accredited
lastAmlKycChangeTimestamp: 1640995200, // Custom timestamp
lastAccreditationChangeTimestamp: 0, // Will use block.timestamp
amlKycPassed: true
});
identityRegistry.setIdentity(walletAddress, identity);
Multiple Region Management
The IdentityRegistry supports multiple regions per wallet, enabling support for dual citizenship, cross-border investments, and multi-jurisdictional compliance.
Region Management Functions
Set Complete Regions Array
// Replace entire regions array
uint256[] memory newRegions = new uint256[](3);
newRegions[0] = 840; // United States
newRegions[1] = 826; // United Kingdom
newRegions[2] = 124; // Canada
identityRegistry.setRegions(walletAddress, newRegions);
Add Individual Region
// Add a single region to existing regions
identityRegistry.addRegion(walletAddress, 756); // Switzerland
Remove Individual Region
// Remove a specific region from regions array
identityRegistry.removeRegion(walletAddress, 826); // Remove UK
Query Region Information
// Get all regions for a wallet
uint256[] memory walletRegions = identityRegistry.regions(walletAddress);
// Check if wallet has specific region
bool hasUSRegion = identityRegistry.hasRegion(walletAddress, 840);
Multi-Region Use Cases
Dual Citizenship Scenario
// Investor has both US and Canadian citizenship
uint256[] memory dualCitizenship = new uint256[](2);
dualCitizenship[0] = 840; // United States
dualCitizenship[1] = 124; // Canada
identityRegistry.setRegions(investor, dualCitizenship);
Corporate Entity with Multiple Jurisdictions
// Investment fund operating in multiple regions
uint256[] memory operatingRegions = new uint256[](4);
operatingRegions[0] = 840; // United States
operatingRegions[1] = 826; // United Kingdom
operatingRegions[2] = 276; // Germany
operatingRegions[3] = 392; // Japan
identityRegistry.setRegions(institutionalInvestor, operatingRegions);
Dynamic Region Updates
// Investor relocates and gains new residency
identityRegistry.addRegion(investor, 756); // Add Switzerland
// Later, renounces previous citizenship
identityRegistry.removeRegion(investor, 840); // Remove United States
Region Validation Rules
The contract enforces several validation rules for regions:
- No Empty Arrays:
setRegions()
rejects empty region arrays - No Duplicates: Regions array cannot contain duplicate region IDs
- Maximum Count: Regions array cannot exceed MAX_REGIONS_COUNT (10)
- Existence Checking:
addRegion()
prevents adding regions already present - Removal Validation:
removeRegion()
only removes regions that exist
Error Handling
The contract provides specific error messages for region operations:
// Attempting to add existing region
identityRegistry.addRegion(wallet, 840); // Reverts: IdentityRegistry_WalletAlreadyHasRegion
// Attempting to remove non-existent region
identityRegistry.removeRegion(wallet, 999); // Reverts: IdentityRegistry_WalletDoesNotHaveRegion
// Setting empty regions array
uint256[] memory empty;
identityRegistry.setRegions(wallet, empty); // Reverts: IdentityRegistry_EmptyRegionsArray
Queries
The IdentityRegistry provides comprehensive query functions for accessing identity information:
Function | Description | Returns | Example Usage |
---|---|---|---|
identity(owner) | Get complete identity information | IdentityInfo struct | IdentityInfo memory info = identityRegistry.identity(wallet); |
regions(owner) | Get all regions for a wallet | uint256[] memory | uint256[] memory walletRegions = identityRegistry.regions(wallet); |
hasRegion(owner, region) | Check if wallet has specific region | boolean | bool hasUS = identityRegistry.hasRegion(wallet, 840); |
isAmlKycPassed(owner) | Check AML/KYC status with validity duration | boolean | bool verified = identityRegistry.isAmlKycPassed(wallet); |
accreditationType(owner) | Get accreditation level | uint256 | uint256 level = identityRegistry.accreditationType(wallet); |
amlKycValidityDuration() | Get global AML/KYC validity duration | uint256 | uint256 duration = identityRegistry.amlKycValidityDuration(); |
Complete Identity Information
// Get all identity data at once
IdentityInfo memory info = identityRegistry.identity(walletAddress);
// Access individual fields
uint256[] memory regions = info.regions;
uint256 accreditation = info.accreditationType;
bool amlKycStatus = info.amlKycPassed;
uint256 lastAmlKycChange = info.lastAmlKycChangeTimestamp;
uint256 lastAccreditationChange = info.lastAccreditationChangeTimestamp;
Region-Specific Queries
// Get all regions for a wallet
uint256[] memory allRegions = identityRegistry.regions(walletAddress);
// Check for specific region membership
bool isUSResident = identityRegistry.hasRegion(walletAddress, 840); // United States
bool isEUResident = identityRegistry.hasRegion(walletAddress, 276); // Germany
// Example: Check for multi-jurisdiction compliance
bool canTradeGlobally = identityRegistry.hasRegion(investor, 840) || // US
identityRegistry.hasRegion(investor, 826) || // UK
identityRegistry.hasRegion(investor, 276); // Germany
AML/KYC Status Validation
// Check current AML/KYC status (considers validity duration)
bool isCompliant = identityRegistry.isAmlKycPassed(walletAddress);
// This function performs automatic time-based validation:
// - Returns true only if amlKycPassed == true AND status hasn't expired
// - Expiration calculated as: lastAmlKycChangeTimestamp + amlKycValidityDuration
Accreditation Level Queries
// Get accreditation type
uint256 accredLevel = identityRegistry.accreditationType(walletAddress);
// Common accreditation levels:
// 0 = No accreditation (retail investor)
// 1 = Retail investor
// 2 = Accredited investor
// 3 = Qualified investor
// 4 = Institutional investor
Advanced Query Patterns
Multi-Condition Compliance Checking
function checkInvestorEligibility(address investor) public view returns (bool eligible) {
// Must have AML/KYC approval
if (!identityRegistry.isAmlKycPassed(investor)) return false;
// Must be from allowed region
if (!identityRegistry.hasRegion(investor, 840)) return false; // US only
// Must have minimum accreditation
if (identityRegistry.accreditationType(investor) < 2) return false; // Accredited or higher
return true;
}
Region-Based Token Type Determination
function determineTokenType(address investor) public view returns (uint256 tokenType) {
if (identityRegistry.hasRegion(investor, 840)) {
// US investor - check accreditation
uint256 accreditation = identityRegistry.accreditationType(investor);
return accreditation >= 2 ? 2 : 3; // RegD if accredited, RegCF if retail
} else {
// Non-US investor
return 1; // RegS
}
}
Batch Identity Verification
function batchCheckCompliance(address[] memory investors)
public view returns (bool[] memory results) {
results = new bool[](investors.length);
for (uint256 i = 0; i < investors.length; i++) {
results[i] = identityRegistry.isAmlKycPassed(investors[i]);
}
}
Time-Based Validation Notes
AML/KYC Validity Duration Behavior
- Duration = 0: AML/KYC status never expires (permanent until manually revoked)
- Duration > 0: Status expires after specified seconds from
lastAmlKycChangeTimestamp
- Automatic Expiration:
isAmlKycPassed()
returnsfalse
for expired status even ifamlKycPassed
istrue
Example of Time-Based Validation
// Check validity duration setting
uint256 duration = identityRegistry.amlKycValidityDuration(); // e.g., 31536000 (1 year)
// Get identity info to check timestamps
IdentityInfo memory info = identityRegistry.identity(investor);
// Manual calculation (for reference - the contract does this automatically)
bool isExpired = (duration > 0) &&
(block.timestamp > info.lastAmlKycChangeTimestamp + duration);
// This matches what isAmlKycPassed() returns
bool isValid = info.amlKycPassed && !isExpired;
API Reference
Constructor
constructor(address contractAdmin_, address walletsAdmin_, address trustedForwarder_, uint256 amlKycValidityDuration_)
Initializes the IdentityRegistry contract with admin roles, trusted forwarder, and AML/KYC validity duration.
Parameters:
contractAdmin_
(address): Initial contract administrator addresswalletsAdmin_
(address): Initial wallets administrator addresstrustedForwarder_
(address): ERC-2771 trusted forwarder address for meta-transactionsamlKycValidityDuration_
(uint256): AML/KYC validity duration in seconds (0 = never expires)
Requirements:
- All addresses must be non-zero
- Sets up initial role assignments and AML/KYC validity duration
Constants
INTERFACE_ID() → bytes4
Returns the ERC-165 interface identifier for IIdentityRegistry.
Returns:
bytes4
: The interface identifier
Usage: Used for ERC-165 interface detection
Identity Management Functions
setIdentity(address owner, IdentityInfo info)
Sets complete identity information for a wallet address.
Parameters:
owner
(address): The wallet address to set identity forinfo
(IdentityInfo): Complete identity information struct
IdentityInfo Structure:
struct IdentityInfo {
uint256[] regions; // Array of region identifiers
uint256 accreditationType; // Accreditation level
uint256 lastAmlKycChangeTimestamp; // Timestamp of last AML/KYC change (0 = use block.timestamp)
uint256 lastAccreditationChangeTimestamp; // Timestamp of last accreditation change (0 = use block.timestamp)
bool amlKycPassed; // AML/KYC status flag
}
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Regions array cannot be empty
- Regions array cannot exceed MAX_REGIONS_COUNT (10)
- No duplicate regions allowed
Emits:
IdentityCreated
(if new identity)RegionsSet
(if regions changed)AmlKycPassed
orAmlKycFailed
(if AML/KYC status changed)AccreditationGranted
orAccreditationRevoked
(if accreditation changed)
batchSetIdentity(address[] owners, IdentityInfo info)
Sets the same identity information for multiple wallet addresses.
Parameters:
owners
(address[]): Array of wallet addresses to set identity forinfo
(IdentityInfo): Identity information to apply to all addresses
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Same requirements as
setIdentity
apply to each address
Emits: Same events as setIdentity
for each address processed
removeIdentity(address owner)
Removes all identity information for a wallet address.
Parameters:
owner
(address): The wallet address to remove identity from
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Wallet must have existing identity information
Emits: IdentityRemoved(authority, owner)
Region Management Functions (API)
setRegions(address owner, uint256[] newRegions)
Replaces the entire regions array for a wallet.
Parameters:
owner
(address): The wallet address to update regions fornewRegions
(uint256[]): New array of region identifiers
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Regions array cannot be empty
- Regions array cannot exceed MAX_REGIONS_COUNT (10)
- No duplicate regions allowed
- New regions must be different from current regions
Emits: RegionsSet(authority, owner, newRegions)
addRegion(address owner, uint256 region)
Adds a single region to a wallet's existing regions.
Parameters:
owner
(address): The wallet address to add region toregion
(uint256): The region identifier to add
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Wallet must not already have this region
- Total regions cannot exceed MAX_REGIONS_COUNT (10)
Emits: RegionAdded(authority, owner, region)
removeRegion(address owner, uint256 region)
Removes a specific region from a wallet's regions array.
Parameters:
owner
(address): The wallet address to remove region fromregion
(uint256): The region identifier to remove
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Wallet must currently have this region
Emits: RegionRemoved(authority, owner, region)
AML/KYC Management Functions
grantAmlKyc(address owner, uint256 amlKycTimestamp)
Grants AML/KYC approval to a wallet.
Parameters:
owner
(address): The wallet address to grant AML/KYC toamlKycTimestamp
(uint256): Timestamp for the change (0 = use block.timestamp)
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- AML/KYC status must actually change (not already granted with same timestamp)
Emits: AmlKycPassed(authority, owner, amlKycTimestamp)
revokeAmlKyc(address owner, uint256 amlKycTimestamp)
Revokes AML/KYC approval from a wallet.
Parameters:
owner
(address): The wallet address to revoke AML/KYC fromamlKycTimestamp
(uint256): Timestamp for the change (0 = use block.timestamp)
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- AML/KYC status must actually change (not already revoked with same timestamp)
Emits: AmlKycFailed(authority, owner, amlKycTimestamp)
setAmlKycValidityDuration(uint256 amlKycValidityDuration_)
Sets the global AML/KYC validity duration.
Parameters:
amlKycValidityDuration_
(uint256): New validity duration in seconds (0 = never expires)
Requirements:
- Caller must have CONTRACT_ADMIN_ROLE
- New duration must be different from current duration
Emits: AmlKycValidityDurationSet(authority, oldDuration, newDuration)
Accreditation Management Functions
grantAccreditation(address owner, uint256 _accreditationType, uint256 accreditationTimestamp)
Grants accreditation to a wallet.
Parameters:
owner
(address): The wallet address to grant accreditation to_accreditationType
(uint256): The accreditation type/level to grantaccreditationTimestamp
(uint256): Timestamp for the change (0 = use block.timestamp)
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Accreditation must actually change (not already granted with same level and timestamp)
Emits: AccreditationGranted(authority, owner, newAccreditationLevel, accreditationTimestamp)
revokeAccreditation(address owner, uint256 accreditationTimestamp)
Revokes accreditation from a wallet (sets to NO_ACCREDITATION = 0).
Parameters:
owner
(address): The wallet address to revoke accreditation fromaccreditationTimestamp
(uint256): Timestamp for the change (0 = use block.timestamp)
Requirements:
- Caller must have WALLETS_ADMIN_ROLE
- Wallet must not already have no accreditation
Emits: AccreditationRevoked(authority, owner, revokedAccreditationLevel, accreditationTimestamp)
Query Functions
identity(address owner) → IdentityInfo
Returns complete identity information for a wallet.
Parameters:
owner
(address): The wallet address to query
Returns:
IdentityInfo
: Complete identity information struct
regions(address owner) → uint256[]
Returns all regions for a wallet.
Parameters:
owner
(address): The wallet address to query
Returns:
uint256[]
: Array of region identifiers
hasRegion(address owner, uint256 region) → bool
Checks if a wallet has a specific region.
Parameters:
owner
(address): The wallet address to checkregion
(uint256): The region identifier to check for
Returns:
bool
: True if the wallet has the region
accreditationType(address owner) → uint256
Returns the accreditation type for a wallet.
Parameters:
owner
(address): The wallet address to query
Returns:
uint256
: The accreditation type (0 = no accreditation)
isAmlKycPassed(address owner) → bool
Checks if a wallet has valid AML/KYC approval (considers validity duration).
Parameters:
owner
(address): The wallet address to check
Returns:
bool
: True if AML/KYC is passed and not expired
Logic:
- Returns
true
only ifamlKycPassed == true
AND status hasn't expired - If
amlKycValidityDuration == 0
, status never expires - If
amlKycValidityDuration > 0
, checks iflastAmlKycChangeTimestamp + amlKycValidityDuration >= block.timestamp
amlKycValidityDuration() → uint256
Returns the global AML/KYC validity duration.
Returns:
uint256
: Validity duration in seconds (0 = never expires)
ERC-165 & ERC-2771 Functions
supportsInterface(bytes4 interfaceId) → bool
Checks if the contract supports a specific interface (ERC-165).
Parameters:
interfaceId
(bytes4): The interface identifier to check
Returns:
bool
: True if the interface is supported
isTrustedForwarder(address forwarder) → bool
Checks if an address is the trusted forwarder for meta-transactions.
Parameters:
forwarder
(address): The address to check
Returns:
bool
: True if the address is the trusted forwarder
trustedForwarder() → address
Returns the current trusted forwarder address.
Returns:
address
: The trusted forwarder address
Inherited Access Control Functions
The IdentityRegistry inherits from EasyAccessControl and includes all access control functions:
grantRole(address addr, uint8 role)
revokeRole(address addr, uint8 role)
batchGrantRoles(address[] addresses, uint8[] roles_)
batchRevokeRoles(address[] addresses, uint8[] roles_)
hasRole(address addr, uint8 role) → bool
roles(address addr) → uint8
contractAdminCount() → uint8
- Role constants:
CONTRACT_ADMIN_ROLE()
,WALLETS_ADMIN_ROLE()
, etc.
Events
IdentityCreated(address indexed authority, address indexed owner)
Emitted when a new identity is created for a wallet.
Parameters:
authority
(address, indexed): The address that created the identityowner
(address, indexed): The wallet address that received the identity
IdentityRemoved(address indexed authority, address indexed owner)
Emitted when an identity is completely removed from a wallet.
Parameters:
authority
(address, indexed): The address that removed the identityowner
(address, indexed): The wallet address that lost the identity
RegionsSet(address indexed authority, address indexed owner, uint256[] regions)
Emitted when a wallet's regions array is replaced.
Parameters:
authority
(address, indexed): The address that set the regionsowner
(address, indexed): The wallet address whose regions were setregions
(uint256[]): The new regions array
RegionAdded(address indexed authority, address indexed owner, uint256 region)
Emitted when a single region is added to a wallet.
Parameters:
authority
(address, indexed): The address that added the regionowner
(address, indexed): The wallet address that received the regionregion
(uint256): The region identifier that was added
RegionRemoved(address indexed authority, address indexed owner, uint256 region)
Emitted when a single region is removed from a wallet.
Parameters:
authority
(address, indexed): The address that removed the regionowner
(address, indexed): The wallet address that lost the regionregion
(uint256): The region identifier that was removed
AmlKycPassed(address indexed authority, address indexed owner, uint256 amlKycTimestamp)
Emitted when AML/KYC approval is granted to a wallet.
Parameters:
authority
(address, indexed): The address that granted AML/KYCowner
(address, indexed): The wallet address that received AML/KYC approvalamlKycTimestamp
(uint256): The timestamp of the AML/KYC approval
AmlKycFailed(address indexed authority, address indexed owner, uint256 amlKycTimestamp)
Emitted when AML/KYC approval is revoked from a wallet.
Parameters:
authority
(address, indexed): The address that revoked AML/KYCowner
(address, indexed): The wallet address that lost AML/KYC approvalamlKycTimestamp
(uint256): The timestamp of the AML/KYC revocation
AccreditationGranted(address indexed authority, address indexed owner, uint256 newAccreditationLevel, uint256 accreditationTimestamp)
Emitted when accreditation is granted to a wallet.
Parameters:
authority
(address, indexed): The address that granted accreditationowner
(address, indexed): The wallet address that received accreditationnewAccreditationLevel
(uint256): The accreditation level that was grantedaccreditationTimestamp
(uint256): The timestamp of the accreditation grant
AccreditationRevoked(address indexed authority, address indexed owner, uint256 revokedAccreditationLevel, uint256 accreditationTimestamp)
Emitted when accreditation is revoked from a wallet.
Parameters:
authority
(address, indexed): The address that revoked accreditationowner
(address, indexed): The wallet address that lost accreditationrevokedAccreditationLevel
(uint256): The accreditation level that was revokedaccreditationTimestamp
(uint256): The timestamp of the accreditation revocation
AmlKycValidityDurationSet(address indexed authority, uint256 oldAmlKycValidityDuration, uint256 newAmlKycValidityDuration)
Emitted when the global AML/KYC validity duration is changed.
Parameters:
authority
(address, indexed): The address that changed the validity durationoldAmlKycValidityDuration
(uint256): The previous validity durationnewAmlKycValidityDuration
(uint256): The new validity duration
RoleChange(address indexed grantor, address indexed grantee, uint8 role, bool indexed status)
Emitted when access control roles are granted or revoked (inherited from EasyAccessControl).
Parameters:
grantor
(address, indexed): The address that performed the role changegrantee
(address, indexed): The address that received or lost the rolerole
(uint8): The role that was changedstatus
(bool, indexed): True for grant, false for revoke
Custom Errors
Identity Registry Specific Errors
IdentityRegistry_InvalidContractAdmin()
Thrown when a zero address is provided for contract admin in constructor.
IdentityRegistry_InvalidWalletsAdmin()
Thrown when a zero address is provided for wallets admin in constructor.
IdentityRegistry_InvalidTrustedForwarder()
Thrown when a zero address is provided for trusted forwarder in constructor.
IdentityRegistry_WalletHasNoIdentityToRemove()
Thrown when attempting to remove identity from a wallet that has no identity information.
IdentityRegistry_WalletAlreadyHasSameRegions()
Thrown when attempting to set regions that are identical to current regions.
IdentityRegistry_WalletAlreadyHasRegion()
Thrown when attempting to add a region that the wallet already has.
IdentityRegistry_WalletDoesNotHaveRegion()
Thrown when attempting to remove a region that the wallet doesn't have.
IdentityRegistry_WalletAlreadyHasSameAmlKycStatus()
Thrown when attempting to set AML/KYC status that matches current status and timestamp.
IdentityRegistry_WalletAlreadyHasSameAccreditationLevel()
Thrown when attempting to set accreditation that matches current level and timestamp.
IdentityRegistry_WalletAlreadyHasNoAccreditation()
Thrown when attempting to revoke accreditation from a wallet that already has no accreditation.
IdentityRegistry_AlreadyHasSameAmlKycValidityDuration()
Thrown when attempting to set AML/KYC validity duration to the same value.
IdentityRegistry_EmptyRegionsArray()
Thrown when attempting to set an empty regions array.
IdentityRegistry_InvalidRegion()
Thrown when regions array contains duplicate values.
IdentityRegistry_RegionsExceedsMaxCount()
Thrown when regions array exceeds MAX_REGIONS_COUNT (10).
Inherited Access Control Errors
The IdentityRegistry also includes all EasyAccessControl errors:
EasyAccessControl_AlreadyHasRole()
EasyAccessControl_ArraysMustBeSameLength()
EasyAccessControl_AtLeastOneContractAdminRequired()
EasyAccessControl_CannotRevokeRole()
EasyAccessControl_DoesNotHaveAdminRole(address addr)
EasyAccessControl_DoesNotHaveContractAdminRole(address addr)
EasyAccessControl_DoesNotHaveWalletsAdminRole(address addr)
EasyAccessControl_InvalidRole()
EasyAccessControl_InvalidZeroAddress()