Verifiable.sol

Documentation for Verifiable.sol


Overview

The Verifiable contract serves as a foundational building block that provides KYC (Know Your Customer) verification capabilities to any contracts that inherit from it. It integrates with a KYC contract to check whether a user is verified or not.

State Variables

  • kyc: This variable holds the address of the KYC contract that is used to verify users. The type of the variable is IBouncerKYC, which is an interface describing the KYC contract's expected behavior.

Modifiers

  • isVerified: This modifier checks if the message sender is KYC-verified by calling the getStatus method on the kyc contract. It reverts the transaction if the sender is not verified.

Access Control

  • General: The Verifiable contract itself does not impose any roles or specific access control.

  • Inherited Contracts: Contracts inheriting from Verifiable can utilize the isVerified modifier to restrict access to methods for only KYC-verified users.

Example Usage

For example, an inherited contract might use the isVerified modifier as follows:

function sensitiveMethod() external isVerified {
  // Only KYC-verified users can call this method
}

The kyc variable would typically be set upon initialization in the inherited contract.

Payment Methods

  1. The Verifiable contract does not involve any payments or transactions. It serves as a utility for KYC verification.

  2. Therefore, neither ERC20 tokens nor native tokens like ETH or FTM are used for payments in this contract.

ERC-20 Token Initialization

The contract does not initialize any ERC-20 tokens. It is focused solely on providing KYC verification capabilities.


Last updated