@@ -8,16 +8,16 @@ import {ERC1155, ERC1155Permit} from "../../../token/erc1155/abstract/ERC1155Per
8
8
import {ERC2981 } from "@openzeppelin/contracts/token/common/ERC2981.sol " ;
9
9
import {OperatorAllowlistEnforced} from "../../../allowlist/OperatorAllowlistEnforced.sol " ;
10
10
11
- abstract contract ImmutableERC1155Base is OperatorAllowlistEnforced , ERC1155Permit , ERC2981 {
11
+ import {AccessControlEnumerable, MintingAccessControl} from "../../../access/MintingAccessControl.sol " ;
12
+
13
+
14
+ abstract contract ImmutableERC1155Base is OperatorAllowlistEnforced , ERC1155Permit , ERC2981 , MintingAccessControl {
12
15
/// @dev Contract level metadata
13
16
string public contractURI;
14
17
15
18
/// @dev Common URIs for individual token URIs
16
19
string private _baseURI;
17
20
18
- /// @dev Only MINTER_ROLE can invoke permissioned mint.
19
- bytes32 public constant MINTER_ROLE = bytes32 ("MINTER_ROLE " );
20
-
21
21
/// @dev mapping of each token id supply
22
22
mapping (uint256 tokenId = > uint256 totalSupply ) private _totalSupply;
23
23
@@ -92,22 +92,6 @@ abstract contract ImmutableERC1155Base is OperatorAllowlistEnforced, ERC1155Perm
92
92
}
93
93
}
94
94
95
- /**
96
- * @notice Grants minter role to the user
97
- * @param user The address to grant the MINTER_ROLE to
98
- */
99
- function grantMinterRole (address user ) public onlyRole (DEFAULT_ADMIN_ROLE) {
100
- grantRole (MINTER_ROLE, user);
101
- }
102
-
103
- /**
104
- * @notice Allows admin to revoke `MINTER_ROLE` role from `user`
105
- * @param user The address to revoke the MINTER_ROLE from
106
- */
107
- function revokeMinterRole (address user ) public onlyRole (DEFAULT_ADMIN_ROLE) {
108
- revokeRole (MINTER_ROLE, user);
109
- }
110
-
111
95
/**
112
96
* @notice Override of setApprovalForAll from {ERC721}, with added Allowlist approval validation
113
97
* @param operator The address to approve as an operator for the caller.
@@ -154,7 +138,7 @@ abstract contract ImmutableERC1155Base is OperatorAllowlistEnforced, ERC1155Perm
154
138
*/
155
139
function supportsInterface (
156
140
bytes4 interfaceId
157
- ) public view virtual override (ERC1155Permit , ERC2981 , OperatorAllowlistEnforced ) returns (bool ) {
141
+ ) public view virtual override (ERC1155Permit , ERC2981 , AccessControlEnumerable ) returns (bool ) {
158
142
return super .supportsInterface (interfaceId);
159
143
}
160
144
@@ -190,19 +174,6 @@ abstract contract ImmutableERC1155Base is OperatorAllowlistEnforced, ERC1155Perm
190
174
return _baseURI;
191
175
}
192
176
193
- /**
194
- * @notice Returns the addresses which have DEFAULT_ADMIN_ROLE
195
- * @return admins The addresses which have DEFAULT_ADMIN_ROLE
196
- */
197
- function getAdmins () public view returns (address [] memory ) {
198
- uint256 adminCount = getRoleMemberCount (DEFAULT_ADMIN_ROLE);
199
- address [] memory admins = new address [](adminCount);
200
- for (uint256 i; i < adminCount; i++ ) {
201
- admins[i] = getRoleMember (DEFAULT_ADMIN_ROLE, i);
202
- }
203
- return admins;
204
- }
205
-
206
177
/**
207
178
* @notice See Openzepplin ERC1155._beforeTokenTransfer.
208
179
* @param operator The address performing the transfer.
0 commit comments