0

There's a part of me that thinks that if this is possible it kind of goes against the whole idea of a secure blockchain, but I just want to check and make sure.

Is it possible to create and deploy a smartcontract which creates a number of addresses, each with a pre-defined, initial balance of tokens? And if so, can these addresses then be made 'accessible' as a wallet for someone to use?

So, suppose I create a coin ABC, and it has a supply of 1.000.000.000 and I then create 10 addresses, each with, say, 50.000 ABC in them, with the remaining ABC tokens still in the 'genesis'/initial address - is that possible? Alternatively, can this kind of "pre-walleting" be done with a second contract after the token creation? And suppose now that I have said 50K ABC addresses, can they then be 'given' to users/made accessible?

Of course one can always create the coin and then do a bunch of transactions to do the above 'the old fashioned way' but I am curious if such a setup can be obtained in a faster/shortcut way.

Ashley Mills
  • 50,474
  • 16
  • 129
  • 160
Irresistance
  • 147
  • 1
  • 1
  • 10

1 Answers1

1

This can not be achieved using the standard ERC20 token definition, what you want to do is very similar to an "Airdrop", in that case that can be achieved following these steps:

  1. Create and deploy the ERC20 token.
  2. Create a smart contract to handle the token distribution, this contract will contain the logic to handle or the distribution process.
  3. Call the distribution contract and pass the array of addresses that will receive the token.

The problem that i see with your proposed approach is that in order to give the addresses to the users you must provide them the private key, which means that they will not be in total control of their funds since you already know those keys, so i don't think this is a good decision.

Jose Mejia
  • 76
  • 2