ERC721GSNRecipientMock.sol 875 B

1234567891011121314151617181920212223242526272829
  1. pragma solidity ^0.6.0;
  2. import "../token/ERC721/ERC721.sol";
  3. import "../GSN/GSNRecipient.sol";
  4. import "../GSN/GSNRecipientSignature.sol";
  5. /**
  6. * @title ERC721GSNRecipientMock
  7. * A simple ERC721 mock that has GSN support enabled
  8. */
  9. contract ERC721GSNRecipientMock is ERC721, GSNRecipient, GSNRecipientSignature {
  10. constructor(string memory name, string memory symbol, address trustedSigner)
  11. public
  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 payable) {
  19. return GSNRecipient._msgSender();
  20. }
  21. function _msgData() internal view override(Context, GSNRecipient) returns (bytes memory) {
  22. return GSNRecipient._msgData();
  23. }
  24. }