diff --git a/src/tokens/ERC1155/utility/minter/ERC1155PermissiveMinter.sol b/src/tokens/ERC1155/utility/minter/ERC1155PermissiveMinter.sol new file mode 100644 index 0000000..7deedf6 --- /dev/null +++ b/src/tokens/ERC1155/utility/minter/ERC1155PermissiveMinter.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.19; + +import {IERC1155ItemsFunctions} from "@0xsequence/contracts-library/tokens/ERC1155/presets/items/IERC1155Items.sol"; + +/** + * An ERC-1155 contract that allows permissive minting. + */ +contract ERC1155PermissiveMinter { + /** + * Mint tokens. + * @param items The items contract. + * @param to Address to mint tokens to. + * @param tokenId Token ID to mint. + * @param amount Amount of tokens to mint. + * @param data Data to pass if receiver is contract. + */ + function mint(address items, address to, uint256 tokenId, uint256 amount, bytes memory data) external { + IERC1155ItemsFunctions(items).mint(to, tokenId, amount, data); + } + + /** + * Batch mint tokens. + * @param items The items contract. + * @param to Address to mint tokens to. + * @param tokenIds Token IDs to mint. + * @param amounts Amounts of tokens to mint. + * @param data Data to pass if receiver is contract. + */ + function batchMint( + address items, + address to, + uint256[] memory tokenIds, + uint256[] memory amounts, + bytes memory data + ) external { + IERC1155ItemsFunctions(items).batchMint(to, tokenIds, amounts, data); + } +}