How to hold back KYC reward until the end of the ICO Crowdsale

0 votes

I have created a token and Crowdsale Contract in the Etherum Network. I have a question regarding KYC rewards.

If someone sends ETH to my crowdsale contract i know how to return my own coin as a reward but how do i hold back the reward until the end of the ICO? I want to send the reward only after the user has filled information on my webpage for KYC.

Jul 3, 2018 in Blockchain by sabby
• 4,390 points

1 answer to this question.

0 votes

Your contract contains two functions - the payable function which is called by your user, and an admin-only function called by your site called authorize. When a user will complete the KYC tasks on your site, the authorize function is called from your admin address with the user's address. This address is added to a map in the contract. And when the user calls the payable function, the function verifies the user's address is contained in the map, then issues tokens accordingly. If the user's address is not in the map, i.e. they have not been authorized by an admin, the function fails.

answered Jul 4, 2018 by Christine
• 15,790 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
0 votes
1 answer

How to check the data integrity logic in proof of work mining?

The proof of work is actually works ...READ MORE

answered May 8, 2018 in Blockchain by Johnathon
• 9,090 points
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
0 votes
1 answer
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
0 votes
1 answer

How to get the number of tokens in the Bitcoin network?

This information can easily be calculated by ...READ MORE

answered Aug 31, 2018 in Blockchain by Christine
• 15,790 points
+1 vote
1 answer

I would like to create a blockchain network which will stay at the same level of complexity, is it possible?

You can very easily create a cryptocurrency having a ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,790 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP