how to give back each customer a self-defined amount of ether after ICO ends in smart contract

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??
Aug 1, 2018 in Blockchain by charlie_brown
• 7,720 points
654 views

1 answer to this question.

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

answered Aug 1, 2018 by aryya
• 7,450 points

Related Questions In Blockchain

0 votes
1 answer

How do I send back ethers to the sender of the tokens in a smart contract?

Whenever a smart contract receives ether via ...READ MORE

answered May 30, 2018 in Blockchain by Perry
• 17,100 points
3,338 views
0 votes
1 answer

What happens to Ether in a smart contract after selfdestruct?

selfdestruct takes one argument an address and then sends all ...READ MORE

answered Oct 3, 2018 in Blockchain by digger
• 26,740 points
682 views
0 votes
1 answer

How to get the current state of a smart contract?

Hey, you gotta provide the contract code, and ...READ MORE

answered Aug 1, 2018 in Blockchain by Perry
• 17,100 points
884 views
0 votes
1 answer

How do I send ether from an EOA to a smart contract?

You include ether to send in the ...READ MORE

answered Sep 27, 2018 in Blockchain by digger
• 26,740 points
1,330 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,655 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,211 views
0 votes
1 answer

how to modify smart contract template for self defined functionality

TL;DR; This code simply defines the start ...READ MORE

answered Aug 1, 2018 in Blockchain by aryya
• 7,450 points
388 views
0 votes
1 answer

How to prevent the smart contract from being modified and deployed in the blockchain network?

To expand on Matthew's answer, each state ...READ MORE

answered Jul 6, 2018 in Blockchain by aryya
• 7,450 points
637 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP