How to Whitelist Addresses [TokenGen Tutorial]

How to whitelist addresses [TokenGen tutorial]

Ever since the SEC got involved in the ICO world, whitelisting has become an integral part of almost every token crowdsale. In this tutorial, we will walk you through just how easy it is to setup a whitelist and then add addresses to it using TokenGen.

What is an ICO Whitelist Used for?

In a nutshell, you don’t want your TGE to be the funnel for money that will later get you into a lot of trouble. That is why it is very important to do your due diligence when it comes to your ICO investors. The first step towards achieving that is the implementation of a whitelist.

The TokenGen Whitelistable Fundraiser feature makes that implementation process extremely simple. The end result is a fundraiser that will allow people to participate in it only if their address is on the whitelist. Simple as that.

Using the Whitelistable Fundraiser Feature

First of all, in order to use the functionality provided by the Whitelistable Fundraiser feature, you need to make sure that you select it when creating your project:

TokenGen Create Project Whitelistable Fundraiser Feature

Once you have that covered, and your project is paid for and built, you can deploy the smart contracts using the Deploy button on the Project Overview tab and then head over to the Manage Contract tab:

TokenGen Manage Contract Interface

At the bottom of the screen, in the Fundraiser Contract table, you can see the “whitelist” variable. Across it, in the Action column, there are three icon buttons. Here’s what each of them does, from top to bottom:

  1. Allows you to check if a specific address is whitelisted or not.
  2. Allows you to whitelist address(es).
  3. Allows you to blacklist address(es).

Now, let’s go ahead and perform each of these actions to show you just how easy it is to interact with your contract using this interface.

Checking if an Address is Whitelisted or Not

First of all, I have an address here (0x2604Ad5B73C179479961c36fE19872afc9B1C975), so let’s check if it is whitelisted or not:

TokenGen Check Address Whitelisted Status

Once we click the first icon button, a dialog box appears where we can provide the address that we want to check the status of. When that is done, we just click Submit and wait for the response from the Ethereum network:

TokenGen Check Whitelisted Status Result

And there you go. The address is not whitelisted. So even if I tried to participate in this fundraiser and it was ongoing, I would not be allowed to. Let’s change that.

Whitelisting Addresses

In order to whitelist addresses, we need to use the second icon button (the plus icon) and fill in the required details in the dialog window that pops up:

TokenGen Whitelisting Addresses

It is important to note here that you can whitelist more than one address at a time. Just separate them with a comma. But also keep in mind that it is not recommended to whitelist more than 100 addresses at a time as the transaction might exceed the block gas limit and fail.

Now, that being said, all that’s left to do is click the Submit button at which point a MetaMask transaction will be created. You just need to submit it and wait until it is confirmed. Once that is done, we can re-check the whitelisted status of our address:

TokenGen Address Whitelisted True

As expected, this time the check returns true, which means that our address is now whitelisted and can participate in the fundraiser.

Blacklisting Addresses

If, for whatever reason, you want to remove an address(es) from the whitelist, you can simply use the third and final whitelist action i.e. the minus icon button. Everything in using this action is identical to the whitelisting action, however this time, the address(es) provided will be removed from the whitelist and no longer allowed to participate in the fundraiser.


And that’s pretty much all there is to the TokenGen Whitelistable Fundraiser feature. You saw just how easy it is to use and that was the main purpose of TokenGen right from the get-go – to provide an intuitive user interface that will allow more people to get into the blockchain sphere, regardless of their technical background.

On a closing note, we do recommend all projects created using TokenGen to include the Whitelistable Fundraiser feature as it will not only help you meet AML policies (to some extent), but will also help you with the liquidation of the funds gathered during the token crowdsale.