/
IMintableERC1155.sol
38 lines (36 loc) · 1.35 KB
/
IMintableERC1155.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//SPDX-License-Identifier: MIT
pragma solidity 0.8.2;
interface IMintableERC1155 {
/**
* @notice Creates `amount` tokens of token type `id`, and assigns them to `account`.
* @dev Should be callable only by MintableERC1155Predicate
* Make sure minting is done only by this function
* @param account user address for whom token is being minted
* @param id token which is being minted
* @param amount amount of token being minted
* @param data extra byte data to be accompanied with minted tokens
*/
function mint(
address account,
uint256 id,
uint256 amount,
bytes calldata data
) external;
/**
* @notice Batched version of singular token minting, where
* for each token in `ids` respective amount to be minted from `amounts`
* array, for address `to`.
* @dev Should be callable only by MintableERC1155Predicate
* Make sure minting is done only by this function
* @param to user address for whom token is being minted
* @param ids tokens which are being minted
* @param amounts amount of each token being minted
* @param data extra byte data to be accompanied with minted tokens
*/
function mintBatch(
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}