Skip to main content

SecurityHolders

Asset Tokenization Studio Team

SecurityHolders

Abstract contract implementing token-holder enumeration queries for the Diamond-based token system.

Delegates reader methods to ERC1410StorageWrapper and is intended to be inherited by SecurityHoldersFacet.

Methods​

getSecurityHolders​

function getSecurityHolders(uint256 _pageIndex, uint256 _pageLength) external view returns (address[] holders)

Gets the security holders (paginated)

Parameters​

NameTypeDescription
_pageIndexuint256The page index for pagination
_pageLengthuint256The number of items per page

Returns​

NameTypeDescription
holdersaddress[]Array of security holder addresses

getTotalSecurityHolders​

function getTotalSecurityHolders() external view returns (uint256 count)

Gets the total number of security holders

Returns​

NameTypeDescription
countuint256Total number of security holders

initializeSecurityHolders​

function initializeSecurityHolders() external nonpayable

Initialises the security-holders capability on the token.

Callable once; subsequent calls revert with FacetAlreadyRegistered. Requires DEFAULT_ADMIN_ROLE. Called by the factory during deployment.

Events​

SecurityHoldersInitialized​

event SecurityHoldersInitialized()

Emitted once when the security-holders capability is initialised on a token.

Fires exclusively from initializeSecurityHolders.

Errors​

AccountHasNoRole​

error AccountHasNoRole(address account, bytes32 role)

Thrown when an account does not hold a required role.

Parameters​

NameTypeDescription
accountaddressThe account that lacks the role.
rolebytes32The role that is not held.

FacetAlreadyRegistered​

error FacetAlreadyRegistered(bytes32 facetId, uint256 lastVersion)

Raised when an initialiser tries to register a facet that already has a non-zero last registered version (i.e. the facet is being re-initialised on a fresh install).

Parameters​

NameTypeDescription
facetIdbytes32Identifier of the offending facet.
lastVersionuint256Last version recorded for that facet at the time of the check.

UnrecognizedResolverProxyVersion​

error UnrecognizedResolverProxyVersion(bytes8 _resolverProxyVersion)

Thrown when the provided proxy version does not match any BLR compatible standard.

Parameters​

NameTypeDescription
_resolverProxyVersionbytes8proxy version that is not compatible with the BLR.

WalletRecovered​

error WalletRecovered()

Thrown when attempting to recover a wallet that has already been recovered.