-
Notifications
You must be signed in to change notification settings - Fork 214
Add address to white list
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.
-
Go to the manage crowdsale page for your crowdsales (see instructions here)
-
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.
-
After adding the addresses, click the Save button and confirm the transaction.
-
Choose the network. For example,
(ETH) Etherscan.io
, if your contract is inmainnet
.
-
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.
- ABI of the crowdsale contract is below the line
- In Select a function combo choose
setEarlyParticipantWhitelist
method
- In How would you like to access your wallet? choose any preferable option. If you chose
MetaMask/Mist
, click "Connect to Metamask".
-
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, wheren
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 with25000000000000000000
.
-
Click Write.
-
Choose 0 in Amount to Send. The Gas Limit will be calculated automatically. Click "Generate transaction".
- You'll see the transaction data. Click Yes, I am sure. Make transaction..
- Confirm transaction in MetaMask popup.
-
Open MetaMask Chrome plugin
-
Connect to the network, where the crowdsale contract is deployed. For example,
mainnet
. -
Choose an account, which is the owner of crowdsale. This account should have sufficient balance in this network too.
-
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 bede0b6b3a7640000
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 be8ac7230489e80000
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. -
- Introduction
- Demo
- Requirements
- Strategy
- How to run
- Using POA Networks
- Deployment Time & Gas
- Verifying Smart-Contracts
- Possible Tx Failures
- Token Wizard Projects
- Notable Contributors
- Support
- Disclaimer
- FAQ
- Change Start & End Times
- Change max cap for tier
- Change rate
- Distribute reserved tokens
- Finalize crowdsale