Filter Contract (KYC Transaction Filters)
Last updated
Last updated
FilterContract.sol
is a Graphite system smart contract. It's needed for users to work with KYC-Filters for incoming transactions.
To set a filter level for your account, call setFilterLevel(level)
.
To check the current KYC-Filter level of your account, call viewFilterLevel()
.
To check if a potential transaction from account A to account B goes through (i.e. isn't blocked by KYC-Filter on B), call filter(sender, destination)
.
Call setFilterLevel(level)
to set up a value for a KYC transaction filter for incoming transactions, rejecting senders with KYC level lower than the filter value.
level
- integer value; the value of the KYC Filter (directly related to sender's KYC Level)
Upon successful execution, a caller wallet address will have a KYC Filter for incoming transactions set at a certain value.
Since the exact number of available KYC Verification levels is not yet finalized, the level(value) of KYC Filters is not limited on the testnet. Additionally, at the moment there are no KYC Level restrictions that the KYC Center is able to grant. On the mainnet, it's expected that there'll be 2-5 available KYC levels.
Transactions that don't fit the KYC Filter are rejected by Graphite nodes.
Call viewFilterLevel()
to get the current KYC Filter level that a caller has for incoming transactions.
none
Function restores the KYC Filter level.
A wallet address can call this function only for itself, not for others.
Call filter(sender, destination)
to check if a transfer from sender address to destination address will or won't be rejected by the blockchain.
sender
- wallet address of a sender of a potential transaction. destination - wallet address of the receiver (destination).
Returns true
if sender's KYC level is greater than destination's KYC Filter level (i.e. a potential transaction will go through and won't be rejected by nodes).
Returns false
if sender's KYC level is less than destination's KYC Filter level (i.e. a potential transaction won't go through and will be rejected by nodes).
This function uses the KYCContract
smart contact to get KYC level data.