Support Center

How can we help you?

Find answers to common questions or get in touch with our support team

Frequently Asked Questions

How do I mint an NFT ticket?

Connect your wallet, ensure you have sufficient USDT tokens, and click the 'Mint NFT ticket' button. The reference price increases with each mint.

What are the different NFT levels?

There are 4 levels (1-4) with different USDT rebate percentages (10%-40%) and weightages. Higher levels have lower probability but better rewards.

How are rewards distributed?

Rewards are distributed across three pools: Lottery Pool (last 10 mints), Quick Bonus Pool (immediate rewards), and NFT Staking Pool (staking rewards).

Can I transfer my NFT tickets?

No, NFT tickets are non-transferable and can only be used by the original minter for security and fairness reasons.

Submit a Ticket

Quick Links

Erc721 Lottery NFT Smart Contract

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

import {ERC721} from "@openzeppelin-5.0.1/contracts/token/ERC721/ERC721.sol";
import {IERC2981} from "@openzeppelin-5.0.1/contracts/interfaces/IERC2981.sol";
import {Ownable} from "@openzeppelin-5.0.1/contracts/access/Ownable.sol";
import {Strings} from "@openzeppelin-5.0.1/contracts/utils/Strings.sol";
import {ERC2981} from "@openzeppelin-5.0.1/contracts/token/common/ERC2981.sol";

/**
 * @title LotteryNFT
 * @dev ERC721-compliant NFT contract with embedded lottery participation and EIP-2981 royalty support.
 */
contract LotteryNFT is ERC721, ERC2981, Ownable {
    using Strings for uint256;

    uint256 public constant MAX_SUPPLY = 1_000_000;
    uint256 public totalMinted;
    address public immutable developer;
    string private baseTokenURI;
    mapping(uint256 => uint8[6]) public tokenNumbers;

    constructor(address _developer, string memory _baseURI) ERC721("Lottery NFT", "LTRY") {
        require(_developer != address(0), "Invalid developer address");
        developer = _developer;
        baseTokenURI = _baseURI;
        _setDefaultRoyalty(_developer, 500);
    }

    function mint(address to) external {
        require(totalMinted < MAX_SUPPLY, "Max supply reached");
        uint256 tokenId = ++totalMinted;
        _safeMint(to, tokenId);
        tokenNumbers[tokenId] = _generateNumbers(tokenId, to);
    }

    function getTokenNumbers(uint256 tokenId) external view returns (uint8[6] memory) {
        require(_exists(tokenId), "Query for nonexistent token");
        return tokenNumbers[tokenId];
    }

    function setBaseURI(string memory uri) external onlyOwner {
        baseTokenURI = uri;
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "URI query for nonexistent token");
        return string(abi.encodePacked(baseTokenURI, tokenId.toString()));
    }

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    function _generateNumbers(uint256 tokenId, address to) internal view returns (uint8[6] memory) {
        uint8[6] memory numbers;
        uint256 seed = uint256(keccak256(abi.encodePacked(block.timestamp, to, tokenId, block.prevrandao)));

        for (uint256 i = 0; i < 6; i++) {
            seed = uint256(keccak256(abi.encodePacked(seed, i)));
            numbers[i] = uint8((seed % 49) + 1);
        }

        return numbers;
    }
}