AttestationRegistry
Inherits: BaseRoles
General Attestation Registry. Supports various attestations identified by their EAS schema UIDs. Issuers can specify valid attestors for their offerings.
State Variables
_INVESTOR_QUALIFICATION_UID
bytes32 constant _INVESTOR_QUALIFICATION_UID = 0xe55954f3900bab2bf776bb61c5fb0b0a688bb07ab06cb9fd39bc06004bb04e35;
_CUSTOMER_IDENTIFICATION_UID
bytes32 constant _CUSTOMER_IDENTIFICATION_UID = 0x7fe98a0715f26f1504adabc7e903a1fa3db981be23e3c39c0f9c07b5fdf4738a;
_LOCATION_UID
bytes32 constant _LOCATION_UID = 0xd5c6afa8d49eb7a165147d25554aa683bf6b2180f14aa0b9d5a36360bcbc5979;
investorQualificationAttestations
mapping(address => bytes32) public investorQualificationAttestations;
customerIdentificationAttestations
mapping(address => bytes32) public customerIdentificationAttestations;
locationAttestations
mapping(address => bytes32) public locationAttestations;
validAttestors
mapping(address => mapping(address => bool)) public validAttestors;
escrowPayments
mapping(address => uint256) public escrowPayments;
_eas
IEAS _eas = IEAS(0x4200000000000000000000000000000000000021);
_schemaRegistry
ISchemaRegistry _schemaRegistry = ISchemaRegistry(0x4200000000000000000000000000000000000020);
Functions
constructor
constructor();
attestInvestorQualification
Attest investor qualification: fields - isQualifiedClient, isAccreditedInvestor, isQualifiedPurchaser, isQualifiedInstitutionalBuyer.
function attestInvestorQualification(address investor, bytes calldata data) public returns (bytes32);
Parameters
investor
address
The address of the investor.
data
bytes
The attestation data.
attestCustomerIdentification
Attest customer identification: fields - isIdentified, isIndividual.
function attestCustomerIdentification(address customer, bytes calldata data) public returns (bytes32);
Parameters
customer
address
The address of the customer.
data
bytes
The attestation data.
attestLocation
Attest location: fields - country, state, city.
function attestLocation(address investor, bytes calldata data) public returns (bytes32);
Parameters
investor
address
The address of the investor.
data
bytes
The attestation data.
getInvestorQualificationAttestation
Get an investor's attestation for investor qualification.
function getInvestorQualificationAttestation(address investor) public view returns (Attestation memory);
Parameters
investor
address
The address of the investor.
Returns
<none>
Attestation
attestation The attestation data.
getCustomerIdentificationAttestation
Get an investor's attestation for customer identification.
function getCustomerIdentificationAttestation(address investor) public view returns (Attestation memory);
Parameters
investor
address
The address of the investor.
Returns
<none>
Attestation
attestation The attestation data.
getLocationAttestation
Get an investor's attestation for location.
function getLocationAttestation(address investor) public view returns (Attestation memory);
Parameters
investor
address
The address of the investor.
Returns
<none>
Attestation
attestation The attestation data.
revokeInvestorQualification
Revoke an investor's attestation for investor qualification.
function revokeInvestorQualification(address investor) public;
Parameters
investor
address
The address of the investor.
revokeCustomerIdentification
Revoke an investor's attestation for customer identification.
function revokeCustomerIdentification(address investor) public;
Parameters
investor
address
The address of the investor.
revokeLocation
Revoke an investor's attestation for location.
function revokeLocation(address investor) public;
Parameters
investor
address
The address of the investor.
setValidAttestor
Allow issuers to set valid attestors for their offerings.
function setValidAttestor(address attestor, bool isValid) public;
Parameters
attestor
address
The address of the attestor.
isValid
bool
A boolean indicating if the attestor is valid.
setEAS
(Test Only) Set the EAS backend.
function setEAS(address eas) external onlyRole(DEFAULT_ADMIN_ROLE);
Parameters
eas
address
The address of the new IEAS contract.
isInvestorQualificationValid
Check if an attestation is valid for an issuer's offering for investor qualification.
function isInvestorQualificationValid(address investor, address issuer) public view returns (bool);
Parameters
investor
address
The address of the investor.
issuer
address
The address of the issuer.
Returns
<none>
bool
isValid A boolean indicating if the attestation is valid.
isCustomerIdentificationValid
Check if an attestation is valid for an issuer's offering for customer identification.
function isCustomerIdentificationValid(address investor, address issuer) public view returns (bool);
Parameters
investor
address
The address of the investor.
issuer
address
The address of the issuer.
Returns
<none>
bool
isValid A boolean indicating if the attestation is valid.
isLocationValid
Check if an attestation is valid for an issuer's offering for location.
function isLocationValid(address investor, address issuer) public view returns (bool);
Parameters
investor
address
The address of the investor.
issuer
address
The address of the issuer.
Returns
<none>
bool
isValid A boolean indicating if the attestation is valid.
requestCustomerIdentificationAttestation
Request a customer identification attestation by depositing 0.0001 ETH in escrow. The payment will be held until an attestor processes the attestation.
function requestCustomerIdentificationAttestation() external payable returns (bool);
updateCustomerIdentification
Update an attestation for customer identification by revoking the existing one (if any) and issuing a new one.
function updateCustomerIdentification(address customer, bytes calldata data) external returns (bytes32);
Parameters
customer
address
The address of the customer.
data
bytes
The new attestation data.
Returns
<none>
bytes32
newAttestationUID The UID of the new attestation.
Events
InvestorQualificationAttested
event InvestorQualificationAttested(address indexed investor, bytes32 indexed attestationUID);
CustomerIdentificationAttested
event CustomerIdentificationAttested(address indexed investor, bytes32 indexed attestationUID);
LocationAttested
event LocationAttested(address indexed investor, bytes32 indexed attestationUID);
CustomerIdentificationPaymentReceived
event CustomerIdentificationPaymentReceived(address indexed customer, uint256 amount);
InvestorQualificationRevoked
event InvestorQualificationRevoked(address indexed investor, bytes32 indexed attestationUID);
CustomerIdentificationRevoked
event CustomerIdentificationRevoked(address indexed investor, bytes32 indexed attestationUID);
LocationRevoked
event LocationRevoked(address indexed investor, bytes32 indexed attestationUID);
ValidAttestorSet
event ValidAttestorSet(address indexed issuer, address indexed attestor, bool isValid);
EASUpdated
event EASUpdated(address indexed oldEAS, address indexed newEAS);
Last updated
Was this helpful?