ERC721VotesMockUpgradeable.sol 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol";
  4. import "../proxy/utils/Initializable.sol";
  5. contract ERC721VotesMockUpgradeable is Initializable, ERC721VotesUpgradeable {
  6. function __ERC721VotesMock_init(string memory name, string memory symbol) internal onlyInitializing {
  7. __ERC721_init_unchained(name, symbol);
  8. __EIP712_init_unchained(name, "1");
  9. }
  10. function __ERC721VotesMock_init_unchained(string memory, string memory) internal onlyInitializing {}
  11. function getTotalSupply() public view returns (uint256) {
  12. return _getTotalSupply();
  13. }
  14. function mint(address account, uint256 tokenId) public {
  15. _mint(account, tokenId);
  16. }
  17. function burn(uint256 tokenId) public {
  18. _burn(tokenId);
  19. }
  20. function getChainId() external view returns (uint256) {
  21. return block.chainid;
  22. }
  23. /**
  24. * This empty reserved space is put in place to allow future versions to add new
  25. * variables without shifting down storage in the inheritance chain.
  26. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
  27. */
  28. uint256[50] private __gap;
  29. }