Skip to content

Commit 71df390

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
ERC1155Drop: re-organize contract code
1 parent a402a4e commit 71df390

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

contracts/base/ERC1155Drop.sol

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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,19 +168,6 @@ contract ERC1155Drop is
155168
return nextTokenIdToLazyMint;
156169
}
157170

158-
/*//////////////////////////////////////////////////////////////
159-
ERC165 Logic
160-
//////////////////////////////////////////////////////////////*/
161-
162-
/// @notice Returns whether this contract supports the given interface.
163-
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, IERC165) returns (bool) {
164-
return
165-
interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
166-
interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155
167-
interfaceId == 0x0e89341c || // ERC165 Interface ID for ERC1155MetadataURI
168-
interfaceId == type(IERC2981).interfaceId; // ERC165 ID for ERC2981
169-
}
170-
171171
/*///////////////////////////////////////////////////////////////
172172
Internal functions
173173
//////////////////////////////////////////////////////////////*/

0 commit comments

Comments
 (0)