Implementation of whitelisting on Smart-assets


Hi, I am considering how to implement whitelisting meaning restricting transfer only between KYCed users.

・Adding the addresses that passed KYC into a public address by DataTransaction
・Issuing a Smart Asset and attach a script with the restriction. This script will refer this list of addresses in the account and return True if the addresses of sender and receiver are in it.

This is the implementation I was thinking of.

However, I can’t come up with the solution to search an address from the list.
Is there any preset function that supports this objective or any other way to achieve this?

Very appreciate if anyone can help me.


You can add KYCed user’s address to some account data:
(DataTransaction(key: “address”, value:true), It doesn’t matter what you set to value field, because existance of this data entry in the account shows that the account with this address was approved)
And after that you need to check the existence of a data entry with needed address in the account data by deploying a smart asset.
you can use this function in inside your asset script

isDefined(getBoolean("address of account that store data", "address of KYCed account"))


hi :slight_smile:
take a look at the article