mysterybox1
This commit is contained in:
17
contracts/external/ERC721/ERC721.sol
vendored
17
contracts/external/ERC721/ERC721.sol
vendored
@@ -4,6 +4,7 @@
|
||||
pragma solidity 0.6.9;
|
||||
|
||||
import {IERC721} from "../../intf/IERC721.sol";
|
||||
import {IERC165} from "../../intf/IERC165.sol";
|
||||
import {IERC721Receiver} from "../../intf/IERC721Receiver.sol";
|
||||
import {IERC721Metadata} from "../../intf/IERC721Metadata.sol";
|
||||
import {ERC165} from "../utils/ERC165.sol";
|
||||
@@ -21,10 +22,12 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
|
||||
using Strings for uint256;
|
||||
|
||||
// Token name
|
||||
string private _name;
|
||||
string internal _name;
|
||||
|
||||
// Token symbol
|
||||
string private _symbol;
|
||||
string internal _symbol;
|
||||
|
||||
string internal _baseURI = "";
|
||||
|
||||
// Mapping from token ID to owner address
|
||||
mapping (uint256 => address) private _owners;
|
||||
@@ -84,20 +87,12 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
|
||||
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
|
||||
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
|
||||
|
||||
string memory baseURI = _baseURI();
|
||||
string memory baseURI = _baseURI;
|
||||
return bytes(baseURI).length > 0
|
||||
? string(abi.encodePacked(baseURI, tokenId.toString()))
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
|
||||
* in child contracts.
|
||||
*/
|
||||
function _baseURI() internal view virtual returns (string memory) {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev See {IERC721-approve}.
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ pragma solidity 0.6.9;
|
||||
|
||||
import {ERC721} from "./ERC721.sol";
|
||||
|
||||
contract InitializableERC1155 is ERC721 {
|
||||
contract InitializableERC721 is ERC721 {
|
||||
function init(
|
||||
address creator,
|
||||
string memory name,
|
||||
|
||||
Reference in New Issue
Block a user