Skip to content

Commit 3004a49

Browse files
separate enumerable and supply eip standard interfaces
1 parent af6b692 commit 3004a49

File tree

8 files changed

+95
-51
lines changed

8 files changed

+95
-51
lines changed

contracts/eip/ERC1155Enumerable.sol

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
// SPDX-License-Identifier: Apache-2.0
22
pragma solidity ^0.8.0;
33

4-
/// @title ERC1155Enumarable Non-Fungible Token Standard, optional enumeration extension
4+
/// @title ERC1155 Non-Fungible Token Standard, optional enumeration extension
55
/// @dev See https://eips.ethereum.org/EIPS/eip-1155
66
interface ERC1155Enumerable {
7-
/// @notice Count NFTs tracked by this contract
8-
/// @return A count of valid NFTs tracked by this contract, where each one of
9-
/// them has an assigned and queryable owner not equal to the zero address
10-
function totalSupply(uint256 id) external view returns (uint256);
11-
127
/// @notice Returns the next token ID available for minting
138
/// @return The token identifier for the `_index`th NFT,
149
/// (sort order not specified)

contracts/eip/ERC1155Supply.sol

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
pragma solidity ^0.8.0;
3+
4+
/// @title ERC1155S Non-Fungible Token Standard, optional supply extension
5+
/// @dev See https://eips.ethereum.org/EIPS/eip-1155
6+
interface ERC1155Supply {
7+
/// @notice Count NFTs tracked by this contract
8+
/// @return A count of valid NFTs tracked by this contract, where each one of
9+
/// them has an assigned and queryable owner not equal to the zero address
10+
function totalSupply(uint256 id) external view returns (uint256);
11+
}

contracts/eip/ERC721Enumerable.sol

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ pragma solidity ^0.8.0;
66
/// Note: the ERC-165 identifier for this interface is 0x780e9d63.
77
/* is ERC721 */
88
interface ERC721Enumerable {
9-
/// @notice Count NFTs tracked by this contract
10-
/// @return A count of valid NFTs tracked by this contract, where each one of
11-
/// them has an assigned and queryable owner not equal to the zero address
12-
function totalSupply() external view returns (uint256);
13-
149
/// @notice Enumerate valid NFTs
1510
/// @dev Throws if `_index` >= `totalSupply()`.
1611
/// @param _index A counter less than `totalSupply()`

contracts/eip/ERC721Supply.sol

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
pragma solidity ^0.8.0;
3+
4+
/// @title ERC-721 Non-Fungible Token Standard, optional supplu extension
5+
/// @dev See https://eips.ethereum.org/EIPS/eip-721
6+
/// Note: the ERC-165 identifier for this interface is 0x780e9d63.
7+
/* is ERC721 */
8+
interface ERC721Supply {
9+
/// @notice Count NFTs tracked by this contract
10+
/// @return A count of valid NFTs tracked by this contract, where each one of
11+
/// them has an assigned and queryable owner not equal to the zero address
12+
function totalSupply() external view returns (uint256);
13+
}

docs/ERC1155Enumerable.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44

5-
> ERC1155Enumarable Non-Fungible Token Standard, optional enumeration extension
5+
> ERC1155 Non-Fungible Token Standard, optional enumeration extension
66
77

88

@@ -27,28 +27,6 @@ Returns the next token ID available for minting
2727
|---|---|---|
2828
| _0 | uint256 | The token identifier for the `_index`th NFT, (sort order not specified)
2929

30-
### totalSupply
31-
32-
```solidity
33-
function totalSupply(uint256 id) external view returns (uint256)
34-
```
35-
36-
Count NFTs tracked by this contract
37-
38-
39-
40-
#### Parameters
41-
42-
| Name | Type | Description |
43-
|---|---|---|
44-
| id | uint256 | undefined
45-
46-
#### Returns
47-
48-
| Name | Type | Description |
49-
|---|---|---|
50-
| _0 | uint256 | A count of valid NFTs tracked by this contract, where each one of them has an assigned and queryable owner not equal to the zero address
51-
5230

5331

5432

docs/ERC1155Supply.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# ERC1155Supply
2+
3+
4+
5+
> ERC1155S Non-Fungible Token Standard, optional supply extension
6+
7+
8+
9+
*See https://eips.ethereum.org/EIPS/eip-1155*
10+
11+
## Methods
12+
13+
### totalSupply
14+
15+
```solidity
16+
function totalSupply(uint256 id) external view returns (uint256)
17+
```
18+
19+
Count NFTs tracked by this contract
20+
21+
22+
23+
#### Parameters
24+
25+
| Name | Type | Description |
26+
|---|---|---|
27+
| id | uint256 | undefined
28+
29+
#### Returns
30+
31+
| Name | Type | Description |
32+
|---|---|---|
33+
| _0 | uint256 | A count of valid NFTs tracked by this contract, where each one of them has an assigned and queryable owner not equal to the zero address
34+
35+
36+
37+

docs/ERC721Enumerable.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,6 @@ Enumerate NFTs assigned to an owner
5555
|---|---|---|
5656
| _0 | uint256 | The token identifier for the `_index`th NFT assigned to `_owner`, (sort order not specified)
5757

58-
### totalSupply
59-
60-
```solidity
61-
function totalSupply() external view returns (uint256)
62-
```
63-
64-
Count NFTs tracked by this contract
65-
66-
67-
68-
69-
#### Returns
70-
71-
| Name | Type | Description |
72-
|---|---|---|
73-
| _0 | uint256 | A count of valid NFTs tracked by this contract, where each one of them has an assigned and queryable owner not equal to the zero address
74-
7558

7659

7760

docs/ERC721Supply.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ERC721Supply
2+
3+
4+
5+
> ERC-721 Non-Fungible Token Standard, optional supplu extension
6+
7+
8+
9+
*See https://eips.ethereum.org/EIPS/eip-721 Note: the ERC-165 identifier for this interface is 0x780e9d63.*
10+
11+
## Methods
12+
13+
### totalSupply
14+
15+
```solidity
16+
function totalSupply() external view returns (uint256)
17+
```
18+
19+
Count NFTs tracked by this contract
20+
21+
22+
23+
24+
#### Returns
25+
26+
| Name | Type | Description |
27+
|---|---|---|
28+
| _0 | uint256 | A count of valid NFTs tracked by this contract, where each one of them has an assigned and queryable owner not equal to the zero address
29+
30+
31+
32+

0 commit comments

Comments
 (0)