forked from OpenZeppelin/openzeppelin-contracts
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore specific warnings and make the rest into errors (OpenZeppelin#…
- Loading branch information
1 parent
669be68
commit c98490e
Showing
3 changed files
with
89 additions
and
2 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
contracts/mocks/ERC721ConsecutiveEnumerableMock.unreachable.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.0; | ||
|
||
import "../token/ERC721/extensions/ERC721Consecutive.sol"; | ||
import "../token/ERC721/extensions/ERC721Enumerable.sol"; | ||
|
||
contract ERC721ConsecutiveEnumerableMock is ERC721Consecutive, ERC721Enumerable { | ||
constructor( | ||
string memory name, | ||
string memory symbol, | ||
address[] memory receivers, | ||
uint96[] memory amounts | ||
) ERC721(name, symbol) { | ||
for (uint256 i = 0; i < receivers.length; ++i) { | ||
_mintConsecutive(receivers[i], amounts[i]); | ||
} | ||
} | ||
|
||
function supportsInterface(bytes4 interfaceId) | ||
public | ||
view | ||
virtual | ||
override(ERC721, ERC721Enumerable) | ||
returns (bool) | ||
{ | ||
return super.supportsInterface(interfaceId); | ||
} | ||
|
||
function _ownerOf(uint256 tokenId) internal view virtual override(ERC721, ERC721Consecutive) returns (address) { | ||
return super._ownerOf(tokenId); | ||
} | ||
|
||
function _mint(address to, uint256 tokenId) internal virtual override(ERC721, ERC721Consecutive) { | ||
super._mint(to, tokenId); | ||
} | ||
|
||
function _beforeTokenTransfer( | ||
address from, | ||
address to, | ||
uint256 tokenId | ||
) internal virtual override(ERC721, ERC721Enumerable) { | ||
super._beforeTokenTransfer(from, to, tokenId); | ||
} | ||
|
||
function _afterTokenTransfer( | ||
address from, | ||
address to, | ||
uint256 tokenId | ||
) internal virtual override(ERC721, ERC721Consecutive) { | ||
super._afterTokenTransfer(from, to, tokenId); | ||
} | ||
|
||
function _beforeConsecutiveTokenTransfer( | ||
address from, | ||
address to, | ||
uint256 first, | ||
uint96 size | ||
) internal virtual override(ERC721, ERC721Enumerable) { | ||
super._beforeConsecutiveTokenTransfer(from, to, first, size); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.