Skip to content

Set reserved tokens in tokens

Victor edited this page Oct 19, 2017 · 9 revisions

Set reserved tokens in tokens 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 token contract: token contract address and ABI are from the file downloaded at step 4 of ICO Wizard. 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. Fill addr input with the address, for which tokens are reserved. Fill inTokens input with tokens amount multiplied to 10 to n power, where n is the number of token decimals (For example, we want to set 255 tokens, which decimals number is 18. Then we should fill input with 255000000000000000000). Fill inPercentage input with 0.

  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.

Set reserved tokens in tokens 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 token contract with the data = 0xf30f8508 + address_for_tokens_reservation + hex(number_of_tokens*10^decimals) + 0000000000000000000000000000000000000000000000000000000000000000.

where address_for_tokens_reservation - address, for which tokens are reserved, normalized to 32 bytes (required number of zeros before address);

hex(number_of_tokens*10^decimals) - number of tokens multiplied to 10^decimals, hexed, normalized to 32 bytes (required number of zeros before address). For example, we want to set 10 tokens, which decimals number is 18. 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 reserve 10 tokens with decimals number 18 for wallet address 0x5f760fda9f0f313e465cd48c5f791ed5810714, the data should be: 0xf30f8508000000000000000000000000005f760fda9f0f313e465cd48c5f791ed58107140000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000000. Amount to send should be 0.

Clone this wiki locally