Skip to main content

SsiManagement

Asset Tokenization Studio Team

SsiManagement

Abstract contract implementing Self-Sovereign Identity (SSI) management logic for a security token, including control of the trusted issuer list and the revocation registry address.

Implements ISsiManagement. All persistent state is delegated to diamond storage via SsiManagementStorageWrapper. Every mutating function is gated by ROLE_SSI_MANAGER and the onlyUnpaused modifier inherited from Modifiers. Intended to be inherited exclusively by SsiManagementFacet.

Methods​

addIssuer​

function addIssuer(address _issuer) external nonpayable returns (bool success_)

Adds an address to the trusted issuer list.

Requires ROLE_SSI_MANAGER and the token to be unpaused. Reverts with ListedIssuer if the address is already listed, or with ZeroAddressNotAllowed if the address is zero. Emits AddedToIssuerList.

Parameters​

NameTypeDescription
_issueraddressAddress of the issuer to add.

Returns​

NameTypeDescription
success_boolTrue if the issuer was added successfully.

getIssuerListCount​

function getIssuerListCount() external view returns (uint256 issuerListCount_)

Returns the total number of addresses in the trusted issuer list.

Returns​

NameTypeDescription
issuerListCount_uint256The current number of listed issuers.

getIssuerListMembers​

function getIssuerListMembers(uint256 _pageIndex, uint256 _pageLength) external view returns (address[] members_)

Returns a paginated slice of the trusted issuer list.

_The list offset is computed as \_pageIndex _ \_pageLength. Returns an empty array when the offset meets or exceeds the list length.*

Parameters​

NameTypeDescription
_pageIndexuint256Zero-based page index.
_pageLengthuint256Maximum number of addresses to return per page.

Returns​

NameTypeDescription
members_address[]Array of issuer addresses for the requested page.

getRevocationRegistryAddress​

function getRevocationRegistryAddress() external view returns (address revocationRegistryAddress_)

Returns the address of the current revocation registry contract.

Returns​

NameTypeDescription
revocationRegistryAddress_addressThe revocation registry contract address.

initializeSsiManagement​

function initializeSsiManagement() external nonpayable

Initialises the SSI management capability on the token.

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

isIssuer​

function isIssuer(address _issuer) external view returns (bool)

Checks whether an address is present in the trusted issuer list.

Parameters​

NameTypeDescription
_issueraddressAddress to check.

Returns​

NameTypeDescription
_0boolTrue if the address is a listed issuer, false otherwise.

removeIssuer​

function removeIssuer(address _issuer) external nonpayable returns (bool success_)

Removes an address from the trusted issuer list.

Requires ROLE_SSI_MANAGER and the token to be unpaused. Reverts with UnlistedIssuer if the address is not listed. Emits RemovedFromIssuerList.

Parameters​

NameTypeDescription
_issueraddressAddress of the issuer to remove.

Returns​

NameTypeDescription
success_boolTrue if the issuer was removed successfully.

setRevocationRegistryAddress​

function setRevocationRegistryAddress(address _revocationRegistryAddress) external nonpayable returns (bool success_)

Sets the address of the revocation registry contract used for SSI credential validation.

Requires ROLE_SSI_MANAGER and the token to be unpaused. Emits RevocationRegistryUpdated.

Parameters​

NameTypeDescription
_revocationRegistryAddressaddressNew revocation registry contract address.

Returns​

NameTypeDescription
success_boolTrue if the address was updated successfully.

Events​

AddedToIssuerList​

event AddedToIssuerList(address indexed operator, address indexed issuer)

Emitted when an issuer is added to the trusted issuer list.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the caller who performed the addition.
issuer indexedaddressAddress of the issuer that was added.

RemovedFromIssuerList​

event RemovedFromIssuerList(address indexed operator, address indexed issuer)

Emitted when an issuer is removed from the trusted issuer list.

Parameters​

NameTypeDescription
operator indexedaddressAddress of the caller who performed the removal.
issuer indexedaddressAddress of the issuer that was removed.

RevocationRegistryUpdated​

event RevocationRegistryUpdated(address indexed oldRegistryAddress, address indexed newRegistryAddress)

Emitted when the revocation registry address is updated.

Parameters​

NameTypeDescription
oldRegistryAddress indexedaddressPrevious revocation registry contract address.
newRegistryAddress indexedaddressNew revocation registry contract address.

SsiManagementInitialized​

event SsiManagementInitialized()

Emitted once when the SSI management capability is initialised on a token.

Fires exclusively from initializeSsiManagement.

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.

AccountIsNotIssuer​

error AccountIsNotIssuer(address issuer)

Thrown when an address is required to be a listed issuer but is not.

Parameters​

NameTypeDescription
issueraddressThe address that failed the issuer membership check.

AssetNotOperational​

error AssetNotOperational(bytes32 configId, uint256 versionId)

Raised by InitializerStorageWrapper.checkOperational (and the related isConfigVersionOperational helper) when an operation is attempted on a configuration version that has not yet been marked operational.

Parameters​

NameTypeDescription
configIdbytes32Resolver-proxy configuration whose operational status was checked.
versionIduint256Configuration version whose operational status was checked.

Deactivated​

error Deactivated()

Thrown when an operation guarded by onlyActivated is attempted on a token whose deactivation flag has already been set.

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.

IsPaused​

error IsPaused()

Thrown when an operation that requires the token to be unpaused is attempted while the token is paused (own flag or any external pause contract).

ListedIssuer​

error ListedIssuer(address issuer)

Thrown when attempting to add an address already present in the issuer list.

Parameters​

NameTypeDescription
issueraddressThe duplicate issuer address.

UnlistedIssuer​

error UnlistedIssuer(address issuer)

Thrown when attempting to remove an address not present in the issuer list.

Parameters​

NameTypeDescription
issueraddressThe unlisted issuer address.

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.

ZeroAddressNotAllowed​

error ZeroAddressNotAllowed()

Reverts when the zero address is supplied where it is not permitted.

Prevents invalid account, contract, or recipient references.