0
votes

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??

1

1 Answers

0
votes

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