// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract E2TMinter {
uint256 public constant MAX_ADDRESSES = 1222;
struct WalletInfo {
string message;
}
WalletInfo[] private addresses;
mapping(bytes32 => bool) private hasSentMessage;
address public owner;
constructor() {
owner = msg.sender;
}
function mint(string memory wallet) external {
require(addresses.length < MAX_ADDRESSES, "Mint limit reached");
bytes32 messageHash = keccak256(abi.encodePacked(wallet));
require(!hasSentMessage[messageHash], "Wallet already minted");
addresses.push(WalletInfo(wallet));
hasSentMessage[messageHash] = true;
}
function getAddresses() external view returns (WalletInfo[] memory) {
return addresses;
}
}
{
"compilationTarget": {
"E2TMinter.sol": "E2TMinter"
},
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MAX_ADDRESSES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAddresses","outputs":[{"components":[{"internalType":"string","name":"message","type":"string"}],"internalType":"struct E2TMinter.WalletInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"wallet","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]