0

I want to modify smart contract template, add a function such that it will sends back certain amount of ether after crowdsale ends. The problem is, I don't quite understand how smart contract works, do they constantly get called even after ICO ends?

Also, can I keep track of every transaction that happens to my token, so that I will know who owns my token after my tokens appears on exchanges and people start to trade them? i.e. I need to know who currently hold my tokens and their wallet address. Can anyone shed some light on me??

dome some
  • 479
  • 7
  • 22

1 Answers1

0

It's a lot of question. I will try to answer with topics below.

1 - "modify smart contract": Once you deployed in the Blockchain (true blockchain, not test-net), you can't not modify your contract. You just can kill the old smart contract and build a new one.

2 - "do they constantly get called even after ICO ends" - Algorithm of ICO and the ICO in self are two different things, the algorithm only stop to work if you use (and activate) the suicide function.

3 - "can I keep track of every transaction that happens to my token" - You track just the transactions that happens inside your smart contract, that it is pretty enough if you use validations

4 - "I need to know who currently hold my tokens and their wallet address" - Use the variable mapping(address=>uint) to control the wallets that are owners of your tokens

  • thanks for the answer! My real question here is: can I, say after ICO ends 200 days, keep track of the wallet address of people who own my token right now? The issue is tokens are on exchanges and they have traded my tokens a lot of times, I might not be able to know who owns it at the moment – dome some Sep 22 '17 at 16:32
  • as for your answer 2, how can I manually call smart contract functions to test out its functionality? – dome some Sep 22 '17 at 16:34
  • Your smart contract will still working as you programmed. What will happens after the 200 of your ICO, it depends of what you have programmed. The function `totalSupply` of ERC20 is enough to you be sure that your contract still available, but I don't recommend you keep verifying, because you will pay *gas* for it. – Rafael Araujo Sep 22 '17 at 16:47