ERC-721
Overview
Max Total Supply
0 DVOT
Holders
5,886
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 DVOTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
NFT
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; // TO DO: Explain the reason/advantadge to use ERC721URIStorage instead of ERC721 itself contract NFT is ERC721URIStorage { uint256 private _tokenIds; bool public _isTransferContract; mapping(address => bool) private _operator; mapping(address => bool) private _contractAddrerss; mapping(uint256 => DataToken) private _dataTokens; mapping(string => uint256) private eventType; string public _baseUri = ""; struct DataToken { uint256 tokenId; address creator; string ipfsId; uint256 package; uint256 numberTransfer; uint256 startAt; uint256 expriedAt; uint256 status; // mint = 1, transfer casino owner = 2, transfer lockup operator = 3 uint256 stakingStatus; // status staking = 1, sttaus unstaking = 2 } event EventToken( uint256 tokenId, address creator, string ipfsId, uint256 package, uint256 startAt, uint256 expriedAt, uint256 status, uint256 stakingStatus, uint256 eventTypeCode ); constructor( address addressOperator, string memory baseURI, string memory _name, string memory _symbol ) ERC721(_name, _symbol) { _operator[addressOperator] = true; _operator[msg.sender] = true; _baseUri = baseURI; _isTransferContract = false; eventType["mint"] = 1; eventType["buy"] = 2; eventType["update"] = 3; eventType["transfer_operator"] = 4; } /** * @dev Modifier to restrict access to minting functionality * @param contractAddress - The contract address * @return bool - The status of the contract address */ function onlyContractAddress(address contractAddress) internal view returns (bool) { if (_contractAddrerss[contractAddress] || address(this) == contractAddress){ return true; } return false; } /** * @dev Modifier to restrict access to minting functionality */ modifier onlyOperator() { require(_operator[msg.sender], "Not a minter"); _; } /** * @dev Function to set a new minter, only accessible by the contract owner * @param operator - The operator address * @param status - The status of the operator */ function setOperator(address operator, bool status) external onlyOperator { _operator[operator] = status; } /** * @dev Function to set a new contract address, only accessible by the contract owner * @param contractAddress - The contract address * @param status - The status of the contract address */ function setContractAddress(address contractAddress, bool status) external onlyOperator { _contractAddrerss[contractAddress] = status; } /** * @dev Function to set a new transfer contract, only accessible by the contract owner * @param status - The status of the transfer contract */ function setTransferContract(bool status) external onlyOperator { _isTransferContract = status; } /** * @dev Modifier to restrict access to minting functionality */ modifier onlyStaking { require(_contractAddrerss[msg.sender], "Only the specified staking contract will be executed"); _; } /** * @dev Mint tokens * @param ipfsIds - The IPFS hash of the token metadata * @param creator - The address of the creator * @return tokenIds - The token IDs of the minted tokens */ function mintTokens( string[] memory ipfsIds, address creator ) public onlyOperator returns (uint256[] memory) { require(ipfsIds.length > 0, "Token URIs must not be empty"); uint256[] memory tokenIds = new uint256[](ipfsIds.length); for (uint256 i = 0; i < ipfsIds.length; i++) { require(bytes(ipfsIds[i]).length != 0, "tokenURI must be nonzero"); _tokenIds += 1; uint256 tokenId = _tokenIds; _safeMint(creator, tokenId); // Default packages uint256 package = 1; // Number of transfers uint256 numberTransfer = 0; // Time start lockup uint256 startAt = 0; // Time end lockup; uint256 expriedAt = 0; // New mint status uint256 status = 1; // Staking status => unstaking uint256 stakingStatus = 2; _dataTokens[tokenId] = DataToken(tokenId, creator, ipfsIds[i], package, numberTransfer, startAt, expriedAt, status, stakingStatus); tokenIds[i] = tokenId; } setApprovalForAll(address(this), true); // Shoot the mint token event for each tokenId for (uint256 j = 0; j < tokenIds.length; j++) { emitEventToken(tokenIds[j], eventType["mint"]); } return tokenIds; } /** * @dev Mint token to casino owner * @param buytor_address - The buytor address * @param package - The package of the token * @param ipfsId - The IPFS hash of the token metadata * @param startAt - The start at of the token * @param expriedAt - The expried at of the token */ function mintToCasinoOwner( address buytor_address, uint256 package, string memory ipfsId, uint256 startAt, uint256 expriedAt ) public onlyOperator returns (uint256) { _tokenIds += 1; uint256 tokenId = _tokenIds; // Mint token to buytor _safeMint(buytor_address, tokenId); // Number of transfers uint256 numberTransfer = 0; // Status mint to casino owner uint256 status = 2; // Staking status => unstaking uint256 stakingStatus = 2; _dataTokens[tokenId] = DataToken(tokenId, buytor_address, ipfsId, package, numberTransfer, startAt, expriedAt, status, stakingStatus); setApprovalForAll(address(this), true); emitEventToken(tokenId, eventType["mint"]); return tokenId; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_dataTokens[tokenId].tokenId > 0, "ERC721Metadata: URI query for nonexistent token"); return string(abi.encodePacked(_baseUri, _dataTokens[tokenId].ipfsId)); } /** * @dev Set the base URI for all token IDs. */ function setBaseURI(string memory baseUri) public onlyOperator { _baseUri = baseUri; } /** Get the current token id */ function getTokenId() public view returns (uint256) { return _tokenIds; } /** Get tokens owned by me */ function getTokensOwnedByMe() public view returns (uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256 numberOfTokensOwned = balanceOf(msg.sender); uint256[] memory ownedTokenIds = new uint256[](numberOfTokensOwned); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (ownerOf(tokenId) != msg.sender) continue; ownedTokenIds[currentIndex] = tokenId; currentIndex += 1; } return ownedTokenIds; } /** * @dev Get tokens owned by address * @param walletAddress - The wallet address */ function getTokensOwnedByAddress(address walletAddress) public view returns (uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256 numberOfTokensOwned = balanceOf(walletAddress); uint256[] memory ownedTokenIds = new uint256[](numberOfTokensOwned); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (ownerOf(tokenId) != walletAddress) continue; ownedTokenIds[currentIndex] = tokenId; currentIndex += 1; } return ownedTokenIds; } /** Get token creator by id */ function getTokenCreatorById(uint256 tokenId) public view returns (address) { return _dataTokens[tokenId].creator; } /* * @dev Is token * @param tokenId - The token ID */ function isTokenId(uint256 tokenId) public view returns (bool) { if (_dataTokens[tokenId].tokenId > 0) { return true; } return false; } /** Get the token creator by my */ function getTokensCreatedByMe() public view returns (uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256 numberOfTokensCreated = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (_dataTokens[tokenId].creator != msg.sender) continue; numberOfTokensCreated += 1; } uint256[] memory createdTokenIds = new uint256[](numberOfTokensCreated); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (_dataTokens[tokenId].creator != msg.sender) continue; createdTokenIds[currentIndex] = tokenId; currentIndex += 1; } return createdTokenIds; } /** Get all token nft */ function getAllTokenNft() public view returns (uint256, uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256[] memory createdTokenIds = new uint256[](numberOfExistingTokens); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; createdTokenIds[currentIndex] = tokenId; currentIndex += 1; } return (numberOfExistingTokens, createdTokenIds); } /** Take out all nft and get new mint */ function getAllTokenNftMint() public view returns (uint256, uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256 numberOfTokensMint = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (_dataTokens[tokenId].status == 1){ numberOfTokensMint += 1; } } uint256[] memory createdTokenIds = new uint256[](numberOfTokensMint); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; // Status 1 = new minted nft if (_dataTokens[tokenId].status == 1) { createdTokenIds[currentIndex] = tokenId; currentIndex += 1; } } return (numberOfTokensMint, createdTokenIds); } /** Retrieve all nft transferred to casino owner */ function getAllTokenNftTransferCasinoOwner() public view returns (uint256, uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256 numberOfTokensTCO = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (_dataTokens[tokenId].status == 2){ numberOfTokensTCO += 1; } } uint256[] memory createdTokenIds = new uint256[](numberOfTokensTCO); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; // Status 2 = nft has been transferred to casino owner if (_dataTokens[tokenId].status == 2) { createdTokenIds[currentIndex] = tokenId; currentIndex += 1; } } return (numberOfTokensTCO, createdTokenIds); } /** Retrieve all nft transferred back to the casino owner */ function getAllTokenNftTransferOperator() public view returns (uint256, uint256[] memory) { uint256 numberOfExistingTokens = _tokenIds; uint256 numberOfTokensTO = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; if (_dataTokens[tokenId].status == 3){ numberOfTokensTO += 1; } } uint256[] memory createdTokenIds = new uint256[](numberOfTokensTO); uint256 currentIndex = 0; for (uint256 i = 0; i < numberOfExistingTokens; i++) { uint256 tokenId = i + 1; // status 3 = nft is transferred lockup by casino owner to operator if (_dataTokens[tokenId].status == 3) { createdTokenIds[currentIndex] = tokenId; currentIndex += 1; } } return (numberOfTokensTO, createdTokenIds); } /** * @dev Upgrade package * @param tokenId - The token ID * @param ipfsId - The IPFS hash of the token metadata * @param package - The package of the token * @param expriedAt - The expried at of the token */ function upgradePackage( uint256 tokenId, string memory ipfsId, uint256 package, uint256 expriedAt ) public payable onlyOperator returns (uint256){ _dataTokens[tokenId].ipfsId = ipfsId; _dataTokens[tokenId].package = package; _dataTokens[tokenId].expriedAt = expriedAt; emitEventToken(tokenId, eventType["update"]); return tokenId; } /** * @dev Emit event token * @param tokenId - The token ID * @param eventTypeCode - The event type code */ function emitEventToken(uint256 tokenId, uint256 eventTypeCode) internal { DataToken storage marketItem = _dataTokens[tokenId]; emit EventToken( marketItem.tokenId, marketItem.creator, marketItem.ipfsId, marketItem.package, marketItem.startAt, marketItem.expriedAt, marketItem.status, // Status staking marketItem.stakingStatus, eventTypeCode ); } /** * @dev Get data token * @param tokenId - The token ID */ function getDataToken(uint256 tokenId) public view returns (DataToken memory) { return _dataTokens[tokenId]; } /** * @dev Buy NFT * @param tokenId - The token ID * @param buytor_address - The buytor address * @param owner_address - The owner address * @param package - The package of the token */ function buyNft( uint256 tokenId, address buytor_address, address owner_address, uint256 package, string memory ipfsId, uint256 startAt, uint256 expriedAt ) public payable onlyOperator returns (uint256){ require(_dataTokens[tokenId].tokenId > 0 , "Token not found"); // Transfer token to buytor transferFrom(owner_address, buytor_address, tokenId); // Update data token _dataTokens[tokenId].package = package; _dataTokens[tokenId].ipfsId = ipfsId; _dataTokens[tokenId].creator = buytor_address; _dataTokens[tokenId].startAt = startAt; _dataTokens[tokenId].expriedAt = expriedAt; // Status transfer to the user _dataTokens[tokenId].status = 2; emitEventToken(tokenId, eventType["buy"]); return tokenId; } /** * @dev Transfer NFT to operator * @param tokenId - The token ID * @param operator - The operator address */ function transferToOperator( uint256 tokenId, address operator ) public payable returns (uint256) { require(_dataTokens[tokenId].tokenId > 0, "NFT not found"); // Transfer token to operator address owner = ownerOf(tokenId); transferFrom(owner, operator, tokenId); _dataTokens[tokenId].package = 1; _dataTokens[tokenId].creator = payable(operator); _dataTokens[tokenId].startAt = 0; _dataTokens[tokenId].expriedAt = 0; // Casino owner status transferred to operator _dataTokens[tokenId].status = 3; emitEventToken(tokenId, eventType["transfer_operator"]); return tokenId; } /** * @dev Update data token * @param tokenId - The token ID * @param ipfsId - The IPFS hash of the token metadata * @param package - The package of the token * @param expriedAt - The expried at of the token */ function updataDataToken( uint256 tokenId, string memory ipfsId, uint256 package, uint256 startAt, uint256 expriedAt ) public onlyOperator { _dataTokens[tokenId].ipfsId = ipfsId; _dataTokens[tokenId].package = package; _dataTokens[tokenId].startAt = startAt; _dataTokens[tokenId].expriedAt = expriedAt; emitEventToken(tokenId, eventType["uprage"]); } /** * @dev Update status staking * @param tokenId - The token ID * @param status - status staking */ function updataStakingStatus( uint256 tokenId, uint256 status ) external onlyStaking { _dataTokens[tokenId].stakingStatus = status; emitEventToken(tokenId, eventType["uprage"]); } /** * @dev Get NFT status * @param tokenId - The token ID */ function getNFTStatus( uint256 tokenId ) public view returns (bool, uint256, string memory) { require(tokenId > 0, "tokenId is required."); // Default value if object not found bool status = false; if (_dataTokens[tokenId].numberTransfer == 0) { status = true; } // Returns the default value if the object is not found return (status, _dataTokens[tokenId].package, tokenURI(tokenId)); } /** * @dev Check lockup NFT * @param tokenId - The token ID */ function checkLockupNFT( uint256 tokenId ) public view returns (bool, uint256, uint256) { require(tokenId > 0, "tokenId is required."); // Default value if object not found bool isExpred = false; if (_dataTokens[tokenId].expriedAt != 0 && block.timestamp < _dataTokens[tokenId].expriedAt) { isExpred = true; } return (isExpred, _dataTokens[tokenId].package, block.timestamp); } /** * @dev Transfer from * @param from - The from address * @param to - The to address * @param tokenId - The token ID */ function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) { // The transfer condition to another exchange only works when configured to allow transfer to another contract or specified contracts if (!_isTransferContract && isContract(to) && !onlyContractAddress(to)) { revert("Not a contract address or token is pending during lockup"); } // During the lockup period, transfers are not allowed. Status = 2 is transferred to the casino owner if (_dataTokens[tokenId].status == 2 && _dataTokens[tokenId].expriedAt > 0 && block.timestamp < _dataTokens[tokenId].expriedAt) { revert("Currently in lockup period"); } // If nft is staking, it cannot be transferred. stakingStatus = 1 is staking if (_dataTokens[tokenId].stakingStatus == 1) { revert("NFT is staking so transfer is not allowed"); } super.transferFrom(from, to, tokenId); _dataTokens[tokenId].numberTransfer = (_dataTokens[tokenId].numberTransfer + 1); } /** * @dev Check contract address * @param contractAddress - The address */ function isContract(address contractAddress) public view returns (bool) { uint32 size; assembly { size := extcodesize(contractAddress) } return (size > 0); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4906.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; import {IERC721} from "./IERC721.sol"; /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "./IERC721.sol"; import {IERC721Receiver} from "./IERC721Receiver.sol"; import {IERC721Metadata} from "./extensions/IERC721Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {Strings} from "../../utils/Strings.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { return _tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets * the `spender` for the specific `tokenId`. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { unchecked { _balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { _balances[from] -= 1; } } if (to != address(0)) { unchecked { _balances[to] += 1; } } _owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); _checkOnERC721Received(address(0), to, tokenId, data); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC721 standard to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } _tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC721InvalidOperator(operator); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { revert ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { revert ERC721InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; import {Strings} from "../../../utils/Strings.sol"; import {IERC4906} from "../../../interfaces/IERC4906.sol"; import {IERC165} from "../../../interfaces/IERC165.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is IERC4906, ERC721 { using Strings for uint256; // Interface ID as defined in ERC-4906. This does not correspond to a traditional interface ID as ERC-4906 only // defines events and does not include any external function. bytes4 private constant ERC4906_INTERFACE_ID = bytes4(0x49064906); // Optional mapping for token URIs mapping(uint256 tokenId => string) private _tokenURIs; /** * @dev See {IERC165-supportsInterface} */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { return interfaceId == ERC4906_INTERFACE_ID || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireOwned(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 string.concat). if (bytes(_tokenURI).length > 0) { return string.concat(base, _tokenURI); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Emits {MetadataUpdate}. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { _tokenURIs[tokenId] = _tokenURI; emit MetadataUpdate(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"addressOperator","type":"address"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"string","name":"ipfsId","type":"string"},{"indexed":false,"internalType":"uint256","name":"package","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expriedAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"status","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stakingStatus","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eventTypeCode","type":"uint256"}],"name":"EventToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_isTransferContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"buytor_address","type":"address"},{"internalType":"address","name":"owner_address","type":"address"},{"internalType":"uint256","name":"package","type":"uint256"},{"internalType":"string","name":"ipfsId","type":"string"},{"internalType":"uint256","name":"startAt","type":"uint256"},{"internalType":"uint256","name":"expriedAt","type":"uint256"}],"name":"buyNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"checkLockupNFT","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTokenNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTokenNftMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTokenNftTransferCasinoOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllTokenNftTransferOperator","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getDataToken","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"string","name":"ipfsId","type":"string"},{"internalType":"uint256","name":"package","type":"uint256"},{"internalType":"uint256","name":"numberTransfer","type":"uint256"},{"internalType":"uint256","name":"startAt","type":"uint256"},{"internalType":"uint256","name":"expriedAt","type":"uint256"},{"internalType":"uint256","name":"status","type":"uint256"},{"internalType":"uint256","name":"stakingStatus","type":"uint256"}],"internalType":"struct NFT.DataToken","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNFTStatus","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenCreatorById","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensCreatedByMe","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"walletAddress","type":"address"}],"name":"getTokensOwnedByAddress","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensOwnedByMe","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isContract","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buytor_address","type":"address"},{"internalType":"uint256","name":"package","type":"uint256"},{"internalType":"string","name":"ipfsId","type":"string"},{"internalType":"uint256","name":"startAt","type":"uint256"},{"internalType":"uint256","name":"expriedAt","type":"uint256"}],"name":"mintToCasinoOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"ipfsIds","type":"string[]"},{"internalType":"address","name":"creator","type":"address"}],"name":"mintTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setTransferContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"operator","type":"address"}],"name":"transferToOperator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"ipfsId","type":"string"},{"internalType":"uint256","name":"package","type":"uint256"},{"internalType":"uint256","name":"startAt","type":"uint256"},{"internalType":"uint256","name":"expriedAt","type":"uint256"}],"name":"updataDataToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"status","type":"uint256"}],"name":"updataStakingStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"ipfsId","type":"string"},{"internalType":"uint256","name":"package","type":"uint256"},{"internalType":"uint256","name":"expriedAt","type":"uint256"}],"name":"upgradePackage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60a060405260006080908152600d906200001a9082620001ff565b503480156200002857600080fd5b50604051620035a9380380620035a98339810160408190526200004b916200037a565b818160006200005b8382620001ff565b5060016200006a8282620001ff565b5050506001600160a01b0384166000908152600960205260408082208054600160ff1991821681179092553384529190922080549091169091179055600d620000b48482620001ff565b50506008805460ff19169055505060408051631b5a5b9d60e21b8152600c60048083018290528351928390036024018320600190556262757960e81b835260038084018390528451938490036023018420600290556575706461746560d01b845260068401839052845193849003602601842055703a3930b739b332b92fb7b832b930ba37b960791b83526011830191909152915190819003603101902055506200042c565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200018557607f821691505b602082108103620001a657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001fa57600081815260208120601f850160051c81016020861015620001d55750805b601f850160051c820191505b81811015620001f657828155600101620001e1565b5050505b505050565b81516001600160401b038111156200021b576200021b6200015a565b62000233816200022c845462000170565b84620001ac565b602080601f8311600181146200026b5760008415620002525750858301515b600019600386901b1c1916600185901b178555620001f6565b600085815260208120601f198616915b828110156200029c578886015182559484019460019091019084016200027b565b5085821015620002bb5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f830112620002dd57600080fd5b81516001600160401b0380821115620002fa57620002fa6200015a565b604051601f8301601f19908116603f011681019082821181831017156200032557620003256200015a565b816040528381526020925086838588010111156200034257600080fd5b600091505b8382101562000366578582018301518183018401529082019062000347565b600093810190920192909252949350505050565b600080600080608085870312156200039157600080fd5b84516001600160a01b0381168114620003a957600080fd5b60208601519094506001600160401b0380821115620003c757600080fd5b620003d588838901620002cb565b94506040870151915080821115620003ec57600080fd5b620003fa88838901620002cb565b935060608701519150808211156200041157600080fd5b506200042087828801620002cb565b91505092959194509250565b61316d806200043c6000396000f3fe60806040526004361061023b5760003560e01c80635ba377421161012e578063a51a5e3b116100ab578063c88388e81161006f578063c88388e8146106b6578063e1af3e51146106e5578063e985e9c514610705578063f56bbdd014610725578063f5b7c48f1461074557600080fd5b8063a51a5e3b14610621578063b88d4fde14610641578063b8bb07d714610661578063c280d61514610676578063c87b56dd1461069657600080fd5b806370a08231116100f257806370a082311461058057806381e6239c146105a0578063867d3397146105b357806395d89b41146105ec578063a22cb4651461060157600080fd5b80635ba37742146104f45780635f8ea381146105095780636352211e1461051e5780636685e7361461053e5780636f25c34d1461056b57600080fd5b806316279055116101bc57806342842e0e1161018057806342842e0e1461046157806348756c1714610481578063558a7297146104a157806355f804b3146104c1578063571109a4146104e157600080fd5b806316279055146103c257806323b872dd146103e9578063252c719014610409578063319d6eda146104295780633e63eb2a1461044c57600080fd5b806309d7f78f1161020357806309d7f78f146103105780630a989d9c146103305780630bf95cc2146103525780630f105f101461038f5780630f9facbe146103af57600080fd5b8063010a38f51461024057806301ffc9a71461026457806306fdde0314610294578063081812fc146102b6578063095ea7b3146102ee575b600080fd5b34801561024c57600080fd5b506007545b6040519081526020015b60405180910390f35b34801561027057600080fd5b5061028461027f3660046126be565b61075f565b604051901515815260200161025b565b3480156102a057600080fd5b506102a961078a565b60405161025b9190612728565b3480156102c257600080fd5b506102d66102d136600461273b565b61081c565b6040516001600160a01b03909116815260200161025b565b3480156102fa57600080fd5b5061030e610309366004612770565b610845565b005b34801561031c57600080fd5b5061028461032b36600461273b565b610854565b34801561033c57600080fd5b50610345610878565b60405161025b91906127d5565b34801561035e57600080fd5b5061037261036d36600461273b565b610953565b60408051931515845260208401929092529082015260600161025b565b34801561039b57600080fd5b5061030e6103aa3660046128a5565b6109f9565b6102516103bd366004612906565b610aa3565b3480156103ce57600080fd5b506102846103dd366004612932565b3b63ffffffff16151590565b3480156103f557600080fd5b5061030e61040436600461294d565b610b82565b34801561041557600080fd5b50610345610424366004612989565b610d6c565b34801561043557600080fd5b5061043e61108a565b60405161025b929190612a5d565b34801561045857600080fd5b506102a96111af565b34801561046d57600080fd5b5061030e61047c36600461294d565b61123d565b34801561048d57600080fd5b5061034561049c366004612932565b61125d565b3480156104ad57600080fd5b5061030e6104bc366004612a86565b611342565b3480156104cd57600080fd5b5061030e6104dc366004612ab0565b61139c565b6102516104ef366004612ae4565b6113d7565b34801561050057600080fd5b506103456114eb565b34801561051557600080fd5b5061043e61161e565b34801561052a57600080fd5b506102d661053936600461273b565b611737565b34801561054a57600080fd5b5061055e61055936600461273b565b611742565b60405161025b9190612b68565b34801561057757600080fd5b5061043e6118aa565b34801561058c57600080fd5b5061025161059b366004612932565b61195d565b6102516105ae366004612bf8565b6119a5565b3480156105bf57600080fd5b506102d66105ce36600461273b565b6000908152600b60205260409020600101546001600160a01b031690565b3480156105f857600080fd5b506102a9611a36565b34801561060d57600080fd5b5061030e61061c366004612a86565b611a45565b34801561062d57600080fd5b5061025161063c366004612c4e565b611a50565b34801561064d57600080fd5b5061030e61065c366004612cb6565b611bb0565b34801561066d57600080fd5b5061043e611bcd565b34801561068257600080fd5b5061030e610691366004612d31565b611ce6565b3480156106a257600080fd5b506102a96106b136600461273b565b611d28565b3480156106c257600080fd5b506106d66106d136600461273b565b611ddd565b60405161025b93929190612d4c565b3480156106f157600080fd5b5061030e610700366004612a86565b611e70565b34801561071157600080fd5b50610284610720366004612d76565b611eca565b34801561073157600080fd5b5061030e610740366004612da0565b611ef8565b34801561075157600080fd5b506008546102849060ff1681565b60006001600160e01b03198216632483248360e11b1480610784575061078482611fa8565b92915050565b60606000805461079990612dc2565b80601f01602080910402602001604051908101604052809291908181526020018280546107c590612dc2565b80156108125780601f106107e757610100808354040283529160200191610812565b820191906000526020600020905b8154815290600101906020018083116107f557829003601f168201915b5050505050905090565b600061082782611ff8565b506000828152600460205260409020546001600160a01b0316610784565b610850828233612031565b5050565b6000818152600b60205260408120541561087057506001919050565b506000919050565b60075460609060006108893361195d565b90506000816001600160401b038111156108a5576108a56127e8565b6040519080825280602002602001820160405280156108ce578160200160208202803683370190505b5090506000805b848110156109495760006108ea826001612e12565b9050336108f682611737565b6001600160a01b03161461090a5750610937565b8084848151811061091d5761091d612e25565b6020908102919091010152610933600184612e12565b9250505b8061094181612e3b565b9150506108d5565b5090949350505050565b60008060008084116109a35760405162461bcd60e51b81526020600482015260146024820152733a37b5b2b724b21034b9903932b8bab4b932b21760611b60448201526064015b60405180910390fd5b6000848152600b6020526040812060060154158015906109d357506000858152600b602052604090206006015442105b156109dc575060015b6000948552600b6020526040909420600301549394429350915050565b3360009081526009602052604090205460ff16610a285760405162461bcd60e51b815260040161099a90612e54565b6000858152600b60205260409020600201610a438582612ec8565b506000858152600b602052604090819020600381018590556005810184905560060182905551610a9c908690600c90610a88906575707261676560d01b815260060190565b90815260200160405180910390205461203e565b5050505050565b6000828152600b6020526040812054610aee5760405162461bcd60e51b815260206004820152600d60248201526c139195081b9bdd08199bdd5b99609a1b604482015260640161099a565b6000610af984611737565b9050610b06818486610b82565b6000848152600b60205260408082206001600380830182905590820180546001600160a01b0319166001600160a01b0389161790556005820184905560068201939093556007019190915551703a3930b739b332b92fb7b832b930ba37b960791b8152610b7a908590600c90601101610a88565b509192915050565b60085460ff16158015610b9b5750813b63ffffffff1615155b8015610bad5750610bab826120c4565b155b15610c205760405162461bcd60e51b815260206004820152603860248201527f4e6f74206120636f6e74726163742061646472657373206f7220746f6b656e2060448201527f69732070656e64696e6720647572696e67206c6f636b75700000000000000000606482015260840161099a565b6000818152600b60205260409020600701546002148015610c5157506000818152600b602052604090206006015415155b8015610c6d57506000818152600b602052604090206006015442105b15610cba5760405162461bcd60e51b815260206004820152601a60248201527f43757272656e746c7920696e206c6f636b757020706572696f64000000000000604482015260640161099a565b6000818152600b6020526040902060080154600103610d2d5760405162461bcd60e51b815260206004820152602960248201527f4e4654206973207374616b696e6720736f207472616e73666572206973206e6f6044820152681d08185b1b1bddd95960ba1b606482015260840161099a565b610d38838383612100565b6000818152600b6020526040902060040154610d55906001612e12565b6000918252600b6020526040909120600401555050565b3360009081526009602052604090205460609060ff16610d9e5760405162461bcd60e51b815260040161099a90612e54565b6000835111610def5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e2055524973206d757374206e6f7420626520656d70747900000000604482015260640161099a565b600083516001600160401b03811115610e0a57610e0a6127e8565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b50905060005b845181101561102257848181518110610e5457610e54612e25565b602002602001015151600003610eac5760405162461bcd60e51b815260206004820152601860248201527f746f6b656e555249206d757374206265206e6f6e7a65726f0000000000000000604482015260640161099a565b600160076000828254610ebf9190612e12565b9091555050600754610ed18582612185565b600060019050600080600080600190506000600290506040518061012001604052808881526020018c6001600160a01b031681526020018d8a81518110610f1a57610f1a612e25565b6020026020010151815260200187815260200186815260200185815260200184815260200183815260200182815250600b60008981526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506040820151816002019081610fa89190612ec8565b50606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155610100820151816008015590505086898981518110610ffc57610ffc612e25565b60200260200101818152505050505050505050808061101a90612e3b565b915050610e39565b5061102e306001611a45565b60005b81518110156110825761107082828151811061104f5761104f612e25565b6020026020010151600c604051610a8890631b5a5b9d60e21b815260040190565b8061107a81612e3b565b915050611031565b509392505050565b60075460009060609082805b828110156110e85760006110ab826001612e12565b6000818152600b60205260409020600701549091506001036110d5576110d2600184612e12565b92505b50806110e081612e3b565b915050611096565b506000816001600160401b03811115611103576111036127e8565b60405190808252806020026020018201604052801561112c578160200160208202803683370190505b5090506000805b848110156111a3576000611148826001612e12565b6000818152600b6020526040902060070154909150600103611190578084848151811061117757611177612e25565b602090810291909101015261118d600184612e12565b92505b508061119b81612e3b565b915050611133565b50919590945092505050565b600d80546111bc90612dc2565b80601f01602080910402602001604051908101604052809291908181526020018280546111e890612dc2565b80156112355780601f1061120a57610100808354040283529160200191611235565b820191906000526020600020905b81548152906001019060200180831161121857829003601f168201915b505050505081565b61125883838360405180602001604052806000815250611bb0565b505050565b600754606090600061126e8461195d565b90506000816001600160401b0381111561128a5761128a6127e8565b6040519080825280602002602001820160405280156112b3578160200160208202803683370190505b5090506000805b848110156113375760006112cf826001612e12565b9050876001600160a01b03166112e482611737565b6001600160a01b0316146112f85750611325565b8084848151811061130b5761130b612e25565b6020908102919091010152611321600184612e12565b9250505b8061132f81612e3b565b9150506112ba565b509095945050505050565b3360009081526009602052604090205460ff166113715760405162461bcd60e51b815260040161099a90612e54565b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b3360009081526009602052604090205460ff166113cb5760405162461bcd60e51b815260040161099a90612e54565b600d6108508282612ec8565b3360009081526009602052604081205460ff166114065760405162461bcd60e51b815260040161099a90612e54565b6000888152600b60205260409020546114535760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881b9bdd08199bdd5b99608a1b604482015260640161099a565b61145e86888a610b82565b6000888152600b60205260409020600381018690556002016114808582612ec8565b506000888152600b6020526040908190206001810180546001600160a01b0319166001600160a01b038b1617905560058101859055600681018490556002600790910155516262757960e81b81526114df908990600c90600301610a88565b50959695505050505050565b6007546060906000805b8281101561155557600061150a826001612e12565b6000818152600b60205260409020600101549091506001600160a01b031633146115345750611543565b61153f600184612e12565b9250505b8061154d81612e3b565b9150506114f5565b506000816001600160401b03811115611570576115706127e8565b604051908082528060200260200182016040528015611599578160200160208202803683370190505b5090506000805b848110156109495760006115b5826001612e12565b6000818152600b60205260409020600101549091506001600160a01b031633146115df575061160c565b808484815181106115f2576115f2612e25565b6020908102919091010152611608600184612e12565b9250505b8061161681612e3b565b9150506115a0565b60075460009060609082805b8281101561167c57600061163f826001612e12565b6000818152600b602052604090206007015490915060030361166957611666600184612e12565b92505b508061167481612e3b565b91505061162a565b506000816001600160401b03811115611697576116976127e8565b6040519080825280602002602001820160405280156116c0578160200160208202803683370190505b5090506000805b848110156111a35760006116dc826001612e12565b6000818152600b6020526040902060070154909150600303611724578084848151811061170b5761170b612e25565b6020908102919091010152611721600184612e12565b92505b508061172f81612e3b565b9150506116c7565b600061078482611ff8565b61179a6040518061012001604052806000815260200160006001600160a01b03168152602001606081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000828152600b60209081526040918290208251610120810184528154815260018201546001600160a01b03169281019290925260028101805492939192918401916117e590612dc2565b80601f016020809104026020016040519081016040528092919081815260200182805461181190612dc2565b801561185e5780601f106118335761010080835404028352916020019161185e565b820191906000526020600020905b81548152906001019060200180831161184157829003601f168201915b5050505050815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b60075460009060609082816001600160401b038111156118cc576118cc6127e8565b6040519080825280602002602001820160405280156118f5578160200160208202803683370190505b5090506000805b83811015611952576000611911826001612e12565b90508084848151811061192657611926612e25565b602090810291909101015261193c600184612e12565b925050808061194a90612e3b565b9150506118fc565b509194909350915050565b60006001600160a01b038216611989576040516322718ad960e21b81526000600482015260240161099a565b506001600160a01b031660009081526003602052604090205490565b3360009081526009602052604081205460ff166119d45760405162461bcd60e51b815260040161099a90612e54565b6000858152600b602052604090206002016119ef8582612ec8565b506000858152600b6020526040908190206003810185905560060183905551611a2d908690600c90610a88906575706461746560d01b815260060190565b50929392505050565b60606001805461079990612dc2565b61085033838361219f565b3360009081526009602052604081205460ff16611a7f5760405162461bcd60e51b815260040161099a90612e54565b600160076000828254611a929190612e12565b9091555050600754611aa48782612185565b60408051610120810182528281526001600160a01b0389811660208084019182528385018a8152606085018c905260006080860181905260a086018b905260c086018a9052600260e087018190526101008701819052888252600b9093529586208551815592516001840180546001600160a01b031916919095161790935591519192839290919081840190611b3a9082612ec8565b50606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151600782015561010090910151600890910155611b85306001611a45565b611ba284600c604051610a8890631b5a5b9d60e21b815260040190565b509198975050505050505050565b611bbb848484610b82565b611bc78484848461223e565b50505050565b60075460009060609082805b82811015611c2b576000611bee826001612e12565b6000818152600b6020526040902060070154909150600203611c1857611c15600184612e12565b92505b5080611c2381612e3b565b915050611bd9565b506000816001600160401b03811115611c4657611c466127e8565b604051908082528060200260200182016040528015611c6f578160200160208202803683370190505b5090506000805b848110156111a3576000611c8b826001612e12565b6000818152600b6020526040902060070154909150600203611cd35780848481518110611cba57611cba612e25565b6020908102919091010152611cd0600184612e12565b92505b5080611cde81612e3b565b915050611c76565b3360009081526009602052604090205460ff16611d155760405162461bcd60e51b815260040161099a90612e54565b6008805460ff1916911515919091179055565b6000818152600b6020526040902054606090611d9e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161099a565b600d600b6000848152602001908152602001600020600201604051602001611dc7929190612ffa565b6040516020818303038152906040529050919050565b600080606060008411611e295760405162461bcd60e51b81526020600482015260146024820152733a37b5b2b724b21034b9903932b8bab4b932b21760611b604482015260640161099a565b6000848152600b60205260408120600401548103611e45575060015b6000858152600b60205260409020600301548190611e6287611d28565b935093509350509193909250565b3360009081526009602052604090205460ff16611e9f5760405162461bcd60e51b815260040161099a90612e54565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336000908152600a602052604090205460ff16611f745760405162461bcd60e51b815260206004820152603460248201527f4f6e6c792074686520737065636966696564207374616b696e6720636f6e74726044820152731858dd081dda5b1b08189948195e1958dd5d195960621b606482015260840161099a565b6000828152600b602052604090819020600801829055516575707261676560d01b8152610850908390600c90600601610a88565b60006001600160e01b031982166380ac58cd60e01b1480611fd957506001600160e01b03198216635b5e139f60e01b145b8061078457506301ffc9a760e01b6001600160e01b0319831614610784565b6000818152600260205260408120546001600160a01b03168061078457604051637e27328960e01b81526004810184905260240161099a565b6112588383836001612360565b6000828152600b6020526040908190208054600182015460038301546005840154600685015460078601546008870154975196977fab9408b7d8f776fd97c3f68d285c256894a296f5e00796d1537c458907cef65e976120b797966001600160a01b03169560028b019590949093909290918c9061300f565b60405180910390a1505050565b6001600160a01b0381166000908152600a602052604081205460ff16806120f35750306001600160a01b038316145b1561087057506001919050565b6001600160a01b03821661212a57604051633250574960e11b81526000600482015260240161099a565b6000612137838333612466565b9050836001600160a01b0316816001600160a01b031614611bc7576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640161099a565b61085082826040518060200160405280600081525061255f565b6001600160a01b0382166121d157604051630b61174360e31b81526001600160a01b038316600482015260240161099a565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b15611bc757604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906122809033908890879087906004016130dd565b6020604051808303816000875af19250505080156122bb575060408051601f3d908101601f191682019092526122b89181019061311a565b60015b612324573d8080156122e9576040519150601f19603f3d011682016040523d82523d6000602084013e6122ee565b606091505b50805160000361231c57604051633250574960e11b81526001600160a01b038516600482015260240161099a565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14610a9c57604051633250574960e11b81526001600160a01b038516600482015260240161099a565b808061237457506001600160a01b03821615155b1561243657600061238484611ff8565b90506001600160a01b038316158015906123b05750826001600160a01b0316816001600160a01b031614155b80156123c357506123c18184611eca565b155b156123ec5760405163a9fbf51f60e01b81526001600160a01b038416600482015260240161099a565b81156124345783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120546001600160a01b039081169083161561249357612493818486612576565b6001600160a01b038116156124d1576124b0600085600080612360565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615612500576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b61256983836125da565b611258600084848461223e565b61258183838361263f565b611258576001600160a01b0383166125af57604051637e27328960e01b81526004810182905260240161099a565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440161099a565b6001600160a01b03821661260457604051633250574960e11b81526000600482015260240161099a565b600061261283836000612466565b90506001600160a01b03811615611258576040516339e3563760e11b81526000600482015260240161099a565b60006001600160a01b0383161580159061269d5750826001600160a01b0316846001600160a01b0316148061267957506126798484611eca565b8061269d57506000828152600460205260409020546001600160a01b038481169116145b949350505050565b6001600160e01b0319811681146126bb57600080fd5b50565b6000602082840312156126d057600080fd5b81356126db816126a5565b9392505050565b6000815180845260005b81811015612708576020818501810151868301820152016126ec565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006126db60208301846126e2565b60006020828403121561274d57600080fd5b5035919050565b80356001600160a01b038116811461276b57600080fd5b919050565b6000806040838503121561278357600080fd5b61278c83612754565b946020939093013593505050565b600081518084526020808501945080840160005b838110156127ca578151875295820195908201906001016127ae565b509495945050505050565b6020815260006126db602083018461279a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612826576128266127e8565b604052919050565b60006001600160401b03831115612847576128476127e8565b61285a601f8401601f19166020016127fe565b905082815283838301111561286e57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261289657600080fd5b6126db8383356020850161282e565b600080600080600060a086880312156128bd57600080fd5b8535945060208601356001600160401b038111156128da57600080fd5b6128e688828901612885565b959895975050505060408401359360608101359360809091013592509050565b6000806040838503121561291957600080fd5b8235915061292960208401612754565b90509250929050565b60006020828403121561294457600080fd5b6126db82612754565b60008060006060848603121561296257600080fd5b61296b84612754565b925061297960208501612754565b9150604084013590509250925092565b6000806040838503121561299c57600080fd5b82356001600160401b03808211156129b357600080fd5b818501915085601f8301126129c757600080fd5b81356020828211156129db576129db6127e8565b8160051b6129ea8282016127fe565b928352848101820192828101908a851115612a0457600080fd5b83870192505b84831015612a4057823586811115612a225760008081fd5b612a308c86838b0101612885565b8352509183019190830190612a0a565b9750612a50915050878201612754565b9450505050509250929050565b82815260406020820152600061269d604083018461279a565b8035801515811461276b57600080fd5b60008060408385031215612a9957600080fd5b612aa283612754565b915061292960208401612a76565b600060208284031215612ac257600080fd5b81356001600160401b03811115612ad857600080fd5b61269d84828501612885565b600080600080600080600060e0888a031215612aff57600080fd5b87359650612b0f60208901612754565b9550612b1d60408901612754565b94506060880135935060808801356001600160401b03811115612b3f57600080fd5b612b4b8a828b01612885565b93505060a0880135915060c0880135905092959891949750929550565b602081528151602082015260006020830151612b8f60408401826001600160a01b03169052565b506040830151610120806060850152612bac6101408501836126e2565b915060608501516080850152608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100818187015280870151838701525050508091505092915050565b60008060008060808587031215612c0e57600080fd5b8435935060208501356001600160401b03811115612c2b57600080fd5b612c3787828801612885565b949794965050505060408301359260600135919050565b600080600080600060a08688031215612c6657600080fd5b612c6f86612754565b94506020860135935060408601356001600160401b03811115612c9157600080fd5b612c9d88828901612885565b9598949750949560608101359550608001359392505050565b60008060008060808587031215612ccc57600080fd5b612cd585612754565b9350612ce360208601612754565b92506040850135915060608501356001600160401b03811115612d0557600080fd5b8501601f81018713612d1657600080fd5b612d258782356020840161282e565b91505092959194509250565b600060208284031215612d4357600080fd5b6126db82612a76565b8315158152826020820152606060408201526000612d6d60608301846126e2565b95945050505050565b60008060408385031215612d8957600080fd5b612d9283612754565b915061292960208401612754565b60008060408385031215612db357600080fd5b50508035926020909101359150565b600181811c90821680612dd657607f821691505b602082108103612df657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561078457610784612dfc565b634e487b7160e01b600052603260045260246000fd5b600060018201612e4d57612e4d612dfc565b5060010190565b6020808252600c908201526b2737ba10309036b4b73a32b960a11b604082015260600190565b601f82111561125857600081815260208120601f850160051c81016020861015612ea15750805b601f850160051c820191505b81811015612ec057828155600101612ead565b505050505050565b81516001600160401b03811115612ee157612ee16127e8565b612ef581612eef8454612dc2565b84612e7a565b602080601f831160018114612f2a5760008415612f125750858301515b600019600386901b1c1916600185901b178555612ec0565b600085815260208120601f198616915b82811015612f5957888601518255948401946001909101908401612f3a565b5085821015612f775787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008154612f9481612dc2565b60018281168015612fac5760018114612fc157612ff0565b60ff1984168752821515830287019450612ff0565b8560005260208060002060005b85811015612fe75781548a820152908401908201612fce565b50505082870194505b5050505092915050565b600061269d6130098386612f87565b84612f87565b60006101208b8352602060018060a01b038c168185015281604085015260008b5461303981612dc2565b938601849052610140936001828116801561305b5760018114613075576130a3565b60ff1984168988015282151560051b8901870194506130a3565b8f6000528560002060005b8481101561309b5781548b82018a0152908301908701613080565b8a0188019550505b50505050606085019a909a52505050608081019590955260a085019390935260c084019190915260e0830152610100909101529392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613110908301846126e2565b9695505050505050565b60006020828403121561312c57600080fd5b81516126db816126a556fea2646970667358221220f7e7969f45af51be1a9836c85ed9cb77956592cdfb483625ccd6795970894e7064736f6c63430008140033000000000000000000000000f009c654d3397a2c2b061e2b00f30e79f9a7b51e000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001568747470733a2f2f697066732e696f2f697066732f00000000000000000000000000000000000000000000000000000000000000000000000000000000000014447265616d56657273654f776e6572546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444564f5400000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061023b5760003560e01c80635ba377421161012e578063a51a5e3b116100ab578063c88388e81161006f578063c88388e8146106b6578063e1af3e51146106e5578063e985e9c514610705578063f56bbdd014610725578063f5b7c48f1461074557600080fd5b8063a51a5e3b14610621578063b88d4fde14610641578063b8bb07d714610661578063c280d61514610676578063c87b56dd1461069657600080fd5b806370a08231116100f257806370a082311461058057806381e6239c146105a0578063867d3397146105b357806395d89b41146105ec578063a22cb4651461060157600080fd5b80635ba37742146104f45780635f8ea381146105095780636352211e1461051e5780636685e7361461053e5780636f25c34d1461056b57600080fd5b806316279055116101bc57806342842e0e1161018057806342842e0e1461046157806348756c1714610481578063558a7297146104a157806355f804b3146104c1578063571109a4146104e157600080fd5b806316279055146103c257806323b872dd146103e9578063252c719014610409578063319d6eda146104295780633e63eb2a1461044c57600080fd5b806309d7f78f1161020357806309d7f78f146103105780630a989d9c146103305780630bf95cc2146103525780630f105f101461038f5780630f9facbe146103af57600080fd5b8063010a38f51461024057806301ffc9a71461026457806306fdde0314610294578063081812fc146102b6578063095ea7b3146102ee575b600080fd5b34801561024c57600080fd5b506007545b6040519081526020015b60405180910390f35b34801561027057600080fd5b5061028461027f3660046126be565b61075f565b604051901515815260200161025b565b3480156102a057600080fd5b506102a961078a565b60405161025b9190612728565b3480156102c257600080fd5b506102d66102d136600461273b565b61081c565b6040516001600160a01b03909116815260200161025b565b3480156102fa57600080fd5b5061030e610309366004612770565b610845565b005b34801561031c57600080fd5b5061028461032b36600461273b565b610854565b34801561033c57600080fd5b50610345610878565b60405161025b91906127d5565b34801561035e57600080fd5b5061037261036d36600461273b565b610953565b60408051931515845260208401929092529082015260600161025b565b34801561039b57600080fd5b5061030e6103aa3660046128a5565b6109f9565b6102516103bd366004612906565b610aa3565b3480156103ce57600080fd5b506102846103dd366004612932565b3b63ffffffff16151590565b3480156103f557600080fd5b5061030e61040436600461294d565b610b82565b34801561041557600080fd5b50610345610424366004612989565b610d6c565b34801561043557600080fd5b5061043e61108a565b60405161025b929190612a5d565b34801561045857600080fd5b506102a96111af565b34801561046d57600080fd5b5061030e61047c36600461294d565b61123d565b34801561048d57600080fd5b5061034561049c366004612932565b61125d565b3480156104ad57600080fd5b5061030e6104bc366004612a86565b611342565b3480156104cd57600080fd5b5061030e6104dc366004612ab0565b61139c565b6102516104ef366004612ae4565b6113d7565b34801561050057600080fd5b506103456114eb565b34801561051557600080fd5b5061043e61161e565b34801561052a57600080fd5b506102d661053936600461273b565b611737565b34801561054a57600080fd5b5061055e61055936600461273b565b611742565b60405161025b9190612b68565b34801561057757600080fd5b5061043e6118aa565b34801561058c57600080fd5b5061025161059b366004612932565b61195d565b6102516105ae366004612bf8565b6119a5565b3480156105bf57600080fd5b506102d66105ce36600461273b565b6000908152600b60205260409020600101546001600160a01b031690565b3480156105f857600080fd5b506102a9611a36565b34801561060d57600080fd5b5061030e61061c366004612a86565b611a45565b34801561062d57600080fd5b5061025161063c366004612c4e565b611a50565b34801561064d57600080fd5b5061030e61065c366004612cb6565b611bb0565b34801561066d57600080fd5b5061043e611bcd565b34801561068257600080fd5b5061030e610691366004612d31565b611ce6565b3480156106a257600080fd5b506102a96106b136600461273b565b611d28565b3480156106c257600080fd5b506106d66106d136600461273b565b611ddd565b60405161025b93929190612d4c565b3480156106f157600080fd5b5061030e610700366004612a86565b611e70565b34801561071157600080fd5b50610284610720366004612d76565b611eca565b34801561073157600080fd5b5061030e610740366004612da0565b611ef8565b34801561075157600080fd5b506008546102849060ff1681565b60006001600160e01b03198216632483248360e11b1480610784575061078482611fa8565b92915050565b60606000805461079990612dc2565b80601f01602080910402602001604051908101604052809291908181526020018280546107c590612dc2565b80156108125780601f106107e757610100808354040283529160200191610812565b820191906000526020600020905b8154815290600101906020018083116107f557829003601f168201915b5050505050905090565b600061082782611ff8565b506000828152600460205260409020546001600160a01b0316610784565b610850828233612031565b5050565b6000818152600b60205260408120541561087057506001919050565b506000919050565b60075460609060006108893361195d565b90506000816001600160401b038111156108a5576108a56127e8565b6040519080825280602002602001820160405280156108ce578160200160208202803683370190505b5090506000805b848110156109495760006108ea826001612e12565b9050336108f682611737565b6001600160a01b03161461090a5750610937565b8084848151811061091d5761091d612e25565b6020908102919091010152610933600184612e12565b9250505b8061094181612e3b565b9150506108d5565b5090949350505050565b60008060008084116109a35760405162461bcd60e51b81526020600482015260146024820152733a37b5b2b724b21034b9903932b8bab4b932b21760611b60448201526064015b60405180910390fd5b6000848152600b6020526040812060060154158015906109d357506000858152600b602052604090206006015442105b156109dc575060015b6000948552600b6020526040909420600301549394429350915050565b3360009081526009602052604090205460ff16610a285760405162461bcd60e51b815260040161099a90612e54565b6000858152600b60205260409020600201610a438582612ec8565b506000858152600b602052604090819020600381018590556005810184905560060182905551610a9c908690600c90610a88906575707261676560d01b815260060190565b90815260200160405180910390205461203e565b5050505050565b6000828152600b6020526040812054610aee5760405162461bcd60e51b815260206004820152600d60248201526c139195081b9bdd08199bdd5b99609a1b604482015260640161099a565b6000610af984611737565b9050610b06818486610b82565b6000848152600b60205260408082206001600380830182905590820180546001600160a01b0319166001600160a01b0389161790556005820184905560068201939093556007019190915551703a3930b739b332b92fb7b832b930ba37b960791b8152610b7a908590600c90601101610a88565b509192915050565b60085460ff16158015610b9b5750813b63ffffffff1615155b8015610bad5750610bab826120c4565b155b15610c205760405162461bcd60e51b815260206004820152603860248201527f4e6f74206120636f6e74726163742061646472657373206f7220746f6b656e2060448201527f69732070656e64696e6720647572696e67206c6f636b75700000000000000000606482015260840161099a565b6000818152600b60205260409020600701546002148015610c5157506000818152600b602052604090206006015415155b8015610c6d57506000818152600b602052604090206006015442105b15610cba5760405162461bcd60e51b815260206004820152601a60248201527f43757272656e746c7920696e206c6f636b757020706572696f64000000000000604482015260640161099a565b6000818152600b6020526040902060080154600103610d2d5760405162461bcd60e51b815260206004820152602960248201527f4e4654206973207374616b696e6720736f207472616e73666572206973206e6f6044820152681d08185b1b1bddd95960ba1b606482015260840161099a565b610d38838383612100565b6000818152600b6020526040902060040154610d55906001612e12565b6000918252600b6020526040909120600401555050565b3360009081526009602052604090205460609060ff16610d9e5760405162461bcd60e51b815260040161099a90612e54565b6000835111610def5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e2055524973206d757374206e6f7420626520656d70747900000000604482015260640161099a565b600083516001600160401b03811115610e0a57610e0a6127e8565b604051908082528060200260200182016040528015610e33578160200160208202803683370190505b50905060005b845181101561102257848181518110610e5457610e54612e25565b602002602001015151600003610eac5760405162461bcd60e51b815260206004820152601860248201527f746f6b656e555249206d757374206265206e6f6e7a65726f0000000000000000604482015260640161099a565b600160076000828254610ebf9190612e12565b9091555050600754610ed18582612185565b600060019050600080600080600190506000600290506040518061012001604052808881526020018c6001600160a01b031681526020018d8a81518110610f1a57610f1a612e25565b6020026020010151815260200187815260200186815260200185815260200184815260200183815260200182815250600b60008981526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506040820151816002019081610fa89190612ec8565b50606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155610100820151816008015590505086898981518110610ffc57610ffc612e25565b60200260200101818152505050505050505050808061101a90612e3b565b915050610e39565b5061102e306001611a45565b60005b81518110156110825761107082828151811061104f5761104f612e25565b6020026020010151600c604051610a8890631b5a5b9d60e21b815260040190565b8061107a81612e3b565b915050611031565b509392505050565b60075460009060609082805b828110156110e85760006110ab826001612e12565b6000818152600b60205260409020600701549091506001036110d5576110d2600184612e12565b92505b50806110e081612e3b565b915050611096565b506000816001600160401b03811115611103576111036127e8565b60405190808252806020026020018201604052801561112c578160200160208202803683370190505b5090506000805b848110156111a3576000611148826001612e12565b6000818152600b6020526040902060070154909150600103611190578084848151811061117757611177612e25565b602090810291909101015261118d600184612e12565b92505b508061119b81612e3b565b915050611133565b50919590945092505050565b600d80546111bc90612dc2565b80601f01602080910402602001604051908101604052809291908181526020018280546111e890612dc2565b80156112355780601f1061120a57610100808354040283529160200191611235565b820191906000526020600020905b81548152906001019060200180831161121857829003601f168201915b505050505081565b61125883838360405180602001604052806000815250611bb0565b505050565b600754606090600061126e8461195d565b90506000816001600160401b0381111561128a5761128a6127e8565b6040519080825280602002602001820160405280156112b3578160200160208202803683370190505b5090506000805b848110156113375760006112cf826001612e12565b9050876001600160a01b03166112e482611737565b6001600160a01b0316146112f85750611325565b8084848151811061130b5761130b612e25565b6020908102919091010152611321600184612e12565b9250505b8061132f81612e3b565b9150506112ba565b509095945050505050565b3360009081526009602052604090205460ff166113715760405162461bcd60e51b815260040161099a90612e54565b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b3360009081526009602052604090205460ff166113cb5760405162461bcd60e51b815260040161099a90612e54565b600d6108508282612ec8565b3360009081526009602052604081205460ff166114065760405162461bcd60e51b815260040161099a90612e54565b6000888152600b60205260409020546114535760405162461bcd60e51b815260206004820152600f60248201526e151bdad95b881b9bdd08199bdd5b99608a1b604482015260640161099a565b61145e86888a610b82565b6000888152600b60205260409020600381018690556002016114808582612ec8565b506000888152600b6020526040908190206001810180546001600160a01b0319166001600160a01b038b1617905560058101859055600681018490556002600790910155516262757960e81b81526114df908990600c90600301610a88565b50959695505050505050565b6007546060906000805b8281101561155557600061150a826001612e12565b6000818152600b60205260409020600101549091506001600160a01b031633146115345750611543565b61153f600184612e12565b9250505b8061154d81612e3b565b9150506114f5565b506000816001600160401b03811115611570576115706127e8565b604051908082528060200260200182016040528015611599578160200160208202803683370190505b5090506000805b848110156109495760006115b5826001612e12565b6000818152600b60205260409020600101549091506001600160a01b031633146115df575061160c565b808484815181106115f2576115f2612e25565b6020908102919091010152611608600184612e12565b9250505b8061161681612e3b565b9150506115a0565b60075460009060609082805b8281101561167c57600061163f826001612e12565b6000818152600b602052604090206007015490915060030361166957611666600184612e12565b92505b508061167481612e3b565b91505061162a565b506000816001600160401b03811115611697576116976127e8565b6040519080825280602002602001820160405280156116c0578160200160208202803683370190505b5090506000805b848110156111a35760006116dc826001612e12565b6000818152600b6020526040902060070154909150600303611724578084848151811061170b5761170b612e25565b6020908102919091010152611721600184612e12565b92505b508061172f81612e3b565b9150506116c7565b600061078482611ff8565b61179a6040518061012001604052806000815260200160006001600160a01b03168152602001606081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6000828152600b60209081526040918290208251610120810184528154815260018201546001600160a01b03169281019290925260028101805492939192918401916117e590612dc2565b80601f016020809104026020016040519081016040528092919081815260200182805461181190612dc2565b801561185e5780601f106118335761010080835404028352916020019161185e565b820191906000526020600020905b81548152906001019060200180831161184157829003601f168201915b5050505050815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815250509050919050565b60075460009060609082816001600160401b038111156118cc576118cc6127e8565b6040519080825280602002602001820160405280156118f5578160200160208202803683370190505b5090506000805b83811015611952576000611911826001612e12565b90508084848151811061192657611926612e25565b602090810291909101015261193c600184612e12565b925050808061194a90612e3b565b9150506118fc565b509194909350915050565b60006001600160a01b038216611989576040516322718ad960e21b81526000600482015260240161099a565b506001600160a01b031660009081526003602052604090205490565b3360009081526009602052604081205460ff166119d45760405162461bcd60e51b815260040161099a90612e54565b6000858152600b602052604090206002016119ef8582612ec8565b506000858152600b6020526040908190206003810185905560060183905551611a2d908690600c90610a88906575706461746560d01b815260060190565b50929392505050565b60606001805461079990612dc2565b61085033838361219f565b3360009081526009602052604081205460ff16611a7f5760405162461bcd60e51b815260040161099a90612e54565b600160076000828254611a929190612e12565b9091555050600754611aa48782612185565b60408051610120810182528281526001600160a01b0389811660208084019182528385018a8152606085018c905260006080860181905260a086018b905260c086018a9052600260e087018190526101008701819052888252600b9093529586208551815592516001840180546001600160a01b031916919095161790935591519192839290919081840190611b3a9082612ec8565b50606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0820151600782015561010090910151600890910155611b85306001611a45565b611ba284600c604051610a8890631b5a5b9d60e21b815260040190565b509198975050505050505050565b611bbb848484610b82565b611bc78484848461223e565b50505050565b60075460009060609082805b82811015611c2b576000611bee826001612e12565b6000818152600b6020526040902060070154909150600203611c1857611c15600184612e12565b92505b5080611c2381612e3b565b915050611bd9565b506000816001600160401b03811115611c4657611c466127e8565b604051908082528060200260200182016040528015611c6f578160200160208202803683370190505b5090506000805b848110156111a3576000611c8b826001612e12565b6000818152600b6020526040902060070154909150600203611cd35780848481518110611cba57611cba612e25565b6020908102919091010152611cd0600184612e12565b92505b5080611cde81612e3b565b915050611c76565b3360009081526009602052604090205460ff16611d155760405162461bcd60e51b815260040161099a90612e54565b6008805460ff1916911515919091179055565b6000818152600b6020526040902054606090611d9e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161099a565b600d600b6000848152602001908152602001600020600201604051602001611dc7929190612ffa565b6040516020818303038152906040529050919050565b600080606060008411611e295760405162461bcd60e51b81526020600482015260146024820152733a37b5b2b724b21034b9903932b8bab4b932b21760611b604482015260640161099a565b6000848152600b60205260408120600401548103611e45575060015b6000858152600b60205260409020600301548190611e6287611d28565b935093509350509193909250565b3360009081526009602052604090205460ff16611e9f5760405162461bcd60e51b815260040161099a90612e54565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336000908152600a602052604090205460ff16611f745760405162461bcd60e51b815260206004820152603460248201527f4f6e6c792074686520737065636966696564207374616b696e6720636f6e74726044820152731858dd081dda5b1b08189948195e1958dd5d195960621b606482015260840161099a565b6000828152600b602052604090819020600801829055516575707261676560d01b8152610850908390600c90600601610a88565b60006001600160e01b031982166380ac58cd60e01b1480611fd957506001600160e01b03198216635b5e139f60e01b145b8061078457506301ffc9a760e01b6001600160e01b0319831614610784565b6000818152600260205260408120546001600160a01b03168061078457604051637e27328960e01b81526004810184905260240161099a565b6112588383836001612360565b6000828152600b6020526040908190208054600182015460038301546005840154600685015460078601546008870154975196977fab9408b7d8f776fd97c3f68d285c256894a296f5e00796d1537c458907cef65e976120b797966001600160a01b03169560028b019590949093909290918c9061300f565b60405180910390a1505050565b6001600160a01b0381166000908152600a602052604081205460ff16806120f35750306001600160a01b038316145b1561087057506001919050565b6001600160a01b03821661212a57604051633250574960e11b81526000600482015260240161099a565b6000612137838333612466565b9050836001600160a01b0316816001600160a01b031614611bc7576040516364283d7b60e01b81526001600160a01b038086166004830152602482018490528216604482015260640161099a565b61085082826040518060200160405280600081525061255f565b6001600160a01b0382166121d157604051630b61174360e31b81526001600160a01b038316600482015260240161099a565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383163b15611bc757604051630a85bd0160e11b81526001600160a01b0384169063150b7a02906122809033908890879087906004016130dd565b6020604051808303816000875af19250505080156122bb575060408051601f3d908101601f191682019092526122b89181019061311a565b60015b612324573d8080156122e9576040519150601f19603f3d011682016040523d82523d6000602084013e6122ee565b606091505b50805160000361231c57604051633250574960e11b81526001600160a01b038516600482015260240161099a565b805181602001fd5b6001600160e01b03198116630a85bd0160e11b14610a9c57604051633250574960e11b81526001600160a01b038516600482015260240161099a565b808061237457506001600160a01b03821615155b1561243657600061238484611ff8565b90506001600160a01b038316158015906123b05750826001600160a01b0316816001600160a01b031614155b80156123c357506123c18184611eca565b155b156123ec5760405163a9fbf51f60e01b81526001600160a01b038416600482015260240161099a565b81156124345783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b5050600090815260046020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b6000828152600260205260408120546001600160a01b039081169083161561249357612493818486612576565b6001600160a01b038116156124d1576124b0600085600080612360565b6001600160a01b038116600090815260036020526040902080546000190190555b6001600160a01b03851615612500576001600160a01b0385166000908152600360205260409020805460010190555b60008481526002602052604080822080546001600160a01b0319166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b61256983836125da565b611258600084848461223e565b61258183838361263f565b611258576001600160a01b0383166125af57604051637e27328960e01b81526004810182905260240161099a565b60405163177e802f60e01b81526001600160a01b03831660048201526024810182905260440161099a565b6001600160a01b03821661260457604051633250574960e11b81526000600482015260240161099a565b600061261283836000612466565b90506001600160a01b03811615611258576040516339e3563760e11b81526000600482015260240161099a565b60006001600160a01b0383161580159061269d5750826001600160a01b0316846001600160a01b0316148061267957506126798484611eca565b8061269d57506000828152600460205260409020546001600160a01b038481169116145b949350505050565b6001600160e01b0319811681146126bb57600080fd5b50565b6000602082840312156126d057600080fd5b81356126db816126a5565b9392505050565b6000815180845260005b81811015612708576020818501810151868301820152016126ec565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006126db60208301846126e2565b60006020828403121561274d57600080fd5b5035919050565b80356001600160a01b038116811461276b57600080fd5b919050565b6000806040838503121561278357600080fd5b61278c83612754565b946020939093013593505050565b600081518084526020808501945080840160005b838110156127ca578151875295820195908201906001016127ae565b509495945050505050565b6020815260006126db602083018461279a565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612826576128266127e8565b604052919050565b60006001600160401b03831115612847576128476127e8565b61285a601f8401601f19166020016127fe565b905082815283838301111561286e57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261289657600080fd5b6126db8383356020850161282e565b600080600080600060a086880312156128bd57600080fd5b8535945060208601356001600160401b038111156128da57600080fd5b6128e688828901612885565b959895975050505060408401359360608101359360809091013592509050565b6000806040838503121561291957600080fd5b8235915061292960208401612754565b90509250929050565b60006020828403121561294457600080fd5b6126db82612754565b60008060006060848603121561296257600080fd5b61296b84612754565b925061297960208501612754565b9150604084013590509250925092565b6000806040838503121561299c57600080fd5b82356001600160401b03808211156129b357600080fd5b818501915085601f8301126129c757600080fd5b81356020828211156129db576129db6127e8565b8160051b6129ea8282016127fe565b928352848101820192828101908a851115612a0457600080fd5b83870192505b84831015612a4057823586811115612a225760008081fd5b612a308c86838b0101612885565b8352509183019190830190612a0a565b9750612a50915050878201612754565b9450505050509250929050565b82815260406020820152600061269d604083018461279a565b8035801515811461276b57600080fd5b60008060408385031215612a9957600080fd5b612aa283612754565b915061292960208401612a76565b600060208284031215612ac257600080fd5b81356001600160401b03811115612ad857600080fd5b61269d84828501612885565b600080600080600080600060e0888a031215612aff57600080fd5b87359650612b0f60208901612754565b9550612b1d60408901612754565b94506060880135935060808801356001600160401b03811115612b3f57600080fd5b612b4b8a828b01612885565b93505060a0880135915060c0880135905092959891949750929550565b602081528151602082015260006020830151612b8f60408401826001600160a01b03169052565b506040830151610120806060850152612bac6101408501836126e2565b915060608501516080850152608085015160a085015260a085015160c085015260c085015160e085015260e0850151610100818187015280870151838701525050508091505092915050565b60008060008060808587031215612c0e57600080fd5b8435935060208501356001600160401b03811115612c2b57600080fd5b612c3787828801612885565b949794965050505060408301359260600135919050565b600080600080600060a08688031215612c6657600080fd5b612c6f86612754565b94506020860135935060408601356001600160401b03811115612c9157600080fd5b612c9d88828901612885565b9598949750949560608101359550608001359392505050565b60008060008060808587031215612ccc57600080fd5b612cd585612754565b9350612ce360208601612754565b92506040850135915060608501356001600160401b03811115612d0557600080fd5b8501601f81018713612d1657600080fd5b612d258782356020840161282e565b91505092959194509250565b600060208284031215612d4357600080fd5b6126db82612a76565b8315158152826020820152606060408201526000612d6d60608301846126e2565b95945050505050565b60008060408385031215612d8957600080fd5b612d9283612754565b915061292960208401612754565b60008060408385031215612db357600080fd5b50508035926020909101359150565b600181811c90821680612dd657607f821691505b602082108103612df657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561078457610784612dfc565b634e487b7160e01b600052603260045260246000fd5b600060018201612e4d57612e4d612dfc565b5060010190565b6020808252600c908201526b2737ba10309036b4b73a32b960a11b604082015260600190565b601f82111561125857600081815260208120601f850160051c81016020861015612ea15750805b601f850160051c820191505b81811015612ec057828155600101612ead565b505050505050565b81516001600160401b03811115612ee157612ee16127e8565b612ef581612eef8454612dc2565b84612e7a565b602080601f831160018114612f2a5760008415612f125750858301515b600019600386901b1c1916600185901b178555612ec0565b600085815260208120601f198616915b82811015612f5957888601518255948401946001909101908401612f3a565b5085821015612f775787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008154612f9481612dc2565b60018281168015612fac5760018114612fc157612ff0565b60ff1984168752821515830287019450612ff0565b8560005260208060002060005b85811015612fe75781548a820152908401908201612fce565b50505082870194505b5050505092915050565b600061269d6130098386612f87565b84612f87565b60006101208b8352602060018060a01b038c168185015281604085015260008b5461303981612dc2565b938601849052610140936001828116801561305b5760018114613075576130a3565b60ff1984168988015282151560051b8901870194506130a3565b8f6000528560002060005b8481101561309b5781548b82018a0152908301908701613080565b8a0188019550505b50505050606085019a909a52505050608081019590955260a085019390935260c084019190915260e0830152610100909101529392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613110908301846126e2565b9695505050505050565b60006020828403121561312c57600080fd5b81516126db816126a556fea2646970667358221220f7e7969f45af51be1a9836c85ed9cb77956592cdfb483625ccd6795970894e7064736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f009c654d3397a2c2b061e2b00f30e79f9a7b51e000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001568747470733a2f2f697066732e696f2f697066732f00000000000000000000000000000000000000000000000000000000000000000000000000000000000014447265616d56657273654f776e6572546f6b656e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000444564f5400000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : addressOperator (address): 0xF009C654d3397A2c2b061e2b00f30E79f9A7b51e
Arg [1] : baseURI (string): https://ipfs.io/ipfs/
Arg [2] : _name (string): DreamVerseOwnerToken
Arg [3] : _symbol (string): DVOT
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 000000000000000000000000f009c654d3397a2c2b061e2b00f30e79f9a7b51e
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [5] : 68747470733a2f2f697066732e696f2f697066732f0000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [7] : 447265616d56657273654f776e6572546f6b656e000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [9] : 44564f5400000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.