For the complete documentation index, see llms.txt. This page is also available as Markdown.

IdentityRegistryStorage

IdentityRegistryStorage holds the registrations of an asset: the addresses its Registry Agents bound to an ONCHAINID for this asset. It is a separate contract so that several assets of one Issuer can share one set of registrations. When an address has no registration, the storage answers with the global link recorded by the IdentityFactory.

At a glance

Source

contracts/registry/implementation/IdentityRegistryStorage.sol, on the standard base ERC3643IdentityRegistryStorage

Interfaces

IIdentityRegistryStorage, IERC3643IdentityRegistryStorage

Deployed as

A beacon proxy. The factory deploys one with a suite, or wires the suite to an existing one

Written by

The registries bound to it, which hold IRS_WRITER in the domain of the storage

Limit

300 bound registries, returned by MAX_BOUND_REGISTRIES()

Reads

View
Returns

storedIdentity(_userAddress)

The identity registered for the address. With no registration, the identity the address is globally linked to: the storage asks the IdentityFactory of each bound registry in turn and returns the first answer, or zero. A revoked link still answers

isLocallyRegistered(userAddress)

Whether the address has a registration in this storage

isIdentityRegistryBound(identityRegistry)

Whether a registry is bound

linkedIdentityRegistries(), linkedIdentityRegistries(_start, _end), linkedIdentityRegistryCount()

The bound registries, whole or by range, and their number

storedInvestorCountry(address)

0: the storage keeps no country

Writes

Function
Access
Reverts with

addIdentityToStorage(_userAddress, _identity, _country)

IRS_WRITER

ZeroAddress, AddressAlreadyStored. Emits IdentityStored, and IdentityOverridden when the identity differs from the global link of the address

modifyStoredIdentity(_userAddress, _identity)

IRS_WRITER

ZeroAddress, AddressNotYetStored. Emits IdentityModified and InvestorIdentityChanged, and IdentityOverridden or IdentityOverrideReleased when the divergence from the global link starts or ends

removeIdentityFromStorage(_userAddress)

IRS_WRITER

ZeroAddress, AddressNotYetStored. Emits IdentityUnstored, and IdentityOverrideReleased when the registration differed from the global link

modifyStoredInvestorCountry(address, uint16)

Reverts with Deprecated

A registry calls these functions when a Registry Agent calls registerIdentity, updateIdentity or deleteIdentity on it. They are not called directly.

Binding registries

Function
Access
Reverts with

bindIdentityRegistry(identityRegistry)

IRS_BINDER

AuthorityMismatch unless the registry answers to the same access manager, MaxIRByIRSReached. Emits IdentityRegistryBound

unbindIdentityRegistry(_identityRegistry)

OWNER

ZeroAddress, IdentityRegistryNotStored. Emits IdentityRegistryUnbound

init(accessManagerAddress, initialIRAddress)

Initializer, called once by the factory

ZeroAddress

Binding lists the registry in the storage. The registry also needs IRS_WRITER in the domain of the storage to write, which the commissioning of a suite grants: see 25 Commission a suite and grant roles.

A shared storage shares registrations. Every registry bound to a storage reads the same registrations. An address registered through one asset resolves to the same identity for every asset wired to that storage. Each asset keeps its own required topics and trusted issuers.

Events

Event
Emitted when

IdentityStored(address indexed _investorAddress, IIdentity indexed _identity), IdentityUnstored (same arguments)

A registration is written, deleted

IdentityModified(IIdentity indexed _oldIdentity, IIdentity indexed _newIdentity)

A registration names another identity

InvestorIdentityChanged(address indexed investor)

With IdentityModified: the address concerned

IdentityOverridden(address indexed investor, IIdentity indexed globalIdentity, IIdentity indexed localIdentity)

A registration names another identity than the global link of the address

IdentityOverrideReleased(address indexed investor, IIdentity indexed localIdentity, IIdentity indexed globalIdentity)

That divergence ends

IdentityRegistryBound(address indexed _identityRegistry), IdentityRegistryUnbound (same argument)

A registry is bound, unbound

Last updated