* Now only swapping when needed. * Removed _addTokenTo and _removeTokenFrom * Removed removeTokenFrom test. * Added tests for ERC721 _mint and _burn * _burn now uses the same swap and pop mechanism as _removeFromOwner * Gas optimization on burn
22 lines
470 B
Solidity
22 lines
470 B
Solidity
pragma solidity ^0.4.24;
|
|
|
|
import "../token/ERC721/ERC721.sol";
|
|
|
|
/**
|
|
* @title ERC721Mock
|
|
* This mock just provides a public mint and burn functions for testing purposes
|
|
*/
|
|
contract ERC721Mock is ERC721 {
|
|
function mint(address to, uint256 tokenId) public {
|
|
_mint(to, tokenId);
|
|
}
|
|
|
|
function burn(address owner, uint256 tokenId) public {
|
|
_burn(owner, tokenId);
|
|
}
|
|
|
|
function burn(uint256 tokenId) public {
|
|
_burn(tokenId);
|
|
}
|
|
}
|