In order for a smart account to check the security of a Module, it will need to query the Module Registry either during the installation or execution of the module (or both). The Registry provides a simple interface for querying attestations, which is compliant with ERC-7484.
A registry adapter (as defined by ERC-7484) can quey the Module Registry using one of two functions:
check - Returns the timestamp of the attestation for a given Module and attester. It also verifies that the attestation exists and has not been revoked and reverts otherwise.
function check( address module, address attester ) public view returns (uint256 attestedAt);
checkN - Returns an array the timestamps of the attestations for a given Module and list of attesters. Optionally, it can be supplied with a threshold. It verifies that an attestation exists and has not been revoked by every attester in the list and reverts otherwise. If a threshold is supplied, it verifies that the number of attestations is greater than or equal to the threshold and reverts otherwise.
function checkN( address module, address calldata attesters, uint256 threshold ) external view returns (uint256 memory attestedAtArray);
Additionally, the Module Registry also exposes a function that is not mandated by ERC-7484:
checkNUnsafe. This function is identical to
checkN except that it does not revert if an attestation by an attester in the list does not exist or has been revoked. Instead, it only counts them as a non-existent attestation and returns the timestamp of the attestation as 0. As the name says, this function is less safe than
checkN and should only be used if there is sufficient reason, such as when an adapter wants to perform custom validation logic.
function checkNUnsafe( address module, address calldata attesters, uint256 threshold ) external view returns (uint256 memory attestedAtArray);