Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update mocks
  • Loading branch information
nventuro committed Mar 26, 2020
commit 626788f2c7e20a18b9ec83d76ac92aea908ec6d9
2 changes: 2 additions & 0 deletions contracts/mocks/ERC721BurnableMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ pragma solidity ^0.6.0;
import "../token/ERC721/ERC721Burnable.sol";

contract ERC721BurnableMock is ERC721Burnable {
constructor(string memory name, string memory symbol) public ERC721Burnable(name, symbol) { }

function mint(address to, uint256 tokenId) public {
_mint(to, tokenId);
}
Expand Down
37 changes: 0 additions & 37 deletions contracts/mocks/ERC721FullMock.sol

This file was deleted.

6 changes: 5 additions & 1 deletion contracts/mocks/ERC721GSNRecipientMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import "../GSN/GSNRecipientSignature.sol";
* A simple ERC721 mock that has GSN support enabled
*/
contract ERC721GSNRecipientMock is ERC721, GSNRecipient, GSNRecipientSignature {
constructor(address trustedSigner) public GSNRecipientSignature(trustedSigner) { }
constructor(string memory name, string memory symbol, address trustedSigner)
public
ERC721(name, symbol)
GSNRecipientSignature(trustedSigner)
{ }

function mint(uint256 tokenId) public {
_mint(_msgSender(), tokenId);
Expand Down
26 changes: 22 additions & 4 deletions contracts/mocks/ERC721Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,36 @@ import "../token/ERC721/ERC721.sol";
* This mock just provides a public safeMint, mint, and burn functions for testing purposes
*/
contract ERC721Mock is ERC721 {
function safeMint(address to, uint256 tokenId) public {
_safeMint(to, tokenId);
constructor (string memory name, string memory symbol) public ERC721(name, symbol) { }

function exists(uint256 tokenId) public view returns (bool) {
return _exists(tokenId);
}

function safeMint(address to, uint256 tokenId, bytes memory _data) public {
_safeMint(to, tokenId, _data);
function tokensOfOwner(address owner) public view returns (uint256[] memory) {
return _tokensOfOwner(owner);
}

function setTokenURI(uint256 tokenId, string memory uri) public {
_setTokenURI(tokenId, uri);
}

function setBaseURI(string memory baseURI) public {
_setBaseURI(baseURI);
}

function mint(address to, uint256 tokenId) public {
_mint(to, tokenId);
}

function safeMint(address to, uint256 tokenId) public {
_safeMint(to, tokenId);
}

function safeMint(address to, uint256 tokenId, bytes memory _data) public {
_safeMint(to, tokenId, _data);
}

function burn(uint256 tokenId) public {
_burn(tokenId);
}
Expand Down
2 changes: 2 additions & 0 deletions contracts/mocks/ERC721PausableMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import "../token/ERC721/ERC721Pausable.sol";
* This mock just provides a public mint, burn and exists functions for testing purposes
*/
contract ERC721PausableMock is ERC721Pausable {
constructor (string memory name, string memory symbol) public ERC721Pausable(name, symbol) { }

function mint(address to, uint256 tokenId) public {
super._mint(to, tokenId);
}
Expand Down