ERC721ConsecutiveEnumerableMock.sol 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.20;
  3. import {ERC721} from "../../token/ERC721/ERC721.sol";
  4. import {ERC721Consecutive} from "../../token/ERC721/extensions/ERC721Consecutive.sol";
  5. import {ERC721Enumerable} from "../../token/ERC721/extensions/ERC721Enumerable.sol";
  6. contract ERC721ConsecutiveEnumerableMock is ERC721Consecutive, ERC721Enumerable {
  7. constructor(
  8. string memory name,
  9. string memory symbol,
  10. address[] memory receivers,
  11. uint96[] memory amounts
  12. ) ERC721(name, symbol) {
  13. for (uint256 i = 0; i < receivers.length; ++i) {
  14. _mintConsecutive(receivers[i], amounts[i]);
  15. }
  16. }
  17. function supportsInterface(
  18. bytes4 interfaceId
  19. ) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
  20. return super.supportsInterface(interfaceId);
  21. }
  22. function _ownerOf(uint256 tokenId) internal view virtual override(ERC721, ERC721Consecutive) returns (address) {
  23. return super._ownerOf(tokenId);
  24. }
  25. function _update(
  26. address to,
  27. uint256 tokenId,
  28. address auth
  29. ) internal virtual override(ERC721Consecutive, ERC721Enumerable) returns (address) {
  30. return super._update(to, tokenId, auth);
  31. }
  32. function _increaseBalance(address account, uint128 amount) internal virtual override(ERC721, ERC721Enumerable) {
  33. super._increaseBalance(account, amount);
  34. }
  35. }