[英]ETH ICO Crowdsale contract hold back reward for KYC
i am learning blockchain programming and meanwhile have a good idea how to create a token and crowdsale contract in the etherum network. 我正在学习区块链编程,同时有一个好主意,如何在以太坊网络中创建令牌和众包合同。
But there is one question left which i cant answer myself and cant find any source. 但是还有一个问题,我无法回答自己,也找不到任何来源。 Its about KYC (Know your costumer)
关于KYC(了解您的客户)
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? 如果有人将ETH发送到我的销售合同,我知道如何退还我自己的硬币作为奖励,但是我如何保留奖励直到ico结束? I want to send the reward only after the user filled informations on my webpage for KYC.
我只想在用户填写我的网页上的KYC信息后才发送奖励。
I would be very thankfull for every information/tip i can get. 我将非常感谢我能获得的每条信息/提示。
There are potentially many different ways to achieve this outcome. 可能有许多不同的方法来实现这一目标。 Here's one example:
这是一个例子:
payable
function which is called by your user, and an admin-only function called by your site called authorize
. payable
功能,另一个是由您的站点称为authorize
的仅管理员功能。 authorize
function is called from your admin address with the user's address. authorize
功能。 This address is added to a map in the contract. payable
function, the function verifies the user's address is contained in the map, then issues tokens accordingly. payable
功能时,该功能会验证用户的地址是否包含在地图中,然后相应地发行令牌。 If the user's address is not in the map, ie they have not been authorized by an admin, the function fails.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.