2

I want to create a new wallet account and send some my own currency to it whenever someone sends me some ether to my contract. Is it possible to do this via contract itself or I need to do it in another way. Any help regarding this will be highly appreciated.

4

Creating an Ethereum account i.e. public/private key pair, is computationally expensive. From reading the yellow paper, we know that the more instructions executed by the EVM, the higher the cost to execute that transaction on the network. You could theoretically write code to do this; However, how economically feasible would it be?

For example, after looking at the Java implementation of the Ethereum protocol, we can see the vast amount of proprietary code and libraries needed to effectively create an Ethereum 'account'.

An alternative solution would be to create these accounts off chain. You could then preload them into a smart contracts storage. If there are a large amount to be stored, you may run into costing issues again. Think about storing them in IPFS and referencing them from the smart contract to avoid these costs.

I hope this answers your question. Leave me a comment if you need clarification. :)

| improve this answer | |
  • Actually what we want here is to create an ICO in which everyone who is investing ether will get a public-private key so that he can check his investment any time. So can you tell me how to proceed on this? – Rahul Sati Oct 13 '17 at 6:30
  • @RahulSati you'll want to create an ERC20 token. The new token that you'll be giving to the investor will be associated with the investors current Ethereum account address. Check out this interface for erc20 tokens : theethereum.wiki/w/index.php/ERC20_Token_Standard – Malone Oct 13 '17 at 6:33
  • We are trying to do like what tezos.com have done, here after investment they have provided us our Wallet Number, Private and Public key. That means they are creating account, correct? – Rahul Sati Oct 13 '17 at 6:46
  • @RahulSati I've had a quick read of tezos.com white paper. They've created their own blockchain, which has a proof of stake consensus mechanism with their own form of smart contracts. I'm then assuming they manually create you a tezos account and load it with tez coins when you invest. How did you receive your account keys? – Malone Oct 13 '17 at 6:56
  • After sending the investment to Tezos we received the account keys. Okay so now I understand that we don't have to create a new account for investor we can send the tokens to the investor's address. – Rahul Sati Oct 13 '17 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.