-
Notifications
You must be signed in to change notification settings - Fork 2
/
ERC1155Facet.sol
67 lines (58 loc) · 1.77 KB
/
ERC1155Facet.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import "@contracts/interfaces/IERC1155.sol";
import "@contracts/libraries/Modifiers.sol";
import "@contracts/libraries/LibERC1155.sol";
import "@contracts/libraries/AppStorage.sol";
contract ERC1155Facet is Modifiers, IERC1155, ERC1155Metadata_URI {
using LibERC1155 for AppStorage;
/**
* @dev see {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data)
external
forbidden
{}
/**
* @dev see {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address _from,
address _to,
uint256[] calldata _ids,
uint256[] calldata _values,
bytes calldata _data
) external forbidden {}
/**
* @dev see {IERC1155-balanceOf}.
*/
function balanceOf(address owner, uint256 id) external view returns (uint256) {
return s._balanceOf(owner, id);
}
/**
* @dev see {IERC1155-balanceOfBatch}.
*/
function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)
external
view
returns (uint256[] memory)
{
return s._balanceOfBatch(owners, ids);
}
/**
* @dev see {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address _operator, bool _approved) external forbidden {}
/**
* @dev see {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) external view returns (bool) {
return s._isApprovedForAll(owner, operator);
}
/**
* @dev see {ERC1155Metadata_URI-uri}.
*/
function uri(uint256 id) external view returns (string memory) {
return s._uri(id);
}
}