-
Notifications
You must be signed in to change notification settings - Fork 0
/
Calyptus401.sol
30 lines (22 loc) · 883 Bytes
/
Calyptus401.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier:MIT
pragma solidity ^0.8.20;
//https://x.com/CalyptusCareers/status/1805450877651611898
/* This smart contract is used to register users for
a future airdrop that will be distributed equally among all listed users 🪂
What could go wrong? */
contract UserRegistrationSolution {
mapping (address => bool) public registeredUsers;
address[] public registeredUserList;
function registerUser() external {
registeredUsers[msg.sender] = true;
registeredUserList.push(msg.sender);
}
function isUserRegistered(address userAddress) external view returns (bool) {
return registeredUsers[userAddress];
}
function getRegisteredUserCount() external view returns (uint256) {
return registeredUserList.length;
}
}
////////////////////////////////////////
// everyone can register multiple times