Skip to content

Add address to white list

mikhadr edited this page Nov 8, 2017 · 12 revisions

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 ICO Wizard.

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

    Then click Access button.

  1. In Select a function combo choose setReservedTokensList 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 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 has 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