ERC721GSNRecipientMock.sol 885 B

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../token/ERC721/ERC721.sol";
  4. import "../GSN/GSNRecipient.sol";
  5. import "../GSN/GSNRecipientSignature.sol";
  6. /**
  7. * @title ERC721GSNRecipientMock
  8. * A simple ERC721 mock that has GSN support enabled
  9. */
  10. contract ERC721GSNRecipientMock is ERC721, GSNRecipient, GSNRecipientSignature {
  11. constructor(string memory name, string memory symbol, address trustedSigner)
  12. ERC721(name, symbol)
  13. GSNRecipientSignature(trustedSigner)
  14. { }
  15. function mint(uint256 tokenId) public {
  16. _mint(_msgSender(), tokenId);
  17. }
  18. function _msgSender() internal view override(Context, GSNRecipient) returns (address) {
  19. return GSNRecipient._msgSender();
  20. }
  21. function _msgData() internal view override(Context, GSNRecipient) returns (bytes memory) {
  22. return GSNRecipient._msgData();
  23. }
  24. }