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.

4

1 回答 1

1

这不能使用标准的 ERC20 代币定义来实现,您想要做的与“空投”非常相似,在这种情况下,可以按照以下步骤实现:

  1. 创建和部署 ERC20 代币。
  2. 创建一个智能合约来处理代币分发,这个合约将包含处理的逻辑或分发过程。
  3. 调用分发合约并传递将接收令牌的地址数组。

我在您提出的方法中看到的问题是,为了向用户提供地址,您必须向他们提供私钥,这意味着他们将无法完全控制他们的资金,因为您已经知道这些密钥,所以我不要认为这是一个好的决定。

于 2018-05-16T15:50:31.820 回答