Skip to content

Add address to white list

Victor Baranov edited this page Feb 2, 2018 · 12 revisions

Note: White list in the Token Wizard strategy is inherited*. So, If you need to setup white list for multiple tiers crowdsale manually, you should add the same whitelist object for all next tiers too. For example, you have 4-tiers crowdsale. You have added address A to the 2nd tier. Then you need to add it to the 3d and the 4th tiers too.

*it means, that if an address is whitelisted in the previous tier, it can buy on the next tiers too provided that the cap (hard and individual) was not redeemed earlier.

Add address to white list from the Manage crowdsale page

  1. Go to the manage crowdsale page for your crowdsales (see instructions here)

  2. If the tier you want to modify is updatable, you'll be able to add an address to the whitelist. Add all the addresses you want to include in the whitelist, along with their min and max allowed tokens.

  3. After adding the addresses, click the Save button and confirm the transaction.

Add address to white list from MyEtherWallet

  1. Go to https://www.myetherwallet.com/#contracts

  2. Choose the network. For example, (ETH) Etherscan.io, if your contract is in mainnet.

  1. Attach to your crowdsale/tier contract: crowdsale/tier contract address and its ABI are taken from the file downloaded at step 4 of Token Wizard.

    • ABI of the crowdsale contract is below the line ****Crowdsale contract ABI:****

    Then click Access button.

  1. In Select a function combo choose setEarlyParticipantWhitelist method

  1. In How would you like to access your wallet? choose any preferable option. If you chose MetaMask/Mist, click "Connect to Metamask".

  1. Enter the data:

    • Fill addr input with the address to be whitelisted.
    • Set Status to true.
    • Fill minCap and maxCap with the number of tokens multiplied to 10 to n power, where n is the token decimals number. For example, we want to set 25 min token to buy, with token decimals number is 18. Then we should to fill with 25000000000000000000.
  2. Click Write.

  3. Choose 0 in Amount to Send. The Gas Limit will be calculated automatically. Click "Generate transaction".

  1. You'll see the transaction data. Click Yes, I am sure. Make transaction..

  1. Confirm transaction in MetaMask popup.

Add address to white list by method signature

  1. Open MetaMask Chrome plugin

  2. Connect to the network, where the crowdsale contract is deployed. For example, mainnet.

  3. Choose an account, which is the owner of crowdsale. This account should have sufficient balance in this network too.

  4. Send transaction to the address of the crowdsale contract with the data = 0x0cc91bb9 + whitelisted_address + 0000000000000000000000000000000000000000000000000000000000000001 + hex(min_number_of_tokens*10^decimals) + hex(max_number_of_tokens*10^decimals), where

    • 0x0cc91bb9 - the method's signature
    • whitelisted_address - address to be whitelisted, normalized to 32 bytes (required number of zeros before address);
    • hex(min_number_of_tokens*10^decimals) - min number of tokens to buy multiplied to 10^decimals, hexed, normalized to 32 bytes (required number of zeros before address). For example, we want to set 1 min token to buy, with token decimals number is 18. min_number_of_tokens*10^decimals = 1*10^18 = 1000000000000000000. Hex from it will be de0b6b3a7640000 and normalized to 32 bytes will be: 0000000000000000000000000000000000000000000000000de0b6b3a7640000.
    • hex(max_number_of_tokens*10^decimals) - max number of tokens to buy multiplied to 10^decimals, hexed, normalized to 32 bytes (required number of zeros before address). For example, we want to set 10 max tokens to buy, with token decimals are 18. max_number_of_tokens*10^decimals = 10*10^18 = 10000000000000000000. Hex from it will be 8ac7230489e80000 and normalized to 32 bytes will be: 0000000000000000000000000000000000000000000000008ac7230489e80000.

    For example, if you need to add wallet address 0x5f760fda9f0f313e465cd48c5f791ed5810714 to white list with min cap 1 and max cap 10 tokens, the data should be: 0x0cc91bb9000000000000000000000000000d9fcc806b84d6fe05b086868df658a999d92d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000008ac7230489e80000. Amount to send should be 0.

Clone this wiki locally