ERC-721
Overview
Max Total Supply
118 CM
Holders
113
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 CMLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CryptoMind
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract CryptoMind is ERC721, ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; using ECDSA for bytes32; Counters.Counter private soldCounter; Counters.Counter private reservedMintedCounter; bool public isAuctionActive = false; bool public isWhitelistSaleActive = false; bool public isPublicSaleActive = false; bytes32 public whitelistMerkleRoot; address public signerAddress; uint256 public maxSupply; uint256 public reserved; uint256 public whitelistPrice = 0.5 ether; uint256 public publicSalePrice = 0.5 ether; uint256 public tierSupply; uint256 public maxMintPerTx; uint256 public publicSaleStartTime; uint256 public whitelistSaleStartTime; uint256 public whitelistSaleEndTime; string private contractURI_; string private baseTokenURI; mapping(address => bool) public whitelistClaimed; mapping(string => bool) private nonceUsed; struct Auction { uint256 startTime; uint256 timeStep; uint256 startPrice; uint256 endPrice; uint256 priceStep; uint256 stepNumber; } Auction public auction; constructor( string memory _name, string memory _symbol, string memory _baseTokenURI, string memory _uri, uint256 _maxMintPerTx, uint256 _maxSupply, uint256 _reserved, uint256 _tierSupply, bytes32 _whitelistMerkleRoot, address _signerAddress ) ERC721(_name, _symbol) { baseTokenURI = _baseTokenURI; contractURI_ = _uri; maxMintPerTx = _maxMintPerTx; maxSupply = _maxSupply; reserved = _reserved; tierSupply = _tierSupply; whitelistMerkleRoot = _whitelistMerkleRoot; signerAddress = _signerAddress; } modifier onlyWhitelistActive() { require(isWhitelistSaleActive, "Whitelist must be active to mint"); require( block.timestamp >= whitelistSaleStartTime && block.timestamp <= whitelistSaleEndTime, "Not in whitelist sale period" ); _; } modifier onlyPublicSaleActive() { require(isPublicSaleActive, "Public sale must be active to mint"); require( block.timestamp >= publicSaleStartTime, "Public sale has not started yet" ); _; } modifier onlyInWhitelist(bytes32[] calldata _proofs) { require(!whitelistClaimed[msg.sender], "Address has already claimed."); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_proofs, whitelistMerkleRoot, leaf), "Invalid proof." ); _; } modifier onlyAuctionActive() { require(isAuctionActive, "Auction must be active to mint"); require( block.timestamp >= auction.startTime, "Auction has not started yet." ); _; } modifier onlyValidSignature( uint256 _quantity, bytes32 _hash, bytes memory _signature, string memory _nonce, uint256 _expiredAt ) { require(!nonceUsed[_nonce], "Hash used"); require(block.timestamp < _expiredAt, "signature expired"); require( matchAddressSigner(_hash, _signature), "Not allow mint directly" ); require( hashTransaction(msg.sender, _quantity, _nonce, _expiredAt) == _hash, "Hash not match" ); _; } modifier onlySufficientEther(uint256 _quantity, uint256 _price) { require(msg.value >= _quantity * _price, "Insufficient ether"); _; } modifier onlySufficientSupply(uint256 _quantity) { require( reservedMintedCounter.current() + soldCounter.current() + _quantity <= maxSupply, "Exceed max supply" ); require( reservedMintedCounter.current() + soldCounter.current() + _quantity <= tierSupply, "Exceed tier supply" ); _; } modifier onlySufficientReservedSupply(uint256 _quantity) { require( reservedMintedCounter.current() + _quantity <= reserved, "Exceeds reserved supply" ); _; } modifier onlyValidQuantity(uint256 _quantity) { require(_quantity > 0 && _quantity <= maxMintPerTx, "Invalid quantity"); _; } fallback() external payable {} receive() external payable {} function setBaseURI(string memory baseURI) external onlyOwner { baseTokenURI = baseURI; } function setContractURI(string calldata _uri) external onlyOwner { contractURI_ = _uri; } function setWhitelistMerkleRoot(bytes32 _merkleRoot) public onlyOwner { whitelistMerkleRoot = _merkleRoot; } function setWhitelistSaleActive(bool _isWhitelistSaleActive) public onlyOwner { require(isWhitelistSaleActive != _isWhitelistSaleActive, "Already set"); isWhitelistSaleActive = _isWhitelistSaleActive; } function setAuctionActive(bool _isAuctionActive) public onlyOwner { require(isAuctionActive != _isAuctionActive, "Already set"); isAuctionActive = _isAuctionActive; } function setPublicSaleActive(bool _isPublicSaleActive) public onlyOwner { require(isPublicSaleActive != _isPublicSaleActive, "Already set"); isPublicSaleActive = _isPublicSaleActive; } function setTierSupply(uint256 _tierSupply) public onlyOwner { require( maxSupply >= _tierSupply, "Tier supply must be less than max supply" ); tierSupply = _tierSupply; } function setAuction(Auction memory _auction) public onlyOwner { require(_auction.startTime > auction.startTime, "Invalid start time"); auction = _auction; } function setWhitelistPrice(uint256 _whitelistPrice) public onlyOwner { whitelistPrice = _whitelistPrice; } function setPublicSalePrice(uint256 _publicSalePrice) public onlyOwner { publicSalePrice = _publicSalePrice; } function setPublicSaleStartTime(uint256 _publicSaleStartTime) public onlyOwner { publicSaleStartTime = _publicSaleStartTime; } function setWhitelistSaleTime( uint256 _whitelistSaleStartTime, uint256 _whitelistSaleEndTime ) public onlyOwner { whitelistSaleStartTime = _whitelistSaleStartTime; whitelistSaleEndTime = _whitelistSaleEndTime; } function getAuctionPrice() public view returns (uint256) { Auction memory currentAuction = auction; if (!isAuctionActive) { return 0; } if (block.timestamp < currentAuction.startTime) { return currentAuction.startPrice; } uint256 step = (block.timestamp - currentAuction.startTime) / currentAuction.timeStep; if (step > currentAuction.stepNumber) { step = currentAuction.stepNumber; } return currentAuction.startPrice > step * currentAuction.priceStep ? currentAuction.startPrice - step * currentAuction.priceStep : currentAuction.endPrice; } function reservedClaim(address[] calldata _addresses) public onlyOwner onlySufficientSupply(_addresses.length) onlySufficientReservedSupply(_addresses.length) { require( !isWhitelistSaleActive && !isAuctionActive && !isPublicSaleActive, "Can't claim during sale" ); for (uint256 i = 0; i < _addresses.length; i++) { uint256 tokenId = reservedMintedCounter.current() + soldCounter.current() + 1; _safeMint(_addresses[i], tokenId); reservedMintedCounter.increment(); } } function publicMint( bytes32 _hash, bytes memory _signature, string memory _nonce, uint256 _expiredAt ) public payable onlyPublicSaleActive onlyValidSignature(1, _hash, _signature, _nonce, _expiredAt) onlySufficientEther(1, publicSalePrice) onlySufficientSupply(1) onlyValidQuantity(1) { saleMint(msg.sender); nonceUsed[_nonce] = true; } function auctionMint( bytes32 _hash, bytes memory _signature, string memory _nonce, uint256 _expiredAt ) public payable onlyAuctionActive onlyValidSignature(1, _hash, _signature, _nonce, _expiredAt) onlySufficientEther(1, getAuctionPrice()) onlySufficientSupply(1) onlyValidQuantity(1) { saleMint(msg.sender); nonceUsed[_nonce] = true; } function whitelistMint(bytes32[] calldata _proofs) public payable onlyWhitelistActive onlyInWhitelist(_proofs) onlySufficientEther(1, whitelistPrice) onlySufficientSupply(1) onlyValidQuantity(1) { saleMint(msg.sender); whitelistClaimed[msg.sender] = true; } function saleMint(address to) internal { uint256 tokenId = reservedMintedCounter.current() + soldCounter.current() + 1; _safeMint(to, tokenId); soldCounter.increment(); } function walletOfOwner(address _owner) public view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokenIds = new uint256[](tokenCount); uint256 index; uint256 loopThrough = totalSupply(); for (uint256 i; i < loopThrough; i++) { bool _exists = _exists(i); if (_exists) { if (ownerOf(i) == _owner) { tokenIds[index] = i; index++; } } else if (!_exists && tokenIds[tokenCount - 1] == 0) { loopThrough++; } } return tokenIds; } function withdraw(address _to) public onlyOwner { uint256 balance = address(this).balance; payable(_to).transfer(balance); } function _baseURI() internal view override returns (string memory) { return baseTokenURI; } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); return string(abi.encodePacked(_baseURI(), _tokenId.toString())); } function contractURI() public view returns (string memory) { return contractURI_; } function supportsInterface(bytes4 _interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(_interfaceId); } function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(_from, _to, _tokenId); } function hashTransaction( address _sender, uint256 _quantity, string memory _nonce, uint256 _expiredAt ) private pure returns (bytes32) { bytes32 hash = keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", keccak256( abi.encodePacked(_sender, _quantity, _nonce, _expiredAt) ) ) ); return hash; } function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { return signerAddress == _hash.recover(_signature); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.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}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => 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 override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(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 overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - 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, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * 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 virtual { _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); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @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 virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), 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 virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * 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 * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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 v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../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 v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { 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_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @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 v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256","name":"_maxMintPerTx","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_reserved","type":"uint256"},{"internalType":"uint256","name":"_tierSupply","type":"uint256"},{"internalType":"bytes32","name":"_whitelistMerkleRoot","type":"bytes32"},{"internalType":"address","name":"_signerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"auction","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"timeStep","type":"uint256"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"endPrice","type":"uint256"},{"internalType":"uint256","name":"priceStep","type":"uint256"},{"internalType":"uint256","name":"stepNumber","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"string","name":"_nonce","type":"string"},{"internalType":"uint256","name":"_expiredAt","type":"uint256"}],"name":"auctionMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAuctionPrice","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":[],"name":"isAuctionActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"bytes32","name":"_hash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"string","name":"_nonce","type":"string"},{"internalType":"uint256","name":"_expiredAt","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"reservedClaim","outputs":[],"stateMutability":"nonpayable","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":[{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"timeStep","type":"uint256"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"endPrice","type":"uint256"},{"internalType":"uint256","name":"priceStep","type":"uint256"},{"internalType":"uint256","name":"stepNumber","type":"uint256"}],"internalType":"struct CryptoMind.Auction","name":"_auction","type":"tuple"}],"name":"setAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isAuctionActive","type":"bool"}],"name":"setAuctionActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPublicSaleActive","type":"bool"}],"name":"setPublicSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSalePrice","type":"uint256"}],"name":"setPublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSaleStartTime","type":"uint256"}],"name":"setPublicSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tierSupply","type":"uint256"}],"name":"setTierSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_whitelistPrice","type":"uint256"}],"name":"setWhitelistPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isWhitelistSaleActive","type":"bool"}],"name":"setWhitelistSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_whitelistSaleStartTime","type":"uint256"},{"internalType":"uint256","name":"_whitelistSaleEndTime","type":"uint256"}],"name":"setWhitelistSaleTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[],"name":"tierSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"whitelistPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistSaleEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600d805462ffffff191690556706f05b59d3b2000060128190556013553480156200002e57600080fd5b5060405162003fc938038062003fc98339810160408190526200005191620002f1565b89518a908a906200006a90600090602085019062000161565b5080516200008090600190602084019062000161565b5050506200009d620000976200010b60201b60201c565b6200010f565b8751620000b290601a9060208b019062000161565b508651620000c89060199060208a019062000161565b50601595909555601093909355601191909155601455600e55600f80546001600160a01b0319166001600160a01b03909216919091179055506200042c92505050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200016f90620003ef565b90600052602060002090601f016020900481019282620001935760008555620001de565b82601f10620001ae57805160ff1916838001178555620001de565b82800160010185558215620001de579182015b82811115620001de578251825591602001919060010190620001c1565b50620001ec929150620001f0565b5090565b5b80821115620001ec5760008155600101620001f1565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200022f57600080fd5b81516001600160401b03808211156200024c576200024c62000207565b604051601f8301601f19908116603f0116810190828211818310171562000277576200027762000207565b816040528381526020925086838588010111156200029457600080fd5b600091505b83821015620002b8578582018301518183018401529082019062000299565b83821115620002ca5760008385830101525b9695505050505050565b80516001600160a01b0381168114620002ec57600080fd5b919050565b6000806000806000806000806000806101408b8d0312156200031257600080fd5b8a516001600160401b03808211156200032a57600080fd5b620003388e838f016200021d565b9b5060208d01519150808211156200034f57600080fd5b6200035d8e838f016200021d565b9a5060408d01519150808211156200037457600080fd5b620003828e838f016200021d565b995060608d01519150808211156200039957600080fd5b50620003a88d828e016200021d565b97505060808b0151955060a08b0151945060c08b0151935060e08b015192506101008b01519150620003de6101208c01620002d4565b90509295989b9194979a5092959850565b600181811c908216806200040457607f821691505b602082108114156200042657634e487b7160e01b600052602260045260246000fd5b50919050565b613b8d806200043c6000396000f3fe6080604052600436106103275760003560e01c8063791a2519116101ae578063bd32fb66116100eb578063de7fcb1d1161008f578063e985e9c51161006c578063e985e9c514610967578063f2fde38b146109b0578063fc1a1c36146109d0578063fe60d12c146109e657005b8063de7fcb1d1461091c578063e2e06fa314610932578063e8a3d4851461095257005b8063d1b4b9a3116100c8578063d1b4b9a31461089c578063d5abeb01146108b6578063db4bec44146108cc578063dccde200146108fc57005b8063bd32fb661461083c578063c87b56dd1461085c578063c9edb3cc1461087c57005b80639b6860c811610152578063aa98e0c61161012f578063aa98e0c6146107c7578063adeadf5d146107dd578063b88d4fde146107fd578063b98451cf1461081d57005b80639b6860c81461077e578063a22cb46514610794578063aa6d324a146107b457005b8063866e01241161018b578063866e0124146107155780638da5cb5b1461072b578063938e3d7b1461074957806395d89b411461076957005b8063791a25191461067d5780637d9f6db51461069d578063801316dc146106f557005b80634bd25c6f1161027c578063667f8ac2116102205780636d5d40c6116101fd5780636d5d40c61461060857806370a0823114610628578063715018a614610648578063717d57d31461065d57005b8063667f8ac2146105bf5780636a78f227146105d25780636bb7b1d9146105f257005b8063549b9da511610259578063549b9da51461054957806355f804b31461055f5780635b7633d01461057f5780636352211e1461059f57005b80634bd25c6f146104f45780634f6ccce71461050957806351cff8d91461052957005b8063209ee297116102e35780632f745c59116102c05780632f745c5914610474578063372f657c1461049457806342842e0e146104a7578063438b6300146104c757005b8063209ee2971461041e578063230b43f41461043e57806323b872dd1461045457005b806301ffc9a71461033057806306fdde0314610365578063081812fc14610387578063095ea7b3146103bf57806318160ddd146103df5780631e84c413146103fe57005b3661032e57005b005b34801561033c57600080fd5b5061035061034b366004613283565b6109fc565b60405190151581526020015b60405180910390f35b34801561037157600080fd5b5061037a610a0d565b60405161035c91906132ff565b34801561039357600080fd5b506103a76103a2366004613312565b610a9f565b6040516001600160a01b03909116815260200161035c565b3480156103cb57600080fd5b5061032e6103da366004613347565b610b39565b3480156103eb57600080fd5b506008545b60405190815260200161035c565b34801561040a57600080fd5b50600d546103509062010000900460ff1681565b34801561042a57600080fd5b5061032e610439366004613312565b610c4f565b34801561044a57600080fd5b506103f060175481565b34801561046057600080fd5b5061032e61046f366004613371565b610ce1565b34801561048057600080fd5b506103f061048f366004613347565b610d12565b61032e6104a23660046133f2565b610da8565b3480156104b357600080fd5b5061032e6104c2366004613371565b6110c9565b3480156104d357600080fd5b506104e76104e2366004613434565b6110e4565b60405161035c919061344f565b34801561050057600080fd5b506103f0611228565b34801561051557600080fd5b506103f0610524366004613312565b611308565b34801561053557600080fd5b5061032e610544366004613434565b61139b565b34801561055557600080fd5b506103f060145481565b34801561056b57600080fd5b5061032e61057a366004613536565b6113fd565b34801561058b57600080fd5b50600f546103a7906001600160a01b031681565b3480156105ab57600080fd5b506103a76105ba366004613312565b61143e565b61032e6105cd36600461356b565b6114b5565b3480156105de57600080fd5b5061032e6105ed3660046135f0565b611815565b3480156105fe57600080fd5b506103f060165481565b34801561061457600080fd5b5061032e610623366004613312565b611888565b34801561063457600080fd5b506103f0610643366004613434565b6118b7565b34801561065457600080fd5b5061032e61193e565b34801561066957600080fd5b5061032e610678366004613312565b611974565b34801561068957600080fd5b5061032e610698366004613312565b6119a3565b3480156106a957600080fd5b50601d54601e54601f546020546021546022546106c895949392919086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c00161035c565b34801561070157600080fd5b5061032e61071036600461360b565b6119d2565b34801561072157600080fd5b506103f060185481565b34801561073757600080fd5b50600a546001600160a01b03166103a7565b34801561075557600080fd5b5061032e61076436600461362d565b611a07565b34801561077557600080fd5b5061037a611a3d565b34801561078a57600080fd5b506103f060135481565b3480156107a057600080fd5b5061032e6107af36600461369f565b611a4c565b61032e6107c236600461356b565b611a57565b3480156107d357600080fd5b506103f0600e5481565b3480156107e957600080fd5b5061032e6107f83660046133f2565b611c4f565b34801561080957600080fd5b5061032e6108183660046136d2565b611e6a565b34801561082957600080fd5b50600d5461035090610100900460ff1681565b34801561084857600080fd5b5061032e610857366004613312565b611ea2565b34801561086857600080fd5b5061037a610877366004613312565b611ed1565b34801561088857600080fd5b5061032e6108973660046135f0565b611f88565b3480156108a857600080fd5b50600d546103509060ff1681565b3480156108c257600080fd5b506103f060105481565b3480156108d857600080fd5b506103506108e7366004613434565b601b6020526000908152604090205460ff1681565b34801561090857600080fd5b5061032e61091736600461373a565b611fee565b34801561092857600080fd5b506103f060155481565b34801561093e57600080fd5b5061032e61094d3660046135f0565b61208d565b34801561095e57600080fd5b5061037a612103565b34801561097357600080fd5b506103506109823660046137b4565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156109bc57600080fd5b5061032e6109cb366004613434565b612112565b3480156109dc57600080fd5b506103f060125481565b3480156109f257600080fd5b506103f060115481565b6000610a07826121ad565b92915050565b606060008054610a1c906137de565b80601f0160208091040260200160405190810160405280929190818152602001828054610a48906137de565b8015610a955780601f10610a6a57610100808354040283529160200191610a95565b820191906000526020600020905b815481529060010190602001808311610a7857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b1d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b448261143e565b9050806001600160a01b0316836001600160a01b03161415610bb25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b14565b336001600160a01b0382161480610bce5750610bce8133610982565b610c405760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b14565b610c4a83836121d2565b505050565b600a546001600160a01b03163314610c795760405162461bcd60e51b8152600401610b1490613819565b806010541015610cdc5760405162461bcd60e51b815260206004820152602860248201527f5469657220737570706c79206d757374206265206c657373207468616e206d616044820152677820737570706c7960c01b6064820152608401610b14565b601455565b610ceb3382612240565b610d075760405162461bcd60e51b8152600401610b149061384e565b610c4a838383612337565b6000610d1d836118b7565b8210610d7f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b14565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d54610100900460ff16610dff5760405162461bcd60e51b815260206004820181905260248201527f57686974656c697374206d7573742062652061637469766520746f206d696e746044820152606401610b14565b6017544210158015610e1357506018544211155b610e5f5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420696e2077686974656c6973742073616c6520706572696f64000000006044820152606401610b14565b336000908152601b60205260409020548290829060ff1615610ec35760405162461bcd60e51b815260206004820152601c60248201527f416464726573732068617320616c726561647920636c61696d65642e000000006044820152606401610b14565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610f3d83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e5491508490506124de565b610f7a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610b14565b601254600190610f8a81836138b5565b341015610fce5760405162461bcd60e51b815260206004820152601260248201527124b739bab33334b1b4b2b73a1032ba3432b960711b6044820152606401610b14565b600160105481610fdd600b5490565b600c54610fea91906138d4565b610ff491906138d4565b11156110125760405162461bcd60e51b8152600401610b14906138ec565b6014548161101f600b5490565b600c5461102c91906138d4565b61103691906138d4565b11156110545760405162461bcd60e51b8152600401610b1490613917565b600160155481111561109b5760405162461bcd60e51b815260206004820152601060248201526f496e76616c6964207175616e7469747960801b6044820152606401610b14565b6110a4336124f4565b5050336000908152601b60205260409020805460ff1916600117905550505050505050565b610c4a83838360405180602001604052806000815250611e6a565b606060006110f1836118b7565b905060008167ffffffffffffffff81111561110e5761110e613493565b604051908082528060200260200182016040528015611137578160200160208202803683370190505b50905060008061114660085490565b905060005b8181101561121d576000818152600260205260409020546001600160a01b0316158015906111c657876001600160a01b03166111868361143e565b6001600160a01b031614156111c157818585815181106111a8576111a8613943565b6020908102919091010152836111bd81613959565b9450505b61120a565b801580156111f75750846111db600188613974565b815181106111eb576111eb613943565b60200260200101516000145b1561120a578261120681613959565b9350505b508061121581613959565b91505061114b565b509195945050505050565b6040805160c081018252601d548152601e54602080830191909152601f549282019290925290546060820152602154608082015260225460a0820152600d546000919060ff1661127a57600091505090565b805142101561128c5760400151919050565b60208101518151600091906112a19042613974565b6112ab91906139a1565b90508160a001518111156112c0575060a08101515b60808201516112cf90826138b5565b8260400151116112e3578160600151611301565b60808201516112f290826138b5565b82604001516113019190613974565b9250505090565b600061131360085490565b82106113765760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b14565b6008828154811061138957611389613943565b90600052602060002001549050919050565b600a546001600160a01b031633146113c55760405162461bcd60e51b8152600401610b1490613819565b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610c4a573d6000803e3d6000fd5b600a546001600160a01b031633146114275760405162461bcd60e51b8152600401610b1490613819565b805161143a90601a906020840190613160565b5050565b6000818152600260205260408120546001600160a01b031680610a075760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b14565b600d5462010000900460ff166115185760405162461bcd60e51b815260206004820152602260248201527f5075626c69632073616c65206d7573742062652061637469766520746f206d696044820152611b9d60f21b6064820152608401610b14565b60165442101561156a5760405162461bcd60e51b815260206004820152601f60248201527f5075626c69632073616c6520686173206e6f74207374617274656420796574006044820152606401610b14565b600184848484601c8260405161158091906139b5565b9081526040519081900360200190205460ff16156115cc5760405162461bcd60e51b815260206004820152600960248201526812185cda081d5cd95960ba1b6044820152606401610b14565b80421061160f5760405162461bcd60e51b81526020600482015260116024820152701cda59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610b14565b6116198484612531565b61165f5760405162461bcd60e51b81526020600482015260176024820152764e6f7420616c6c6f77206d696e74206469726563746c7960481b6044820152606401610b14565b8361166c33878585612555565b146116aa5760405162461bcd60e51b815260206004820152600e60248201526d090c2e6d040dcdee840dac2e8c6d60931b6044820152606401610b14565b6013546001906116ba81836138b5565b3410156116fe5760405162461bcd60e51b815260206004820152601260248201527124b739bab33334b1b4b2b73a1032ba3432b960711b6044820152606401610b14565b60016010548161170d600b5490565b600c5461171a91906138d4565b61172491906138d4565b11156117425760405162461bcd60e51b8152600401610b14906138ec565b6014548161174f600b5490565b600c5461175c91906138d4565b61176691906138d4565b11156117845760405162461bcd60e51b8152600401610b1490613917565b60016015548111156117cb5760405162461bcd60e51b815260206004820152601060248201526f496e76616c6964207175616e7469747960801b6044820152606401610b14565b6117d4336124f4565b6001601c8c6040516117e691906139b5565b908152604051908190036020019020805491151560ff1990921691909117905550505050505050505050505050565b600a546001600160a01b0316331461183f5760405162461bcd60e51b8152600401610b1490613819565b600d5460ff610100909104161515811515141561186e5760405162461bcd60e51b8152600401610b14906139d1565b600d80549115156101000261ff0019909216919091179055565b600a546001600160a01b031633146118b25760405162461bcd60e51b8152600401610b1490613819565b601655565b60006001600160a01b0382166119225760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b14565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119685760405162461bcd60e51b8152600401610b1490613819565b61197260006125d6565b565b600a546001600160a01b0316331461199e5760405162461bcd60e51b8152600401610b1490613819565b601255565b600a546001600160a01b031633146119cd5760405162461bcd60e51b8152600401610b1490613819565b601355565b600a546001600160a01b031633146119fc5760405162461bcd60e51b8152600401610b1490613819565b601791909155601855565b600a546001600160a01b03163314611a315760405162461bcd60e51b8152600401610b1490613819565b610c4a601983836131e4565b606060018054610a1c906137de565b61143a338383612628565b600d5460ff16611aa95760405162461bcd60e51b815260206004820152601e60248201527f41756374696f6e206d7573742062652061637469766520746f206d696e7400006044820152606401610b14565b601d54421015611afb5760405162461bcd60e51b815260206004820152601c60248201527f41756374696f6e20686173206e6f742073746172746564207965742e000000006044820152606401610b14565b600184848484601c82604051611b1191906139b5565b9081526040519081900360200190205460ff1615611b5d5760405162461bcd60e51b815260206004820152600960248201526812185cda081d5cd95960ba1b6044820152606401610b14565b804210611ba05760405162461bcd60e51b81526020600482015260116024820152701cda59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610b14565b611baa8484612531565b611bf05760405162461bcd60e51b81526020600482015260176024820152764e6f7420616c6c6f77206d696e74206469726563746c7960481b6044820152606401610b14565b83611bfd33878585612555565b14611c3b5760405162461bcd60e51b815260206004820152600e60248201526d090c2e6d040dcdee840dac2e8c6d60931b6044820152606401610b14565b6001611c45611228565b6116ba81836138b5565b600a546001600160a01b03163314611c795760405162461bcd60e51b8152600401610b1490613819565b601054819081611c88600b5490565b600c54611c9591906138d4565b611c9f91906138d4565b1115611cbd5760405162461bcd60e51b8152600401610b14906138ec565b60145481611cca600b5490565b600c54611cd791906138d4565b611ce191906138d4565b1115611cff5760405162461bcd60e51b8152600401610b1490613917565b601154829081611d0e600c5490565b611d1891906138d4565b1115611d665760405162461bcd60e51b815260206004820152601760248201527f4578636565647320726573657276656420737570706c790000000000000000006044820152606401610b14565b600d54610100900460ff16158015611d815750600d5460ff16155b8015611d965750600d5462010000900460ff16155b611de25760405162461bcd60e51b815260206004820152601760248201527f43616e277420636c61696d20647572696e672073616c650000000000000000006044820152606401610b14565b60005b83811015611e63576000611df8600b5490565b600c54611e0591906138d4565b611e109060016138d4565b9050611e42868684818110611e2757611e27613943565b9050602002016020810190611e3c9190613434565b826126f7565b611e50600c80546001019055565b5080611e5b81613959565b915050611de5565b5050505050565b611e743383612240565b611e905760405162461bcd60e51b8152600401610b149061384e565b611e9c84848484612711565b50505050565b600a546001600160a01b03163314611ecc5760405162461bcd60e51b8152600401610b1490613819565b600e55565b6000818152600260205260409020546060906001600160a01b0316611f505760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b14565b611f58612744565b611f6183612753565b604051602001611f729291906139f6565b6040516020818303038152906040529050919050565b600a546001600160a01b03163314611fb25760405162461bcd60e51b8152600401610b1490613819565b600d5460ff1615158115151415611fdb5760405162461bcd60e51b8152600401610b14906139d1565b600d805460ff1916911515919091179055565b600a546001600160a01b031633146120185760405162461bcd60e51b8152600401610b1490613819565b601d5481511161205f5760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642073746172742074696d6560701b6044820152606401610b14565b8051601d55602080820151601e556040820151601f5560608201519055608081015160215560a00151602255565b600a546001600160a01b031633146120b75760405162461bcd60e51b8152600401610b1490613819565b600d5460ff6201000090910416151581151514156120e75760405162461bcd60e51b8152600401610b14906139d1565b600d8054911515620100000262ff000019909216919091179055565b606060198054610a1c906137de565b600a546001600160a01b0316331461213c5760405162461bcd60e51b8152600401610b1490613819565b6001600160a01b0381166121a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b14565b6121aa816125d6565b50565b60006001600160e01b0319821663780e9d6360e01b1480610a075750610a0782612851565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122078261143e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166122b95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b14565b60006122c48361143e565b9050806001600160a01b0316846001600160a01b031614806122ff5750836001600160a01b03166122f484610a9f565b6001600160a01b0316145b8061232f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661234a8261143e565b6001600160a01b0316146123ae5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b14565b6001600160a01b0382166124105760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b14565b61241b8383836128a1565b6124266000826121d2565b6001600160a01b038316600090815260036020526040812080546001929061244f908490613974565b90915550506001600160a01b038216600090815260036020526040812080546001929061247d9084906138d4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000826124eb85846128ac565b14949350505050565b60006124ff600b5490565b600c5461250c91906138d4565b6125179060016138d4565b905061252382826126f7565b61143a600b80546001019055565b600061253d8383612920565b600f546001600160a01b039182169116149392505050565b6000808585858560405160200161256f9493929190613a25565b60408051808303601f1901815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000082850152603c8085019190915282518085039091018152605c90930190915281519101209695505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316141561268a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b14565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61143a82826040518060200160405280600081525061293c565b61271c848484612337565b6127288484848461296f565b611e9c5760405162461bcd60e51b8152600401610b1490613a6b565b6060601a8054610a1c906137de565b6060816127775750506040805180820190915260018152600360fc1b602082015290565b8160005b81156127a1578061278b81613959565b915061279a9050600a836139a1565b915061277b565b60008167ffffffffffffffff8111156127bc576127bc613493565b6040519080825280601f01601f1916602001820160405280156127e6576020820181803683370190505b5090505b841561232f576127fb600183613974565b9150612808600a86613abd565b6128139060306138d4565b60f81b81838151811061282857612828613943565b60200101906001600160f81b031916908160001a90535061284a600a866139a1565b94506127ea565b60006001600160e01b031982166380ac58cd60e01b148061288257506001600160e01b03198216635b5e139f60e01b145b80610a0757506301ffc9a760e01b6001600160e01b0319831614610a07565b610c4a838383612a79565b600081815b84518110156129185760008582815181106128ce576128ce613943565b602002602001015190508083116128f45760008381526020829052604090209250612905565b600081815260208490526040902092505b508061291081613959565b9150506128b1565b509392505050565b600080600061292f8585612b31565b9150915061291881612ba1565b6129468383612d5c565b612953600084848461296f565b610c4a5760405162461bcd60e51b8152600401610b1490613a6b565b60006001600160a01b0384163b15612a7157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906129b3903390899088908890600401613ad1565b602060405180830381600087803b1580156129cd57600080fd5b505af19250505080156129fd575060408051601f3d908101601f191682019092526129fa91810190613b0e565b60015b612a57573d808015612a2b576040519150601f19603f3d011682016040523d82523d6000602084013e612a30565b606091505b508051612a4f5760405162461bcd60e51b8152600401610b1490613a6b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061232f565b50600161232f565b6001600160a01b038316612ad457612acf81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612af7565b816001600160a01b0316836001600160a01b031614612af757612af78382612eaa565b6001600160a01b038216612b0e57610c4a81612f47565b826001600160a01b0316826001600160a01b031614610c4a57610c4a8282612ff6565b600080825160411415612b685760208301516040840151606085015160001a612b5c8782858561303a565b94509450505050612b9a565b825160401415612b925760208301516040840151612b87868383613127565b935093505050612b9a565b506000905060025b9250929050565b6000816004811115612bb557612bb5613b2b565b1415612bbe5750565b6001816004811115612bd257612bd2613b2b565b1415612c205760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b14565b6002816004811115612c3457612c34613b2b565b1415612c825760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b14565b6003816004811115612c9657612c96613b2b565b1415612cef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b14565b6004816004811115612d0357612d03613b2b565b14156121aa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b14565b6001600160a01b038216612db25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b14565b6000818152600260205260409020546001600160a01b031615612e175760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b14565b612e23600083836128a1565b6001600160a01b0382166000908152600360205260408120805460019290612e4c9084906138d4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612eb7846118b7565b612ec19190613974565b600083815260076020526040902054909150808214612f14576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612f5990600190613974565b60008381526009602052604081205460088054939450909284908110612f8157612f81613943565b906000526020600020015490508060088381548110612fa257612fa2613943565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612fda57612fda613b41565b6001900381819060005260206000200160009055905550505050565b6000613001836118b7565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613071575060009050600361311e565b8460ff16601b1415801561308957508460ff16601c14155b1561309a575060009050600461311e565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156130ee573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166131175760006001925092505061311e565b9150600090505b94509492505050565b6000806001600160ff1b0383168161314460ff86901c601b6138d4565b90506131528782888561303a565b935093505050935093915050565b82805461316c906137de565b90600052602060002090601f01602090048101928261318e57600085556131d4565b82601f106131a757805160ff19168380011785556131d4565b828001600101855582156131d4579182015b828111156131d45782518255916020019190600101906131b9565b506131e0929150613258565b5090565b8280546131f0906137de565b90600052602060002090601f01602090048101928261321257600085556131d4565b82601f1061322b5782800160ff198235161785556131d4565b828001600101855582156131d4579182015b828111156131d457823582559160200191906001019061323d565b5b808211156131e05760008155600101613259565b6001600160e01b0319811681146121aa57600080fd5b60006020828403121561329557600080fd5b81356132a08161326d565b9392505050565b60005b838110156132c25781810151838201526020016132aa565b83811115611e9c5750506000910152565b600081518084526132eb8160208601602086016132a7565b601f01601f19169290920160200192915050565b6020815260006132a060208301846132d3565b60006020828403121561332457600080fd5b5035919050565b80356001600160a01b038116811461334257600080fd5b919050565b6000806040838503121561335a57600080fd5b6133638361332b565b946020939093013593505050565b60008060006060848603121561338657600080fd5b61338f8461332b565b925061339d6020850161332b565b9150604084013590509250925092565b60008083601f8401126133bf57600080fd5b50813567ffffffffffffffff8111156133d757600080fd5b6020830191508360208260051b8501011115612b9a57600080fd5b6000806020838503121561340557600080fd5b823567ffffffffffffffff81111561341c57600080fd5b613428858286016133ad565b90969095509350505050565b60006020828403121561344657600080fd5b6132a08261332b565b6020808252825182820181905260009190848201906040850190845b818110156134875783518352928401929184019160010161346b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126134ba57600080fd5b813567ffffffffffffffff808211156134d5576134d5613493565b604051601f8301601f19908116603f011681019082821181831017156134fd576134fd613493565b8160405283815286602085880101111561351657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561354857600080fd5b813567ffffffffffffffff81111561355f57600080fd5b61232f848285016134a9565b6000806000806080858703121561358157600080fd5b84359350602085013567ffffffffffffffff808211156135a057600080fd5b6135ac888389016134a9565b945060408701359150808211156135c257600080fd5b506135cf878288016134a9565b949793965093946060013593505050565b8035801515811461334257600080fd5b60006020828403121561360257600080fd5b6132a0826135e0565b6000806040838503121561361e57600080fd5b50508035926020909101359150565b6000806020838503121561364057600080fd5b823567ffffffffffffffff8082111561365857600080fd5b818501915085601f83011261366c57600080fd5b81358181111561367b57600080fd5b86602082850101111561368d57600080fd5b60209290920196919550909350505050565b600080604083850312156136b257600080fd5b6136bb8361332b565b91506136c9602084016135e0565b90509250929050565b600080600080608085870312156136e857600080fd5b6136f18561332b565b93506136ff6020860161332b565b925060408501359150606085013567ffffffffffffffff81111561372257600080fd5b61372e878288016134a9565b91505092959194509250565b600060c0828403121561374c57600080fd5b60405160c0810181811067ffffffffffffffff8211171561376f5761376f613493565b8060405250823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b600080604083850312156137c757600080fd5b6137d08361332b565b91506136c96020840161332b565b600181811c908216806137f257607f821691505b6020821081141561381357634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156138cf576138cf61389f565b500290565b600082198211156138e7576138e761389f565b500190565b602080825260119082015270457863656564206d617820737570706c7960781b604082015260600190565b602080825260129082015271457863656564207469657220737570706c7960701b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561396d5761396d61389f565b5060010190565b6000828210156139865761398661389f565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826139b0576139b061398b565b500490565b600082516139c78184602087016132a7565b9190910192915050565b6020808252600b908201526a105b1c9958591e481cd95d60aa1b604082015260600190565b60008351613a088184602088016132a7565b835190830190613a1c8183602088016132a7565b01949350505050565b6bffffffffffffffffffffffff198560601b16815283601482015260008351613a558160348501602088016132a7565b6034920191820192909252605401949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613acc57613acc61398b565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b04908301846132d3565b9695505050505050565b600060208284031215613b2057600080fd5b81516132a08161326d565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfea264697066735822122030771da62d96d3f45db7cd138c55205ca576def52674b98dec010196b53f7ef664736f6c634300080900330000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003de000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000dce320da40fec275dedefec89071e157c230d4a3d49b3557f980f43b94638bec8d000000000000000000000000fc6e4f46499f7c2f14ac013aa32138d38365daf6000000000000000000000000000000000000000000000000000000000000000b43727970746f204d696e640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002434d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6170692e63727970746f6d696e642e74772f6d657461646174612f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003268747470733a2f2f6170692e63727970746f6d696e642e74772f636f6c6c656374696f6e2f636f6e74726163742e6a736f6e0000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103275760003560e01c8063791a2519116101ae578063bd32fb66116100eb578063de7fcb1d1161008f578063e985e9c51161006c578063e985e9c514610967578063f2fde38b146109b0578063fc1a1c36146109d0578063fe60d12c146109e657005b8063de7fcb1d1461091c578063e2e06fa314610932578063e8a3d4851461095257005b8063d1b4b9a3116100c8578063d1b4b9a31461089c578063d5abeb01146108b6578063db4bec44146108cc578063dccde200146108fc57005b8063bd32fb661461083c578063c87b56dd1461085c578063c9edb3cc1461087c57005b80639b6860c811610152578063aa98e0c61161012f578063aa98e0c6146107c7578063adeadf5d146107dd578063b88d4fde146107fd578063b98451cf1461081d57005b80639b6860c81461077e578063a22cb46514610794578063aa6d324a146107b457005b8063866e01241161018b578063866e0124146107155780638da5cb5b1461072b578063938e3d7b1461074957806395d89b411461076957005b8063791a25191461067d5780637d9f6db51461069d578063801316dc146106f557005b80634bd25c6f1161027c578063667f8ac2116102205780636d5d40c6116101fd5780636d5d40c61461060857806370a0823114610628578063715018a614610648578063717d57d31461065d57005b8063667f8ac2146105bf5780636a78f227146105d25780636bb7b1d9146105f257005b8063549b9da511610259578063549b9da51461054957806355f804b31461055f5780635b7633d01461057f5780636352211e1461059f57005b80634bd25c6f146104f45780634f6ccce71461050957806351cff8d91461052957005b8063209ee297116102e35780632f745c59116102c05780632f745c5914610474578063372f657c1461049457806342842e0e146104a7578063438b6300146104c757005b8063209ee2971461041e578063230b43f41461043e57806323b872dd1461045457005b806301ffc9a71461033057806306fdde0314610365578063081812fc14610387578063095ea7b3146103bf57806318160ddd146103df5780631e84c413146103fe57005b3661032e57005b005b34801561033c57600080fd5b5061035061034b366004613283565b6109fc565b60405190151581526020015b60405180910390f35b34801561037157600080fd5b5061037a610a0d565b60405161035c91906132ff565b34801561039357600080fd5b506103a76103a2366004613312565b610a9f565b6040516001600160a01b03909116815260200161035c565b3480156103cb57600080fd5b5061032e6103da366004613347565b610b39565b3480156103eb57600080fd5b506008545b60405190815260200161035c565b34801561040a57600080fd5b50600d546103509062010000900460ff1681565b34801561042a57600080fd5b5061032e610439366004613312565b610c4f565b34801561044a57600080fd5b506103f060175481565b34801561046057600080fd5b5061032e61046f366004613371565b610ce1565b34801561048057600080fd5b506103f061048f366004613347565b610d12565b61032e6104a23660046133f2565b610da8565b3480156104b357600080fd5b5061032e6104c2366004613371565b6110c9565b3480156104d357600080fd5b506104e76104e2366004613434565b6110e4565b60405161035c919061344f565b34801561050057600080fd5b506103f0611228565b34801561051557600080fd5b506103f0610524366004613312565b611308565b34801561053557600080fd5b5061032e610544366004613434565b61139b565b34801561055557600080fd5b506103f060145481565b34801561056b57600080fd5b5061032e61057a366004613536565b6113fd565b34801561058b57600080fd5b50600f546103a7906001600160a01b031681565b3480156105ab57600080fd5b506103a76105ba366004613312565b61143e565b61032e6105cd36600461356b565b6114b5565b3480156105de57600080fd5b5061032e6105ed3660046135f0565b611815565b3480156105fe57600080fd5b506103f060165481565b34801561061457600080fd5b5061032e610623366004613312565b611888565b34801561063457600080fd5b506103f0610643366004613434565b6118b7565b34801561065457600080fd5b5061032e61193e565b34801561066957600080fd5b5061032e610678366004613312565b611974565b34801561068957600080fd5b5061032e610698366004613312565b6119a3565b3480156106a957600080fd5b50601d54601e54601f546020546021546022546106c895949392919086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c00161035c565b34801561070157600080fd5b5061032e61071036600461360b565b6119d2565b34801561072157600080fd5b506103f060185481565b34801561073757600080fd5b50600a546001600160a01b03166103a7565b34801561075557600080fd5b5061032e61076436600461362d565b611a07565b34801561077557600080fd5b5061037a611a3d565b34801561078a57600080fd5b506103f060135481565b3480156107a057600080fd5b5061032e6107af36600461369f565b611a4c565b61032e6107c236600461356b565b611a57565b3480156107d357600080fd5b506103f0600e5481565b3480156107e957600080fd5b5061032e6107f83660046133f2565b611c4f565b34801561080957600080fd5b5061032e6108183660046136d2565b611e6a565b34801561082957600080fd5b50600d5461035090610100900460ff1681565b34801561084857600080fd5b5061032e610857366004613312565b611ea2565b34801561086857600080fd5b5061037a610877366004613312565b611ed1565b34801561088857600080fd5b5061032e6108973660046135f0565b611f88565b3480156108a857600080fd5b50600d546103509060ff1681565b3480156108c257600080fd5b506103f060105481565b3480156108d857600080fd5b506103506108e7366004613434565b601b6020526000908152604090205460ff1681565b34801561090857600080fd5b5061032e61091736600461373a565b611fee565b34801561092857600080fd5b506103f060155481565b34801561093e57600080fd5b5061032e61094d3660046135f0565b61208d565b34801561095e57600080fd5b5061037a612103565b34801561097357600080fd5b506103506109823660046137b4565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156109bc57600080fd5b5061032e6109cb366004613434565b612112565b3480156109dc57600080fd5b506103f060125481565b3480156109f257600080fd5b506103f060115481565b6000610a07826121ad565b92915050565b606060008054610a1c906137de565b80601f0160208091040260200160405190810160405280929190818152602001828054610a48906137de565b8015610a955780601f10610a6a57610100808354040283529160200191610a95565b820191906000526020600020905b815481529060010190602001808311610a7857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b1d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b448261143e565b9050806001600160a01b0316836001600160a01b03161415610bb25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b14565b336001600160a01b0382161480610bce5750610bce8133610982565b610c405760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b14565b610c4a83836121d2565b505050565b600a546001600160a01b03163314610c795760405162461bcd60e51b8152600401610b1490613819565b806010541015610cdc5760405162461bcd60e51b815260206004820152602860248201527f5469657220737570706c79206d757374206265206c657373207468616e206d616044820152677820737570706c7960c01b6064820152608401610b14565b601455565b610ceb3382612240565b610d075760405162461bcd60e51b8152600401610b149061384e565b610c4a838383612337565b6000610d1d836118b7565b8210610d7f5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b14565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d54610100900460ff16610dff5760405162461bcd60e51b815260206004820181905260248201527f57686974656c697374206d7573742062652061637469766520746f206d696e746044820152606401610b14565b6017544210158015610e1357506018544211155b610e5f5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420696e2077686974656c6973742073616c6520706572696f64000000006044820152606401610b14565b336000908152601b60205260409020548290829060ff1615610ec35760405162461bcd60e51b815260206004820152601c60248201527f416464726573732068617320616c726561647920636c61696d65642e000000006044820152606401610b14565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610f3d83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e5491508490506124de565b610f7a5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b210383937b7b31760911b6044820152606401610b14565b601254600190610f8a81836138b5565b341015610fce5760405162461bcd60e51b815260206004820152601260248201527124b739bab33334b1b4b2b73a1032ba3432b960711b6044820152606401610b14565b600160105481610fdd600b5490565b600c54610fea91906138d4565b610ff491906138d4565b11156110125760405162461bcd60e51b8152600401610b14906138ec565b6014548161101f600b5490565b600c5461102c91906138d4565b61103691906138d4565b11156110545760405162461bcd60e51b8152600401610b1490613917565b600160155481111561109b5760405162461bcd60e51b815260206004820152601060248201526f496e76616c6964207175616e7469747960801b6044820152606401610b14565b6110a4336124f4565b5050336000908152601b60205260409020805460ff1916600117905550505050505050565b610c4a83838360405180602001604052806000815250611e6a565b606060006110f1836118b7565b905060008167ffffffffffffffff81111561110e5761110e613493565b604051908082528060200260200182016040528015611137578160200160208202803683370190505b50905060008061114660085490565b905060005b8181101561121d576000818152600260205260409020546001600160a01b0316158015906111c657876001600160a01b03166111868361143e565b6001600160a01b031614156111c157818585815181106111a8576111a8613943565b6020908102919091010152836111bd81613959565b9450505b61120a565b801580156111f75750846111db600188613974565b815181106111eb576111eb613943565b60200260200101516000145b1561120a578261120681613959565b9350505b508061121581613959565b91505061114b565b509195945050505050565b6040805160c081018252601d548152601e54602080830191909152601f549282019290925290546060820152602154608082015260225460a0820152600d546000919060ff1661127a57600091505090565b805142101561128c5760400151919050565b60208101518151600091906112a19042613974565b6112ab91906139a1565b90508160a001518111156112c0575060a08101515b60808201516112cf90826138b5565b8260400151116112e3578160600151611301565b60808201516112f290826138b5565b82604001516113019190613974565b9250505090565b600061131360085490565b82106113765760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b14565b6008828154811061138957611389613943565b90600052602060002001549050919050565b600a546001600160a01b031633146113c55760405162461bcd60e51b8152600401610b1490613819565b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610c4a573d6000803e3d6000fd5b600a546001600160a01b031633146114275760405162461bcd60e51b8152600401610b1490613819565b805161143a90601a906020840190613160565b5050565b6000818152600260205260408120546001600160a01b031680610a075760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b14565b600d5462010000900460ff166115185760405162461bcd60e51b815260206004820152602260248201527f5075626c69632073616c65206d7573742062652061637469766520746f206d696044820152611b9d60f21b6064820152608401610b14565b60165442101561156a5760405162461bcd60e51b815260206004820152601f60248201527f5075626c69632073616c6520686173206e6f74207374617274656420796574006044820152606401610b14565b600184848484601c8260405161158091906139b5565b9081526040519081900360200190205460ff16156115cc5760405162461bcd60e51b815260206004820152600960248201526812185cda081d5cd95960ba1b6044820152606401610b14565b80421061160f5760405162461bcd60e51b81526020600482015260116024820152701cda59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610b14565b6116198484612531565b61165f5760405162461bcd60e51b81526020600482015260176024820152764e6f7420616c6c6f77206d696e74206469726563746c7960481b6044820152606401610b14565b8361166c33878585612555565b146116aa5760405162461bcd60e51b815260206004820152600e60248201526d090c2e6d040dcdee840dac2e8c6d60931b6044820152606401610b14565b6013546001906116ba81836138b5565b3410156116fe5760405162461bcd60e51b815260206004820152601260248201527124b739bab33334b1b4b2b73a1032ba3432b960711b6044820152606401610b14565b60016010548161170d600b5490565b600c5461171a91906138d4565b61172491906138d4565b11156117425760405162461bcd60e51b8152600401610b14906138ec565b6014548161174f600b5490565b600c5461175c91906138d4565b61176691906138d4565b11156117845760405162461bcd60e51b8152600401610b1490613917565b60016015548111156117cb5760405162461bcd60e51b815260206004820152601060248201526f496e76616c6964207175616e7469747960801b6044820152606401610b14565b6117d4336124f4565b6001601c8c6040516117e691906139b5565b908152604051908190036020019020805491151560ff1990921691909117905550505050505050505050505050565b600a546001600160a01b0316331461183f5760405162461bcd60e51b8152600401610b1490613819565b600d5460ff610100909104161515811515141561186e5760405162461bcd60e51b8152600401610b14906139d1565b600d80549115156101000261ff0019909216919091179055565b600a546001600160a01b031633146118b25760405162461bcd60e51b8152600401610b1490613819565b601655565b60006001600160a01b0382166119225760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b14565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119685760405162461bcd60e51b8152600401610b1490613819565b61197260006125d6565b565b600a546001600160a01b0316331461199e5760405162461bcd60e51b8152600401610b1490613819565b601255565b600a546001600160a01b031633146119cd5760405162461bcd60e51b8152600401610b1490613819565b601355565b600a546001600160a01b031633146119fc5760405162461bcd60e51b8152600401610b1490613819565b601791909155601855565b600a546001600160a01b03163314611a315760405162461bcd60e51b8152600401610b1490613819565b610c4a601983836131e4565b606060018054610a1c906137de565b61143a338383612628565b600d5460ff16611aa95760405162461bcd60e51b815260206004820152601e60248201527f41756374696f6e206d7573742062652061637469766520746f206d696e7400006044820152606401610b14565b601d54421015611afb5760405162461bcd60e51b815260206004820152601c60248201527f41756374696f6e20686173206e6f742073746172746564207965742e000000006044820152606401610b14565b600184848484601c82604051611b1191906139b5565b9081526040519081900360200190205460ff1615611b5d5760405162461bcd60e51b815260206004820152600960248201526812185cda081d5cd95960ba1b6044820152606401610b14565b804210611ba05760405162461bcd60e51b81526020600482015260116024820152701cda59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610b14565b611baa8484612531565b611bf05760405162461bcd60e51b81526020600482015260176024820152764e6f7420616c6c6f77206d696e74206469726563746c7960481b6044820152606401610b14565b83611bfd33878585612555565b14611c3b5760405162461bcd60e51b815260206004820152600e60248201526d090c2e6d040dcdee840dac2e8c6d60931b6044820152606401610b14565b6001611c45611228565b6116ba81836138b5565b600a546001600160a01b03163314611c795760405162461bcd60e51b8152600401610b1490613819565b601054819081611c88600b5490565b600c54611c9591906138d4565b611c9f91906138d4565b1115611cbd5760405162461bcd60e51b8152600401610b14906138ec565b60145481611cca600b5490565b600c54611cd791906138d4565b611ce191906138d4565b1115611cff5760405162461bcd60e51b8152600401610b1490613917565b601154829081611d0e600c5490565b611d1891906138d4565b1115611d665760405162461bcd60e51b815260206004820152601760248201527f4578636565647320726573657276656420737570706c790000000000000000006044820152606401610b14565b600d54610100900460ff16158015611d815750600d5460ff16155b8015611d965750600d5462010000900460ff16155b611de25760405162461bcd60e51b815260206004820152601760248201527f43616e277420636c61696d20647572696e672073616c650000000000000000006044820152606401610b14565b60005b83811015611e63576000611df8600b5490565b600c54611e0591906138d4565b611e109060016138d4565b9050611e42868684818110611e2757611e27613943565b9050602002016020810190611e3c9190613434565b826126f7565b611e50600c80546001019055565b5080611e5b81613959565b915050611de5565b5050505050565b611e743383612240565b611e905760405162461bcd60e51b8152600401610b149061384e565b611e9c84848484612711565b50505050565b600a546001600160a01b03163314611ecc5760405162461bcd60e51b8152600401610b1490613819565b600e55565b6000818152600260205260409020546060906001600160a01b0316611f505760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b14565b611f58612744565b611f6183612753565b604051602001611f729291906139f6565b6040516020818303038152906040529050919050565b600a546001600160a01b03163314611fb25760405162461bcd60e51b8152600401610b1490613819565b600d5460ff1615158115151415611fdb5760405162461bcd60e51b8152600401610b14906139d1565b600d805460ff1916911515919091179055565b600a546001600160a01b031633146120185760405162461bcd60e51b8152600401610b1490613819565b601d5481511161205f5760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642073746172742074696d6560701b6044820152606401610b14565b8051601d55602080820151601e556040820151601f5560608201519055608081015160215560a00151602255565b600a546001600160a01b031633146120b75760405162461bcd60e51b8152600401610b1490613819565b600d5460ff6201000090910416151581151514156120e75760405162461bcd60e51b8152600401610b14906139d1565b600d8054911515620100000262ff000019909216919091179055565b606060198054610a1c906137de565b600a546001600160a01b0316331461213c5760405162461bcd60e51b8152600401610b1490613819565b6001600160a01b0381166121a15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b14565b6121aa816125d6565b50565b60006001600160e01b0319821663780e9d6360e01b1480610a075750610a0782612851565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906122078261143e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166122b95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b14565b60006122c48361143e565b9050806001600160a01b0316846001600160a01b031614806122ff5750836001600160a01b03166122f484610a9f565b6001600160a01b0316145b8061232f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661234a8261143e565b6001600160a01b0316146123ae5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b14565b6001600160a01b0382166124105760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b14565b61241b8383836128a1565b6124266000826121d2565b6001600160a01b038316600090815260036020526040812080546001929061244f908490613974565b90915550506001600160a01b038216600090815260036020526040812080546001929061247d9084906138d4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000826124eb85846128ac565b14949350505050565b60006124ff600b5490565b600c5461250c91906138d4565b6125179060016138d4565b905061252382826126f7565b61143a600b80546001019055565b600061253d8383612920565b600f546001600160a01b039182169116149392505050565b6000808585858560405160200161256f9493929190613a25565b60408051808303601f1901815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000082850152603c8085019190915282518085039091018152605c90930190915281519101209695505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316141561268a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b14565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61143a82826040518060200160405280600081525061293c565b61271c848484612337565b6127288484848461296f565b611e9c5760405162461bcd60e51b8152600401610b1490613a6b565b6060601a8054610a1c906137de565b6060816127775750506040805180820190915260018152600360fc1b602082015290565b8160005b81156127a1578061278b81613959565b915061279a9050600a836139a1565b915061277b565b60008167ffffffffffffffff8111156127bc576127bc613493565b6040519080825280601f01601f1916602001820160405280156127e6576020820181803683370190505b5090505b841561232f576127fb600183613974565b9150612808600a86613abd565b6128139060306138d4565b60f81b81838151811061282857612828613943565b60200101906001600160f81b031916908160001a90535061284a600a866139a1565b94506127ea565b60006001600160e01b031982166380ac58cd60e01b148061288257506001600160e01b03198216635b5e139f60e01b145b80610a0757506301ffc9a760e01b6001600160e01b0319831614610a07565b610c4a838383612a79565b600081815b84518110156129185760008582815181106128ce576128ce613943565b602002602001015190508083116128f45760008381526020829052604090209250612905565b600081815260208490526040902092505b508061291081613959565b9150506128b1565b509392505050565b600080600061292f8585612b31565b9150915061291881612ba1565b6129468383612d5c565b612953600084848461296f565b610c4a5760405162461bcd60e51b8152600401610b1490613a6b565b60006001600160a01b0384163b15612a7157604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906129b3903390899088908890600401613ad1565b602060405180830381600087803b1580156129cd57600080fd5b505af19250505080156129fd575060408051601f3d908101601f191682019092526129fa91810190613b0e565b60015b612a57573d808015612a2b576040519150601f19603f3d011682016040523d82523d6000602084013e612a30565b606091505b508051612a4f5760405162461bcd60e51b8152600401610b1490613a6b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061232f565b50600161232f565b6001600160a01b038316612ad457612acf81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612af7565b816001600160a01b0316836001600160a01b031614612af757612af78382612eaa565b6001600160a01b038216612b0e57610c4a81612f47565b826001600160a01b0316826001600160a01b031614610c4a57610c4a8282612ff6565b600080825160411415612b685760208301516040840151606085015160001a612b5c8782858561303a565b94509450505050612b9a565b825160401415612b925760208301516040840151612b87868383613127565b935093505050612b9a565b506000905060025b9250929050565b6000816004811115612bb557612bb5613b2b565b1415612bbe5750565b6001816004811115612bd257612bd2613b2b565b1415612c205760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b14565b6002816004811115612c3457612c34613b2b565b1415612c825760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b14565b6003816004811115612c9657612c96613b2b565b1415612cef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b14565b6004816004811115612d0357612d03613b2b565b14156121aa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b14565b6001600160a01b038216612db25760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b14565b6000818152600260205260409020546001600160a01b031615612e175760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b14565b612e23600083836128a1565b6001600160a01b0382166000908152600360205260408120805460019290612e4c9084906138d4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612eb7846118b7565b612ec19190613974565b600083815260076020526040902054909150808214612f14576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612f5990600190613974565b60008381526009602052604081205460088054939450909284908110612f8157612f81613943565b906000526020600020015490508060088381548110612fa257612fa2613943565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612fda57612fda613b41565b6001900381819060005260206000200160009055905550505050565b6000613001836118b7565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613071575060009050600361311e565b8460ff16601b1415801561308957508460ff16601c14155b1561309a575060009050600461311e565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156130ee573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166131175760006001925092505061311e565b9150600090505b94509492505050565b6000806001600160ff1b0383168161314460ff86901c601b6138d4565b90506131528782888561303a565b935093505050935093915050565b82805461316c906137de565b90600052602060002090601f01602090048101928261318e57600085556131d4565b82601f106131a757805160ff19168380011785556131d4565b828001600101855582156131d4579182015b828111156131d45782518255916020019190600101906131b9565b506131e0929150613258565b5090565b8280546131f0906137de565b90600052602060002090601f01602090048101928261321257600085556131d4565b82601f1061322b5782800160ff198235161785556131d4565b828001600101855582156131d4579182015b828111156131d457823582559160200191906001019061323d565b5b808211156131e05760008155600101613259565b6001600160e01b0319811681146121aa57600080fd5b60006020828403121561329557600080fd5b81356132a08161326d565b9392505050565b60005b838110156132c25781810151838201526020016132aa565b83811115611e9c5750506000910152565b600081518084526132eb8160208601602086016132a7565b601f01601f19169290920160200192915050565b6020815260006132a060208301846132d3565b60006020828403121561332457600080fd5b5035919050565b80356001600160a01b038116811461334257600080fd5b919050565b6000806040838503121561335a57600080fd5b6133638361332b565b946020939093013593505050565b60008060006060848603121561338657600080fd5b61338f8461332b565b925061339d6020850161332b565b9150604084013590509250925092565b60008083601f8401126133bf57600080fd5b50813567ffffffffffffffff8111156133d757600080fd5b6020830191508360208260051b8501011115612b9a57600080fd5b6000806020838503121561340557600080fd5b823567ffffffffffffffff81111561341c57600080fd5b613428858286016133ad565b90969095509350505050565b60006020828403121561344657600080fd5b6132a08261332b565b6020808252825182820181905260009190848201906040850190845b818110156134875783518352928401929184019160010161346b565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126134ba57600080fd5b813567ffffffffffffffff808211156134d5576134d5613493565b604051601f8301601f19908116603f011681019082821181831017156134fd576134fd613493565b8160405283815286602085880101111561351657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561354857600080fd5b813567ffffffffffffffff81111561355f57600080fd5b61232f848285016134a9565b6000806000806080858703121561358157600080fd5b84359350602085013567ffffffffffffffff808211156135a057600080fd5b6135ac888389016134a9565b945060408701359150808211156135c257600080fd5b506135cf878288016134a9565b949793965093946060013593505050565b8035801515811461334257600080fd5b60006020828403121561360257600080fd5b6132a0826135e0565b6000806040838503121561361e57600080fd5b50508035926020909101359150565b6000806020838503121561364057600080fd5b823567ffffffffffffffff8082111561365857600080fd5b818501915085601f83011261366c57600080fd5b81358181111561367b57600080fd5b86602082850101111561368d57600080fd5b60209290920196919550909350505050565b600080604083850312156136b257600080fd5b6136bb8361332b565b91506136c9602084016135e0565b90509250929050565b600080600080608085870312156136e857600080fd5b6136f18561332b565b93506136ff6020860161332b565b925060408501359150606085013567ffffffffffffffff81111561372257600080fd5b61372e878288016134a9565b91505092959194509250565b600060c0828403121561374c57600080fd5b60405160c0810181811067ffffffffffffffff8211171561376f5761376f613493565b8060405250823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a08201528091505092915050565b600080604083850312156137c757600080fd5b6137d08361332b565b91506136c96020840161332b565b600181811c908216806137f257607f821691505b6020821081141561381357634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156138cf576138cf61389f565b500290565b600082198211156138e7576138e761389f565b500190565b602080825260119082015270457863656564206d617820737570706c7960781b604082015260600190565b602080825260129082015271457863656564207469657220737570706c7960701b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561396d5761396d61389f565b5060010190565b6000828210156139865761398661389f565b500390565b634e487b7160e01b600052601260045260246000fd5b6000826139b0576139b061398b565b500490565b600082516139c78184602087016132a7565b9190910192915050565b6020808252600b908201526a105b1c9958591e481cd95d60aa1b604082015260600190565b60008351613a088184602088016132a7565b835190830190613a1c8183602088016132a7565b01949350505050565b6bffffffffffffffffffffffff198560601b16815283601482015260008351613a558160348501602088016132a7565b6034920191820192909252605401949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613acc57613acc61398b565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b04908301846132d3565b9695505050505050565b600060208284031215613b2057600080fd5b81516132a08161326d565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfea264697066735822122030771da62d96d3f45db7cd138c55205ca576def52674b98dec010196b53f7ef664736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003de000000000000000000000000000000000000000000000000000000000000005a00000000000000000000000000000000000000000000000000000000000000dce320da40fec275dedefec89071e157c230d4a3d49b3557f980f43b94638bec8d000000000000000000000000fc6e4f46499f7c2f14ac013aa32138d38365daf6000000000000000000000000000000000000000000000000000000000000000b43727970746f204d696e640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002434d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002368747470733a2f2f6170692e63727970746f6d696e642e74772f6d657461646174612f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003268747470733a2f2f6170692e63727970746f6d696e642e74772f636f6c6c656374696f6e2f636f6e74726163742e6a736f6e0000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Crypto Mind
Arg [1] : _symbol (string): CM
Arg [2] : _baseTokenURI (string): https://api.cryptomind.tw/metadata/
Arg [3] : _uri (string): https://api.cryptomind.tw/collection/contract.json
Arg [4] : _maxMintPerTx (uint256): 1
Arg [5] : _maxSupply (uint256): 990
Arg [6] : _reserved (uint256): 90
Arg [7] : _tierSupply (uint256): 220
Arg [8] : _whitelistMerkleRoot (bytes32): 0xe320da40fec275dedefec89071e157c230d4a3d49b3557f980f43b94638bec8d
Arg [9] : _signerAddress (address): 0xfc6e4F46499f7c2f14Ac013Aa32138D38365dAF6
-----Encoded View---------------
20 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 00000000000000000000000000000000000000000000000000000000000003de
Arg [6] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [7] : 00000000000000000000000000000000000000000000000000000000000000dc
Arg [8] : e320da40fec275dedefec89071e157c230d4a3d49b3557f980f43b94638bec8d
Arg [9] : 000000000000000000000000fc6e4f46499f7c2f14ac013aa32138d38365daf6
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [11] : 43727970746f204d696e64000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [13] : 434d000000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000023
Arg [15] : 68747470733a2f2f6170692e63727970746f6d696e642e74772f6d6574616461
Arg [16] : 74612f0000000000000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [18] : 68747470733a2f2f6170692e63727970746f6d696e642e74772f636f6c6c6563
Arg [19] : 74696f6e2f636f6e74726163742e6a736f6e0000000000000000000000000000
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.