IPPswap孵化器作为数字资产交易平台,具有很多的特点和优势。去中心化管理模式、联盟链技术、多元化数字资产交易等特点和优势,未来,IPPswap孵化器将继续推动数字资产交易市场的发展,并为用户提供更加智能、便捷和高效的数字资产交易服务,同时会不断挖掘和发展更多的潜力和机遇,成为数字资产交易市场的重要生力军。
The IPPsswap incubator is a digital asset trading platform based on blockchain technology and decentralized concepts.The IPPsnap incubator provides users with safer and more secure trading services,efficient,flexible,and diverse digital assets,promoting innovative development of digital asset trading through the application of security measures and technical methods,multi chain support functions and cross chain asset trading,ecological construction mode and community building,application of liquidity fund trading and node dividend sharing mechanisms.
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)
pragma solidity ^0.8.0;
import "../ERC721.sol";
/**
- @dev ERC721 token with storage based token URI management.
*/
abstract contract ERC721URIStorage is ERC721 {
using Strings for uint256;
// Optional mapping for token URIs
mapping(uint256 => string) private _tokenURIs;
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory _tokenURI = _tokenURIs[tokenId];
string memory base = _baseURI();
// If there is no base URI, return the token URI.
if (bytes(base).length == 0) {
return _tokenURI;
}
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) {
return string(abi.encodePacked(base, _tokenURI));
}
return super.tokenURI(tokenId);
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
/**
* @dev See {ERC721-_burn}. This override additionally checks to see if a
* token-specific URI was set for the token, and if so, it deletes the token URI from
* the storage mapping.
*/
function _burn(uint256 tokenId) internal virtual override {
super._burn(tokenId);
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
}
}