@@ -9,7 +9,6 @@ import "../extension/Ownable.sol";
99import "../extension/Royalty.sol " ;
1010import "../extension/BatchMintMetadata.sol " ;
1111import "../extension/PrimarySale.sol " ;
12- import "../extension/SignatureMintERC1155.sol " ;
1312import "../extension/DropSinglePhase1155.sol " ;
1413import "../extension/LazyMint.sol " ;
1514import "../extension/DelayedReveal.sol " ;
@@ -19,19 +18,25 @@ import "../lib/TWStrings.sol";
1918
2019/**
2120 * BASE: ERC1155Base
22- * EXTENSION: SignatureMintERC1155, DropSinglePhase1155
21+ * EXTENSION: DropSinglePhase1155
2322 *
24- * The `ERC1155Drop` contract uses the `ERC1155Base` contract, along with the `SignatureMintERC1155` and `DropSinglePhase1155` extension.
23+ * The `ERC1155Base` smart contract implements the ERC1155 NFT standard.
24+ * It includes the following additions to standard ERC1155 logic:
2525 *
26- * The 'signature minting' mechanism in the `SignatureMintERC1155` extension is a way for a contract admin to authorize
27- * an external party's request to mint tokens on the admin's contract. At a high level, this means you can authorize
28- * some external party to mint tokens on your contract, and specify what exactly will be minted by that external party.
26+ * - Contract metadata for royalty support on platforms such as OpenSea that use
27+ * off-chain information to distribute roaylties.
28+ *
29+ * - Ownership of the contract, with the ability to restrict certain functions to
30+ * only be called by the contract's owner.
31+ *
32+ * - Multicall capability to perform multiple actions atomically
33+ *
34+ * - EIP 2981 compliance for royalty support on NFT marketplaces.
2935 *
3036 * The `drop` mechanism in the `DropSinglePhase1155` extension is a distribution mechanism for lazy minted tokens. It lets
3137 * you set restrictions such as a price to charge, an allowlist etc. when an address atttempts to mint lazy minted tokens.
3238 *
33- * The `ERC721Drop` contract lets you lazy mint tokens, and distribute those lazy minted tokens via signature minting, or
34- * via the drop mechanism.
39+ * The `ERC721Drop` contract lets you lazy mint tokens, and distribute those lazy minted tokens via the drop mechanism.
3540 */
3641
3742contract ERC1155Drop is
@@ -42,7 +47,6 @@ contract ERC1155Drop is
4247 Multicall ,
4348 BatchMintMetadata ,
4449 PrimarySale ,
45- SignatureMintERC1155 ,
4650 LazyMint ,
4751 DelayedReveal ,
4852 DropSinglePhase1155
@@ -96,54 +100,6 @@ contract ERC1155Drop is
96100 }
97101 }
98102
99- /*//////////////////////////////////////////////////////////////
100- Signature minting logic
101- //////////////////////////////////////////////////////////////*/
102-
103- /**
104- * @notice Mints tokens according to the provided mint request.
105- *
106- * @param _req The payload / mint request.
107- * @param _signature The signature produced by an account signing the mint request.
108- */
109- function mintWithSignature (MintRequest calldata _req , bytes calldata _signature )
110- external
111- payable
112- virtual
113- override
114- returns (address signer )
115- {
116- require (_req.quantity > 0 , "Minting zero tokens. " );
117-
118- uint256 tokenIdToMint = _req.tokenId;
119- require (tokenIdToMint < nextTokenIdToMint (), "Claiming invalid tokenId. " );
120-
121- // Verify and process payload.
122- signer = _processRequest (_req, _signature);
123-
124- /**
125- * Get receiver of tokens.
126- *
127- * Note: If `_req.to == address(0)`, a `mintWithSignature` transaction sitting in the
128- * mempool can be frontrun by copying the input data, since the minted tokens
129- * will be sent to the `_msgSender()` in this case.
130- */
131- address receiver = _req.to == address (0 ) ? msg .sender : _req.to;
132-
133- // Collect price
134- collectPriceOnClaim (_req.primarySaleRecipient, _req.quantity, _req.currency, _req.pricePerToken);
135-
136- // Set royalties, if applicable.
137- if (_req.royaltyRecipient != address (0 ) && _req.royaltyBps != 0 ) {
138- _setupRoyaltyInfoForToken (tokenIdToMint, _req.royaltyRecipient, _req.royaltyBps);
139- }
140-
141- // Mint tokens.
142- _mint (receiver, tokenIdToMint, _req.quantity, "" );
143-
144- emit TokensMintedWithSignature (signer, receiver, tokenIdToMint, _req);
145- }
146-
147103 /*///////////////////////////////////////////////////////////////
148104 Delayed reveal logic
149105 //////////////////////////////////////////////////////////////*/
@@ -322,9 +278,4 @@ contract ERC1155Drop is
322278 function _canReveal () internal view virtual returns (bool ) {
323279 return msg .sender == owner ();
324280 }
325-
326- /// @dev Returns whether a given address is authorized to sign mint requests.
327- function _canSignMintRequest (address _signer ) internal view virtual override returns (bool ) {
328- return _signer == owner ();
329- }
330281}
0 commit comments