* added _safeTransferFrom function * added safeMint functions * added package-lock.json for consistency, don't know why it changes * added initial suggestions/modifications * change _safeTransferFrom to internal, reverted package-lock.json to original, and changed ERC721Pausable to override _transferFrom instead of transferFrom * included tests for safeMint functions * modified safeMint tests to be on ERC721Mock contract * added safeMint to ERC721Mintable & respective test to ERC721MintBurn.behavior.js
30 lines
705 B
Solidity
30 lines
705 B
Solidity
pragma solidity ^0.5.0;
|
|
|
|
import "../token/ERC721/ERC721.sol";
|
|
|
|
/**
|
|
* @title ERC721Mock
|
|
* 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);
|
|
}
|
|
|
|
function safeMint(address to, uint256 tokenId, bytes memory _data) public {
|
|
_safeMint(to, tokenId, _data);
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|