Skip to main content
PulseScanner.io

Address

0x3820e79deb5e60f6f488fa2a62c8e190cc69bb47
Current Holdings
$0.00
TXs sent
not counted
First Active
2025-04-17
block 23,231,882
Last Active
520 days ago
block 23,231,882
Funded By
not identified

Net worth historyi

No net-worth snapshots recorded yet
exact matchTheMintMemessolc 0.8.14+commit.80d49f37runtime exact · creation exact
//
//
//
///////////////////////////////////////////////////
//   __  __ _ _         _  _                     //
//  |  \/  (_) |_____  | || |__ _ __ _ ___ _ _   //
//  | |\/| | | / / -_) | __ / _` / _` / -_) '_|  //
//  |_|  |_|_|_\_\___| |_||_\__,_\__, \___|_|    //
//                               |___/           //
///////////////////////////////////////////////////
//
//
//

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.14;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";

contract TheMintMemes is ERC1155PresetMinterPauser, Ownable, DefaultOperatorFilterer {
    string public name = "The Mint Memes";
    string public symbol = "TMM";

    bool public isMintEnabled = true;

    mapping(address => uint256) private _mintCount;

    string public contractUri = "https://metadata.mikehager.de/themintmemes/contract";

    constructor() ERC1155PresetMinterPauser("https://metadata.mikehager.de/themintmemes/{id}") {
    }

    function getMintLimitByAddress(address _address)
        public
        view
        returns (uint256)
    {
        return 1 - _mintCount[_address];
    }

    function setIsMintEnabled(bool isEnabled) public onlyOwner {
        isMintEnabled = isEnabled;
    }

    function setUri(string memory newuri) public onlyOwner {
        _setURI(newuri);
    }

    function setContractURI(string memory newuri) public onlyOwner {
        contractUri = newuri;
    }

    function contractURI() public view returns (string memory) {
        return contractUri;
    }

    function airdrop(
        address[] memory to,
        uint256[] memory id,        
        uint256[] memory amount
    ) onlyOwner public {
        require(to.length == id.length && to.length == amount.length, "Length mismatch");
        for (uint256 i = 0; i < to.length; i++)
            _mint(to[i], id[i], amount[i], "");
    }

     function mint() public {
        require(isMintEnabled, "Mint not enabled");
        require(_mintCount[msg.sender] < 1, "Mint limit reached");

       _mint(msg.sender, 1, 1, ""); 
       _mintCount[msg.sender] += 1;
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        uint256 amount,
        bytes memory data
    ) public override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId, amount, data);
    }

    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }
}