// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.16; import "./interface/ILazyMint.sol"; /** * The `LazyMint` is a contract extension for any base NFT contract. It lets you 'lazy mint' any number of NFTs * at once. Here, 'lazy mint' means defining the metadata for particular tokenIds of your NFT contract, without actually * minting a non-zero balance of NFTs of those tokenIds. */ abstract contract LazyMint is ILazyMint { /// @notice The tokenId assigned to the next new NFT to be lazy minted. uint256 internal nextTokenIdToLazyMint; /** * @notice Lets an authorized address lazy mint a given amount of NFTs. * * @param _amount The number of NFTs to lazy mint. */ function lazyMint(uint256 _amount) internal virtual { if (_amount == 0) { revert AmountCantBeZeroError(); } uint256 startId = nextTokenIdToLazyMint; nextTokenIdToLazyMint += _amount; emit TokensLazyMinted(startId, startId + _amount - 1); } }