@@ -79,6 +79,19 @@ contract ERC1155Drop is
7979 _setupPrimarySaleRecipient (_primarySaleRecipient);
8080 }
8181
82+ /*//////////////////////////////////////////////////////////////
83+ ERC165 Logic
84+ //////////////////////////////////////////////////////////////*/
85+
86+ /// @notice Returns whether this contract supports the given interface.
87+ function supportsInterface (bytes4 interfaceId ) public view virtual override (ERC1155 , IERC165 ) returns (bool ) {
88+ return
89+ interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
90+ interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
91+ interfaceId == 0x0e89341c || // ERC165 Interface ID for ERC1155MetadataURI
92+ interfaceId == type (IERC2981 ).interfaceId; // ERC165 ID for ERC2981
93+ }
94+
8295 /*///////////////////////////////////////////////////////////////
8396 Overriden metadata logic
8497 //////////////////////////////////////////////////////////////*/
@@ -155,67 +168,6 @@ contract ERC1155Drop is
155168 return nextTokenIdToLazyMint;
156169 }
157170
158- /*//////////////////////////////////////////////////////////////
159- Minting/burning logic
160- //////////////////////////////////////////////////////////////*/
161-
162- /**
163- * @notice Lets an owner or approved operator burn NFTs of the given tokenId.
164- *
165- * @param _owner The owner of the NFT to burn.
166- * @param _tokenId The tokenId of the NFT to burn.
167- * @param _amount The amount of the NFT to burn.
168- */
169- function burn (
170- address _owner ,
171- uint256 _tokenId ,
172- uint256 _amount
173- ) external virtual {
174- address caller = msg .sender ;
175-
176- require (caller == _owner || isApprovedForAll[_owner][caller], "Unapproved caller " );
177- require (balanceOf[_owner][_tokenId] >= _amount, "Not enough tokens owned " );
178-
179- _burn (_owner, _tokenId, _amount);
180- }
181-
182- /**
183- * @notice Lets an owner or approved operator burn NFTs of the given tokenIds.
184- *
185- * @param _owner The owner of the NFTs to burn.
186- * @param _tokenIds The tokenIds of the NFTs to burn.
187- * @param _amounts The amounts of the NFTs to burn.
188- */
189- function burnBatch (
190- address _owner ,
191- uint256 [] memory _tokenIds ,
192- uint256 [] memory _amounts
193- ) external virtual {
194- address caller = msg .sender ;
195-
196- require (caller == _owner || isApprovedForAll[_owner][caller], "Unapproved caller " );
197- require (_tokenIds.length == _amounts.length , "Length mismatch " );
198-
199- for (uint256 i = 0 ; i < _tokenIds.length ; i += 1 ) {
200- require (balanceOf[_owner][_tokenIds[i]] >= _amounts[i], "Not enough tokens owned " );
201- }
202-
203- _burnBatch (_owner, _tokenIds, _amounts);
204- }
205-
206- /*//////////////////////////////////////////////////////////////
207- ERC165 Logic
208- //////////////////////////////////////////////////////////////*/
209-
210- /// @notice Returns whether this contract supports the given interface.
211- function supportsInterface (bytes4 interfaceId ) public view virtual override (ERC1155 , IERC165 ) returns (bool ) {
212- return
213- interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
214- interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
215- interfaceId == 0x0e89341c || // ERC165 Interface ID for ERC1155MetadataURI
216- interfaceId == type (IERC2981 ).interfaceId; // ERC165 ID for ERC2981
217- }
218-
219171 /*///////////////////////////////////////////////////////////////
220172 Internal functions
221173 //////////////////////////////////////////////////////////////*/
@@ -230,7 +182,6 @@ contract ERC1155Drop is
230182 AllowlistProof calldata ,
231183 bytes memory
232184 ) internal view virtual override {
233- require (msg .sender == tx .origin , "BOT " );
234185 if (_tokenId >= nextTokenIdToLazyMint) {
235186 revert ("Not enough minted tokens " );
236187 }
0 commit comments