Identity Registry

Description of the Identity Registry Smart Contract

init function (Proxy's constructor)

The constructor initiates the Identity Registry smart contract
parameter 1 : _trustedIssuersRegistry the trusted issuers registry linked to the Identity Registry
parameter 2 : _claimTopicsRegistry the claim topics registry linked to the Identity Registry
parameter 3 : _identityStorage the Identity Registry storage linked to the Identity Registry
emits a ClaimTopicsRegistrySet event
emits a TrustedIssuersRegistrySet event
emits an IdentityStorageSet event

constructor (
  address _trustedIssuersRegistry,
  address _claimTopicsRegistry,
  address _identityStorage
) public;

Events

ClaimTopicsRegistrySet

This event is emitted when the ClaimTopicsRegistry has been set for the IdentityRegistry
the event is emitted by the IdentityRegistry constructor
claimTopicsRegistry is the address of the Claim Topics Registry contract

event ClaimTopicsRegistrySet(
  address indexed claimTopicsRegistry
);

IdentityStorageSet

This event is emitted when the IdentityRegistryStorage has been set for the IdentityRegistry
the event is emitted by the IdentityRegistry constructor
identityStorage is the address of the Identity Registry Storage contract

event IdentityStorageSet(
  address indexed identityStorage
);

TrustedIssuersRegistrySet

This event is emitted when the ClaimTopicsRegistry has been set for the IdentityRegistry
the event is emitted by the IdentityRegistry constructor
trustedIssuersRegistry is the address of the Trusted Issuers Registry contract

event TrustedIssuersRegistrySet(
  address indexed trustedIssuersRegistry
);

IdentityRegistered

This event is emitted when an Identity is registered into the Identity Registry.
the event is emitted by the 'registerIdentity' function
investorAddress is the address of the investor's wallet
identity is the address of the Identity smart contract (onchainID)

event IdentityRegistered(
  address indexed investorAddress, 
  IIdentity indexed identity
);

IdentityRemoved

This event is emitted when an Identity is removed from the Identity Registry.
the event is emitted by the 'deleteIdentity' function
investorAddress is the address of the investor's wallet
identity is the address of the Identity smart contract (onchainID)

event IdentityRemoved(
  address indexed investorAddress, 
  IIdentity indexed identity
);

IdentityUpdated

This event is emitted when an Identity has been updated
the event is emitted by the 'updateIdentity' function
oldIdentity is the old Identity contract's address to update
newIdentity is the new Identity contract's

event IdentityUpdated(
  IIdentity indexed oldIdentity, 
  IIdentity indexed newIdentity
);

CountryUpdated

This event is emitted when an Identity's country has been updated
the event is emitted by the 'updateCountry' function
investorAddress is the address on which the country has been updated
country is the numeric code (ISO 3166-1) of the new country

event CountryUpdated(
  address indexed investorAddress, 
  uint16 indexed country
);

functions

registerIdentity

Register an identity contract corresponding to a user address.
calls addIdentityToStorage() on the Identity Registry Storage linked to the Identity Registry
Requires that the user doesn't have an identity contract already registered.
This function can only be called by a wallet set as agent of the smart contract
parameter 1 : _userAddress The address of the user
parameter 2 : _identity The address of the user's identity contract
parameter 3 : _country The country of the investor
emits IdentityRegistered event

function registerIdentity(
address _userAddress, 
IIdentity _identity, 
uint16 _country
) external;

deleteIdentity

Removes an investor from the identity registry.
calls removeIdentityFromStorage() on the Identity Registry Storage linked to the Identity Registry
Requires that the user have an identity contract already deployed that will be deleted.
This function can only be called by a wallet set as agent of the smart contract
parameter 1 : _userAddress The address of the user to be removed
emits IdentityRemoved event

function deleteIdentity(
address _userAddress
) external;

setIdentityRegistryStorage

Replace the actual identityRegistryStorage contract with a new one.
this function can only be called by the wallet set as owner of the smart contract
parameter 1 : _identityRegistryStorage The address of the new Identity Registry Storage
emits IdentityStorageSet event

function setIdentityRegistryStorage(
address _identityRegistryStorage
) external;

setClaimTopicsRegistry

Replace the actual claimTopicsRegistry contract with a new one.
This function can only be called by the wallet set as owner of the smart contract
parameter 1 : _claimTopicsRegistry The address of the new claim Topics Registry
emits ClaimTopicsRegistrySet event

function setClaimTopicsRegistry(
address _claimTopicsRegistry
) external;

setTrustedIssuersRegistry

Replace the actual trustedIssuersRegistry contract with a new one.
This function can only be called by the wallet set as owner of the smart contract
parameter 1 : _trustedIssuersRegistry The address of the new Trusted Issuers Registry
emits TrustedIssuersRegistrySet event

function setTrustedIssuersRegistry(
address _trustedIssuersRegistry
) external;

updateCountry

Updates the country corresponding to a user address.
calls modifyStoredInvestorCountry() on the Identity Registry Storage linked to the Identity Registry
Requires that the user should have an identity contract already deployed that will be replaced.
This function can only be called by a wallet set as agent of the smart contract
parameter 1 : _userAddress The address of the user
parameter 2 : _country The new country of the user
emits CountryUpdated event

function updateCountry(
address _userAddress, 
uint16 _country
) external;

updateIdentity

Updates an identity contract corresponding to a user address.
calls modifyStoredIdentity() on the Identity Registry Storage linked to the Identity Registry
Requires that the user address should be the owner of the identity contract.
Requires that the user should have an identity contract already deployed that will be replaced.
This function can only be called by a wallet set as agent of the smart contract
parameter 1 : _userAddress The address of the user
parameter 2 : _identity The address of the user's new identity contract
emits IdentityUpdated event

function updateIdentity(
address _userAddress, 
IIdentity _identity
) external;

batchRegisterIdentity

Function allowing to register identities in batch
This function can only be called by a wallet set as agent of the smart contract
Requires that none of the users has an identity contract already registered.
IMPORTANT : THIS TRANSACTION COULD EXCEED GAS LIMIT IF _userAddresses.length IS TOO HIGH, USE WITH CARE OR YOU COULD LOSE TX FEES WITH AN "OUT OF GAS" TRANSACTION
parameter 1 : _userAddresses The addresses of the users
parameter 2 : _identities The addresses of the corresponding identity contracts
parameter 3 : _countries The countries of the corresponding investors
emits _userAddresses.length IdentityRegistered events

function batchRegisterIdentity(
address[] calldata _userAddresses, 
IIdentity[] calldata _identities, 
uint16[] calldata _countries
) external;

contains

This functions checks whether a wallet has its Identity registered or not in the Identity Registry.
parameter 1 : _userAddress The address of the user to be checked.
Returns 'True' if the address is contained in the Identity Registry, 'false' if not.

function contains(
address _userAddress
) external view returns (bool);

isVerified

This functions checks whether an identity contract corresponding to the provided user address has the required claims or not based on the data fetched from trusted issuers registry and from the claim topics registry
parameter 1 : _userAddress The address of the user to be verified.
Returns 'True' if the address is verified, 'false' if not.

function isVerified(
address _userAddress
) external view returns (bool);

identity

Returns the onchainID of an investor.
parameter 1 : _userAddress The wallet of the investor

function identity(
address _userAddress
) external view returns (IIdentity);

investorCountry

Returns the country code of an investor.
parameter 1 : _userAddress The wallet of the investor

function investorCountry(
address _userAddress
) external view returns (uint16);

identityStorage

Returns the Identity Registry Storage linked to the current IdentityRegistry.

function identityStorage(
) external view returns (IIdentityRegistryStorage);

issuersRegistry

Returns the TrustedIssuersRegistry linked to the current IdentityRegistry.

function issuersRegistry(
) external view returns (ITrustedIssuersRegistry);

topicsRegistry

Returns the ClaimTopicsRegistry linked to the current IdentityRegistry.

function topicsRegistry(
) external view returns (IClaimTopicsRegistry);