How to Verify Your Token Contract [TokenGen Tutorial]

How to verify your token contract on Etherscan [TokenGen tutorial]

In a previous tutorial, we showed how you can verify your TokenGen fundraiser contract on Etherscan. Today, we will do the same but for the token contract.

The process is quite similar with one small difference – you will need to provide constructor parameters since the token contract is deployed by the fundraiser contract and receives its arguments from it.

First of all, you need to go to the token contract page on Etherscan. You can find the address of the token contract on the Smart Contract Management interface:

You can simply click on the link across the Address label and it will open the Etherscan page of the token contract. From there, you need to go to the Code tab and click the Verify and Publish link at the top of the tab.

This will take you to the Etherscan contract verification page:

Etherscan Verify & Publish Contract

The Contract Name is, in our example, NewToken, since the name of our token is New Token. Next, you need to select the Compiler. You can find the compiler version for each build in the build folder of your TokenGen package in the [ExampleToken]Fundraiser.json file. Simply search for “compiler” and you will find it. The section in the code looks something like this:

TokenGen Package Compiler Version

In the next step you need to copy the contents of the Project.sol file from your TokenGen project package into the Contract Code textarea of the form.

And finally, you need to provide the constructor arguments for the contract. Now, in the case of TokenGen token contracts, there are two cases – when you have selected the PausableToken feature and when you haven’t.

If you have selected the PausableToken feature, the token contract has two constructor arguments – owner and minter. If your project is not using this feature, then your token contract has only one parameter – minter.

You can find both the minter and owner addresses on the Smart Contract Management interface. Then, just go to and scroll down to the section where you can enter your parameters manually.

In our example, our project is using the PausableToken feature, so we need to provide two arguments, like so:

As you can see, the ABI-encoded parameters are show below. It is important to note here that you need to select the Address type for both arguments. Now, just copy the generated code and paste it into Etherscan in the Constructor Arguments field.

Finally, you just need to click the Verify and Publish button and your token contract will be verified.