Discover more of PolygonScan's tools and services in one place.
Contract Source Code:
File 1 of 1 : KYC_1217.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract VCITY_KYC { address private owner; mapping(uint => bool) private KYCCompleted; // 仅存储用户的KYC完成状态 uint private userCount; // 用户计数器 constructor() { owner = msg.sender; userCount = 0; } // 批量添加KYC用户 function Add_KYC_Users(uint[] memory userIDs) public { require(msg.sender == owner, "Only owner can add KYC users"); // 确保只有合约所有者可以添加用户 for(uint i = 0; i < userIDs.length; i++) { uint _id = userIDs[i]; if (!KYCCompleted[_id]) { // 检查用户是否已经完成KYC KYCCompleted[_id] = true; userCount++; emit KYC_User(_id, block.timestamp); // 触发事件 } } } // 查询特定用户的KYC状态 function KYC(uint userID) public view returns (string memory) { return KYCCompleted[userID] ? unicode"KYC已通过 / KYC Passed" : unicode"KYC未通过 / KYC Failed"; } // 查看总用户数量 function Total() public view returns (uint) { return userCount; } event KYC_User(uint userID, uint kycTime); }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.