Skip to content

Commit 5865d0a

Browse files
nkrishangKrishang Nadgauda
and
Krishang Nadgauda
authored
Multiwrap implements ERC721Supply (#267)
Make Multiwrap enumerable Co-authored-by: Krishang Nadgauda <[email protected]>
1 parent ea0e37a commit 5865d0a

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

contracts/multiwrap/Multiwrap.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.11;
33

44
// ========== External imports ==========
5-
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
5+
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
66

77
import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol";
88
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
@@ -31,7 +31,7 @@ contract Multiwrap is
3131
ReentrancyGuardUpgradeable,
3232
ERC2771ContextUpgradeable,
3333
MulticallUpgradeable,
34-
ERC721Upgradeable,
34+
ERC721EnumerableUpgradeable,
3535
IMultiwrap
3636
{
3737
/*///////////////////////////////////////////////////////////////
@@ -135,7 +135,7 @@ contract Multiwrap is
135135
public
136136
view
137137
virtual
138-
override(ERC1155Receiver, ERC721Upgradeable, IERC165)
138+
override(ERC1155Receiver, ERC721EnumerableUpgradeable, IERC165)
139139
returns (bool)
140140
{
141141
return

docs/Multiwrap.md

+62
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,51 @@ function symbol() external view returns (string)
856856
|---|---|---|
857857
| _0 | string | undefined |
858858

859+
### tokenByIndex
860+
861+
```solidity
862+
function tokenByIndex(uint256 index) external view returns (uint256)
863+
```
864+
865+
866+
867+
*See {IERC721Enumerable-tokenByIndex}.*
868+
869+
#### Parameters
870+
871+
| Name | Type | Description |
872+
|---|---|---|
873+
| index | uint256 | undefined |
874+
875+
#### Returns
876+
877+
| Name | Type | Description |
878+
|---|---|---|
879+
| _0 | uint256 | undefined |
880+
881+
### tokenOfOwnerByIndex
882+
883+
```solidity
884+
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256)
885+
```
886+
887+
888+
889+
*See {IERC721Enumerable-tokenOfOwnerByIndex}.*
890+
891+
#### Parameters
892+
893+
| Name | Type | Description |
894+
|---|---|---|
895+
| owner | address | undefined |
896+
| index | uint256 | undefined |
897+
898+
#### Returns
899+
900+
| Name | Type | Description |
901+
|---|---|---|
902+
| _0 | uint256 | undefined |
903+
859904
### tokenURI
860905

861906
```solidity
@@ -878,6 +923,23 @@ function tokenURI(uint256 _tokenId) external view returns (string)
878923
|---|---|---|
879924
| _0 | string | undefined |
880925

926+
### totalSupply
927+
928+
```solidity
929+
function totalSupply() external view returns (uint256)
930+
```
931+
932+
933+
934+
*See {IERC721Enumerable-totalSupply}.*
935+
936+
937+
#### Returns
938+
939+
| Name | Type | Description |
940+
|---|---|---|
941+
| _0 | uint256 | undefined |
942+
881943
### transferFrom
882944

883945
```solidity

0 commit comments

Comments
 (0)