ERC721GSNRecipientMock.sol 916 B

12345678910111213141516171819202122232425262728293031
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity >=0.6.0 <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. public
  13. ERC721(name, symbol)
  14. GSNRecipientSignature(trustedSigner)
  15. { }
  16. function mint(uint256 tokenId) public {
  17. _mint(_msgSender(), tokenId);
  18. }
  19. function _msgSender() internal view override(Context, GSNRecipient) returns (address payable) {
  20. return GSNRecipient._msgSender();
  21. }
  22. function _msgData() internal view override(Context, GSNRecipient) returns (bytes memory) {
  23. return GSNRecipient._msgData();
  24. }
  25. }