Implement tokensByIndex extension
- Remove restrictions from mock mint and burn calls
This commit is contained in:
@ -12,6 +12,6 @@ contract ERC721BasicTokenMock is ERC721BasicToken {
|
||||
}
|
||||
|
||||
function burn(uint256 _tokenId) public {
|
||||
super.doBurn(_tokenId);
|
||||
super.doBurn(ownerOf(_tokenId), _tokenId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
pragma solidity ^0.4.18;
|
||||
|
||||
import "./ERC721BasicTokenMock.sol";
|
||||
import "../token/ERC721/ERC721Token.sol";
|
||||
|
||||
/**
|
||||
@ -8,13 +7,20 @@ import "../token/ERC721/ERC721Token.sol";
|
||||
* This mock just provides a public mint and burn functions for testing purposes,
|
||||
* and a mock metadata URI implementation
|
||||
*/
|
||||
contract ERC721TokenMock is ERC721Token, ERC721BasicTokenMock {
|
||||
contract ERC721TokenMock is ERC721Token {
|
||||
function ERC721TokenMock(string name, string symbol)
|
||||
ERC721BasicTokenMock()
|
||||
ERC721Token(name, symbol)
|
||||
public
|
||||
{ }
|
||||
|
||||
function mint(address _to, uint256 _tokenId) public {
|
||||
doMint(_to, _tokenId);
|
||||
}
|
||||
|
||||
function burn(uint256 _tokenId) public {
|
||||
doBurn(ownerOf(_tokenId), _tokenId);
|
||||
}
|
||||
|
||||
// Mock implementation for testing.
|
||||
// Do not use this code in production!
|
||||
function tokenURI(uint256 _tokenId) public view returns (string) {
|
||||
|
||||
Reference in New Issue
Block a user