// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.16; import "./interface/IWalletClaimCounter1155.sol"; abstract contract WalletClaimCounter1155 is IWalletClaimCounter1155 { /// @dev Mapping from tokenId to the max number of NFTs a wallet can claim. mapping(uint256 => uint256) public maxWalletClaimCount; /// @dev Mapping from address => total number of NFTs a wallet has claimed. mapping(uint256 => mapping(address => uint256)) public walletClaimCount; /// @notice Lets a contract admin set a claim count for a wallet. /// @param _editionId id of token /// @param _claimer address of claimer /// @param _count current count of claim for one wallet function setWalletClaimCount(uint256 _editionId, address _claimer, uint256 _count) external override { walletClaimCount[_editionId][_claimer] = _count; emit WalletClaimCountUpdated(_claimer, _editionId, _count); } /// @notice Lets a contract admin set a maximum number of NFTs that can be claimed by any wallet. /// @param _count max claim for each wallet function setMaxWalletClaimCount(uint256 _editionId, uint256 _count) external override { maxWalletClaimCount[_editionId] = _count; emit MaxWalletClaimCountUpdated(_editionId, _count); } }