Skip to content

Commit 76b4896

Browse files
Krishang NadgaudaKrishang Nadgauda
authored andcommitted
remove duplicate uri map
1 parent f9afb21 commit 76b4896

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

contracts/drop/SignatureDrop.sol

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ contract SignatureDrop is
103103
Mappings
104104
//////////////////////////////////////////////////////////////*/
105105

106-
/// @dev Mapping from tokenId => URI (for tokens minted with signature)
107-
mapping(uint256 => string) private uri;
108-
109106
/// @dev Mapping from claimer => condition Id => timestamp of last claim.
110107
mapping(address => mapping(bytes32 => uint256)) private lastClaimTimestamp;
111108

@@ -196,12 +193,8 @@ contract SignatureDrop is
196193
//////////////////////////////////////////////////////////////*/
197194

198195
/// @dev Returns the URI for a given tokenId.
199-
function tokenURI(uint256 _tokenId) public view override returns (string memory uriForToken) {
200-
uriForToken = uri[_tokenId];
201-
202-
if (bytes(uriForToken).length == 0) {
203-
uriForToken = string(abi.encodePacked(getBaseURI(_tokenId), _tokenId.toString()));
204-
}
196+
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
197+
return string(abi.encodePacked(getBaseURI(_tokenId), _tokenId.toString()));
205198
}
206199

207200
/// @dev See ERC 165

docs/SignatureDrop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ function thirdwebFee() external view returns (contract ITWFee)
937937
### tokenURI
938938

939939
```solidity
940-
function tokenURI(uint256 _tokenId) external view returns (string uriForToken)
940+
function tokenURI(uint256 _tokenId) external view returns (string)
941941
```
942942

943943

@@ -954,7 +954,7 @@ function tokenURI(uint256 _tokenId) external view returns (string uriForToken)
954954

955955
| Name | Type | Description |
956956
|---|---|---|
957-
| uriForToken | string | undefined
957+
| _0 | string | undefined
958958

959959
### totalSupply
960960

0 commit comments

Comments
 (0)