ERC-721
Overview
Max Total Supply
4,330 THO
Holders
682
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 THOLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HolyOnes
Compiler Version
v0.8.12+commit.f00d7308
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.11; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./Tag.sol"; contract HolyOnes is ERC721, ERC721Enumerable, Ownable { enum SaleState { Off, Presale1, Public, Soldout } struct PresaleData { uint256 maxMintPerAddress; uint256 maxMintPerTransaction; uint256 price; bytes32 merkleroot; uint256 maxTokensInPresale; uint256 counter; mapping(address => uint256) tokensMintedByAddress; } using SafeMath for uint256; using MerkleProof for bytes32[]; SaleState public saleState; uint256 public maxSupply; uint256 public maxMintPerTransaction; uint256 public price; PresaleData[] public presaleData; address public beneficiary; string public baseURI; bool public resurrected; string public provenance; modifier whenPublicSaleStarted() { require(saleState==SaleState.Public,"Public Sale not active"); _; } modifier whenSaleStarted() { require( saleState==SaleState.Presale1 || saleState==SaleState.Public, "Sale not active" ); _; } modifier whenSaleOff() { require( saleState==SaleState.Off, "Sale is active" ); _; } modifier isWhitelistSale(SaleState _saleState) { require( _saleState==SaleState.Presale1, "Parameter must be a valid presale" ); _; } modifier whenMerklerootSet(SaleState _presaleNumber) { require(presaleData[uint(_presaleNumber)].merkleroot!=0,"Merkleroot not set for presale"); _; } modifier whenAddressOnWhitelist(bytes32[] memory _merkleproof) { require(MerkleProof.verify( _merkleproof, getPresale().merkleroot, keccak256(abi.encodePacked(msg.sender)) ), "Not on white list" ); _; } constructor() ERC721("TheHolyOnes", "THO") { price = 0.0666 ether; beneficiary = 0x2C554b28879d44f254491f32d277dd59aA7379a1; saleState = SaleState.Off; maxSupply = 6666; maxMintPerTransaction = 50; resurrected = false; provenance = "0fa50629e15b001d3789271ba840bbe2e26764684b22f1e402a6a110e502b212"; presaleData.push(); // Presale 1 createPresale(100, 50, 0.0666 ether, 4444); } function mintPublic(uint256 _numTokens) external payable whenPublicSaleStarted() { uint256 supply = totalSupply(); require(_numTokens <= maxMintPerTransaction, "Minting too many tokens at once!"); require(supply.add(_numTokens) <= maxSupply, "Not enough Tokens remaining."); require(_numTokens.mul(price) <= msg.value, "Incorrect amount sent!"); for (uint256 i; i < _numTokens; i++) { _safeMint(msg.sender, supply.add(1).add(i)); } } function mintWhitelist(uint256 _numTokens, bytes32[] calldata _merkleproof) external payable isWhitelistSale(saleState) whenMerklerootSet(saleState) whenAddressOnWhitelist(_merkleproof) { uint256 currentSupply = totalSupply(); uint256 presaleSupply = getPresale().counter; uint256 numWhitelistTokensByAddress = getPresale().tokensMintedByAddress[msg.sender]; require(_numTokens<=getPresale().maxMintPerTransaction, "Cannot mint that many tokens in one transaction"); require(numWhitelistTokensByAddress.add(_numTokens) <= getPresale().maxMintPerAddress,"Exceeds the number of whitelist mints"); require(presaleSupply.add(_numTokens) <= getPresale().maxTokensInPresale, "Not enough Tokens remaining in presale."); require(currentSupply.add(_numTokens) <= maxSupply, "Not enough Tokens remaining in sale."); require(_numTokens.mul(getPresale().price) <= msg.value, "Incorrect amount sent!"); for (uint256 i; i < _numTokens; i++) { _safeMint(msg.sender, currentSupply.add(1).add(i)); getPresale().counter++; } getPresale().tokensMintedByAddress[msg.sender] = numWhitelistTokensByAddress.add(_numTokens); } function mintReserveTokens(address _to, uint256 _numTokens) public onlyOwner { require(saleState==SaleState.Off,"Sale must be off to reserve tokens"); require(_to!=address(0),"Cannot mint reserve tokens to the burn address"); uint256 supply = totalSupply(); require(supply.add(_numTokens) <= maxSupply, "Cannot mint more than max supply"); require(_numTokens <= 50,"Gas limit protection"); for (uint256 i; i < _numTokens; i++) { _safeMint(_to , supply.add(1).add(i)); } } function getTokensMintedByAddressInPresale(uint256 _presaleNumber, address _address) public view returns (uint256) { return presaleData[uint(_presaleNumber)].tokensMintedByAddress[_address]; } function tokensInWallet(address _owner) public view returns(uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for(uint256 i; i < tokenCount; i++){ tokensId[i] = tokenOfOwnerByIndex(_owner, i); } return tokensId; } function withdraw() public { uint256 balance = address(this).balance; require(payable(beneficiary).send(balance)); } function ressurect() public onlyOwner { require(!resurrected, "Holy Ones have already been resurrected"); resurrected = true; } function startPublicSale() external onlyOwner() whenSaleOff(){ saleState = SaleState.Public; } function startWhitelistSale(SaleState _presaleNumber) external whenSaleOff() isWhitelistSale(_presaleNumber) whenMerklerootSet(_presaleNumber) onlyOwner() { saleState = _presaleNumber; } function stopSale() external whenSaleStarted() onlyOwner() { saleState = SaleState.Off; } function setMerkleroot(SaleState _presaleNumber, bytes32 _merkleRoot) public whenSaleOff() isWhitelistSale(_presaleNumber) onlyOwner { presaleData[uint(_presaleNumber)].merkleroot = _merkleRoot; } function setBaseURI(string memory _URI) external onlyOwner { baseURI = _URI; } function _baseURI() internal view override(ERC721) returns (string memory) { return baseURI; } function createPresale( uint256 _maxMintPerAddress, uint256 _maxMintPerTransaction, uint256 _price, uint256 _maxTokensInPresale ) private { PresaleData storage presale = presaleData.push(); presale.maxMintPerAddress = _maxMintPerAddress; presale.maxMintPerTransaction = _maxMintPerTransaction; presale.price = _price; presale.maxTokensInPresale = _maxTokensInPresale; } function getPresale() private view returns (PresaleData storage) { return presaleData[uint(saleState)]; } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; // ---------------[ ]--------------- // -------[ ]-------------[ ]------- // --------------------------------- // ----[ ]--------[ ]--------[ ]---- // --------------------------------- // -------[ ]-------------[ ]------- // ---------------[ ]--------------- // ________ __ __ __ ____ // /_ __/ /_ ___ / / / /___ / /_ __/ __ \____ ___ _____ // / / / __ \/ _ \ / /_/ / __ \/ / / / / / / / __ \/ _ \/ ___/ // / / / / / / __/ / __ / /_/ / / /_/ / /_/ / / / / __(__ ) // /_/ /_/ /_/\___/ /_/ /_/\____/_/\__, /\____/_/ /_/\___/____/ // /____/
// 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 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/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// 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 (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 (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); }
// 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/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/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 (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 (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 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/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 (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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_presaleNumber","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"getTokensMintedByAddressInPresale","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":"maxMintPerTransaction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numTokens","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_numTokens","type":"uint256"}],"name":"mintReserveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numTokens","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleproof","type":"bytes32[]"}],"name":"mintWhitelist","outputs":[],"stateMutability":"payable","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":"uint256","name":"","type":"uint256"}],"name":"presaleData","outputs":[{"internalType":"uint256","name":"maxMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"maxMintPerTransaction","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes32","name":"merkleroot","type":"bytes32"},{"internalType":"uint256","name":"maxTokensInPresale","type":"uint256"},{"internalType":"uint256","name":"counter","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ressurect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resurrected","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"enum HolyOnes.SaleState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum HolyOnes.SaleState","name":"_presaleNumber","type":"uint8"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleroot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum HolyOnes.SaleState","name":"_presaleNumber","type":"uint8"}],"name":"startWhitelistSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensInWallet","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252600b81526a546865486f6c794f6e657360a81b60208083019182528351808501909452600384526254484f60e81b90840152815191929162000060916000916200022b565b508051620000769060019060208401906200022b565b505050620000936200008d620001d560201b60201c565b620001d9565b66ec9c58de0a8000600d55600f80546001600160a01b031916732c554b28879d44f254491f32d277dd59aa7379a1179055600a805460ff60a01b19169055611a0a600b556032600c556011805460ff191690556040805160608101825281815290620033806020830139805162000113916012916020909101906200022b565b50600e8054600082905260028101909155606460019091016007027fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd81019190915560327fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fe82015566ec9c58de0a80007fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3ff82015561115c7fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c401909101556200030e565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200023990620002d1565b90600052602060002090601f0160209004810192826200025d5760008555620002a8565b82601f106200027857805160ff1916838001178555620002a8565b82800160010185558215620002a8579182015b82811115620002a85782518255916020019190600101906200028b565b50620002b6929150620002ba565b5090565b5b80821115620002b65760008155600101620002bb565b600181811c90821680620002e657607f821691505b602082108114156200030857634e487b7160e01b600052602260045260246000fd5b50919050565b613062806200031e6000396000f3fe60806040526004361061023b5760003560e01c8063603f4d521161012e578063a035b1fe116100ab578063d5abeb011161006f578063d5abeb01146106a6578063e36b0b37146106bc578063e985e9c5146106d1578063efd0cbf91461071a578063f2fde38b1461072d57600080fd5b8063a035b1fe14610610578063a22cb46514610626578063b88d4fde14610646578063c87b56dd14610666578063cedae23e1461068657600080fd5b80636c0360eb116100f25780636c0360eb1461059357806370a08231146105a8578063715018a6146105c85780638da5cb5b146105dd57806395d89b41146105fb57600080fd5b8063603f4d52146104b157806361c5c935146104df5780636352211e1461050c578063699d47a21461052c5780636bec2c511461057957600080fd5b806323b872dd116101bc5780633ccfd60b116101805780633ccfd60b1461041c57806342842e0e146104315780634f6ccce714610451578063528f5d281461047157806355f804b31461049157600080fd5b806323b872dd1461037c5780632c96f0991461039c5780632f745c59146103bc57806338af3eed146103dc57806339192fd7146103fc57600080fd5b8063095ea7b311610203578063095ea7b3146103085780630c1c972a146103285780630f7309e81461033d57806318160ddd146103525780631e6bdfc01461036757600080fd5b806301f569971461024057806301ffc9a714610269578063061431a81461029957806306fdde03146102ae578063081812fc146102d0575b600080fd5b34801561024c57600080fd5b50610256600c5481565b6040519081526020015b60405180910390f35b34801561027557600080fd5b506102896102843660046128d6565b61074d565b6040519015158152602001610260565b6102ac6102a73660046128f3565b61075e565b005b3480156102ba57600080fd5b506102c3610bdd565b60405161026091906129ca565b3480156102dc57600080fd5b506102f06102eb3660046129dd565b610c6f565b6040516001600160a01b039091168152602001610260565b34801561031457600080fd5b506102ac610323366004612a12565b610d04565b34801561033457600080fd5b506102ac610e1a565b34801561034957600080fd5b506102c3610e9e565b34801561035e57600080fd5b50600854610256565b34801561037357600080fd5b506102ac610f2c565b34801561038857600080fd5b506102ac610397366004612a3c565b610fc8565b3480156103a857600080fd5b506102566103b7366004612a78565b610ff9565b3480156103c857600080fd5b506102566103d7366004612a12565b61103f565b3480156103e857600080fd5b50600f546102f0906001600160a01b031681565b34801561040857600080fd5b506102ac610417366004612a12565b6110d5565b34801561042857600080fd5b506102ac6112cb565b34801561043d57600080fd5b506102ac61044c366004612a3c565b611300565b34801561045d57600080fd5b5061025661046c3660046129dd565b61131b565b34801561047d57600080fd5b506102ac61048c366004612ab3565b6113ae565b34801561049d57600080fd5b506102ac6104ac366004612b5a565b6114ff565b3480156104bd57600080fd5b50600a546104d290600160a01b900460ff1681565b6040516102609190612bb9565b3480156104eb57600080fd5b506104ff6104fa366004612be1565b611540565b6040516102609190612bfc565b34801561051857600080fd5b506102f06105273660046129dd565b6115e2565b34801561053857600080fd5b5061054c6105473660046129dd565b611659565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610260565b34801561058557600080fd5b506011546102899060ff1681565b34801561059f57600080fd5b506102c361169f565b3480156105b457600080fd5b506102566105c3366004612be1565b6116ac565b3480156105d457600080fd5b506102ac611733565b3480156105e957600080fd5b50600a546001600160a01b03166102f0565b34801561060757600080fd5b506102c3611769565b34801561061c57600080fd5b50610256600d5481565b34801561063257600080fd5b506102ac610641366004612c40565b611778565b34801561065257600080fd5b506102ac610661366004612c7c565b611783565b34801561067257600080fd5b506102c36106813660046129dd565b6117b5565b34801561069257600080fd5b506102ac6106a1366004612cf8565b611890565b3480156106b257600080fd5b50610256600b5481565b3480156106c857600080fd5b506102ac611968565b3480156106dd57600080fd5b506102896106ec366004612d14565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102ac6107283660046129dd565b611a33565b34801561073957600080fd5b506102ac610748366004612be1565b611be0565b600061075882611c78565b92915050565b600a54600160a01b900460ff16600181600381111561077f5761077f612ba3565b146107a55760405162461bcd60e51b815260040161079c90612d3e565b60405180910390fd5b600a54600160a01b900460ff16600e8160038111156107c6576107c6612ba3565b815481106107d6576107d6612d7f565b9060005260206000209060070201600301546000801b141561083a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c65726f6f74206e6f742073657420666f722070726573616c650000604482015260640161079c565b8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108b9925083915061087c9050611c9d565b600301546040516bffffffffffffffffffffffff193360601b16602082015260340160405160208183030381529060405280519060200120611ce4565b6108f95760405162461bcd60e51b8152602060048201526011602482015270139bdd081bdb881dda1a5d19481b1a5cdd607a1b604482015260640161079c565b600061090460085490565b90506000610910611c9d565b6005015490506000610920611c9d565b3360009081526006919091016020526040902054905061093e611c9d565b600101548911156109a95760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f74206d696e742074686174206d616e7920746f6b656e7320696e2060448201526e37b732903a3930b739b0b1ba34b7b760891b606482015260840161079c565b6109b1611c9d565b546109bc828b611cfa565b1115610a185760405162461bcd60e51b815260206004820152602560248201527f4578636565647320746865206e756d626572206f662077686974656c697374206044820152646d696e747360d81b606482015260840161079c565b610a20611c9d565b60040154610a2e838b611cfa565b1115610a8c5760405162461bcd60e51b815260206004820152602760248201527f4e6f7420656e6f75676820546f6b656e732072656d61696e696e6720696e20706044820152663932b9b0b6329760c91b606482015260840161079c565b600b54610a99848b611cfa565b1115610af35760405162461bcd60e51b8152602060048201526024808201527f4e6f7420656e6f75676820546f6b656e732072656d61696e696e6720696e207360448201526330b6329760e11b606482015260840161079c565b34610b0a610aff611c9d565b600201548b90611d06565b1115610b515760405162461bcd60e51b8152602060048201526016602482015275496e636f727265637420616d6f756e742073656e742160501b604482015260640161079c565b60005b89811015610bab57610b7a33610b7583610b6f886001611cfa565b90611cfa565b611d12565b610b82611c9d565b6005018054906000610b9383612dab565b91905055508080610ba390612dab565b915050610b54565b50610bb6818a611cfa565b610bbe611c9d565b3360009081526006919091016020526040902055505050505050505050565b606060008054610bec90612dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1890612dc6565b8015610c655780601f10610c3a57610100808354040283529160200191610c65565b820191906000526020600020905b815481529060010190602001808311610c4857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610ce85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161079c565b506000908152600460205260409020546001600160a01b031690565b6000610d0f826115e2565b9050806001600160a01b0316836001600160a01b03161415610d7d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161079c565b336001600160a01b0382161480610d995750610d9981336106ec565b610e0b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161079c565b610e158383611d2c565b505050565b600a546001600160a01b03163314610e445760405162461bcd60e51b815260040161079c90612e01565b6000600a54600160a01b900460ff166003811115610e6457610e64612ba3565b14610e815760405162461bcd60e51b815260040161079c90612e36565b600a80546002919060ff60a01b1916600160a01b835b0217905550565b60128054610eab90612dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed790612dc6565b8015610f245780601f10610ef957610100808354040283529160200191610f24565b820191906000526020600020905b815481529060010190602001808311610f0757829003601f168201915b505050505081565b600a546001600160a01b03163314610f565760405162461bcd60e51b815260040161079c90612e01565b60115460ff1615610fb95760405162461bcd60e51b815260206004820152602760248201527f486f6c79204f6e6573206861766520616c7265616479206265656e20726573756044820152661c9c9958dd195960ca1b606482015260840161079c565b6011805460ff19166001179055565b610fd23382611d9a565b610fee5760405162461bcd60e51b815260040161079c90612e5e565b610e15838383611e91565b6000600e838154811061100e5761100e612d7f565b600091825260208083206001600160a01b038616845260066007909302019190910190526040902054905092915050565b600061104a836116ac565b82106110ac5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161079c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b031633146110ff5760405162461bcd60e51b815260040161079c90612e01565b6000600a54600160a01b900460ff16600381111561111f5761111f612ba3565b146111775760405162461bcd60e51b815260206004820152602260248201527f53616c65206d757374206265206f666620746f207265736572766520746f6b656044820152616e7360f01b606482015260840161079c565b6001600160a01b0382166111e45760405162461bcd60e51b815260206004820152602e60248201527f43616e6e6f74206d696e74207265736572766520746f6b656e7320746f20746860448201526d65206275726e206164647265737360901b606482015260840161079c565b60006111ef60085490565b600b549091506111ff8284611cfa565b111561124d5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206d696e74206d6f7265207468616e206d617820737570706c79604482015260640161079c565b60328211156112955760405162461bcd60e51b815260206004820152601460248201527323b0b9903634b6b4ba10383937ba32b1ba34b7b760611b604482015260640161079c565b60005b828110156112c5576112b384610b7583610b6f866001611cfa565b806112bd81612dab565b915050611298565b50505050565b600f5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050506112fd57600080fd5b50565b610e1583838360405180602001604052806000815250611783565b600061132660085490565b82106113895760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161079c565b6008828154811061139c5761139c612d7f565b90600052602060002001549050919050565b6000600a54600160a01b900460ff1660038111156113ce576113ce612ba3565b146113eb5760405162461bcd60e51b815260040161079c90612e36565b80600181600381111561140057611400612ba3565b1461141d5760405162461bcd60e51b815260040161079c90612d3e565b81600e81600381111561143257611432612ba3565b8154811061144257611442612d7f565b9060005260206000209060070201600301546000801b14156114a65760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c65726f6f74206e6f742073657420666f722070726573616c650000604482015260640161079c565b600a546001600160a01b031633146114d05760405162461bcd60e51b815260040161079c90612e01565b600a805484919060ff60a01b1916600160a01b8360038111156114f5576114f5612ba3565b0217905550505050565b600a546001600160a01b031633146115295760405162461bcd60e51b815260040161079c90612e01565b805161153c906010906020840190612827565b5050565b6060600061154d836116ac565b905060008167ffffffffffffffff81111561156a5761156a612ace565b604051908082528060200260200182016040528015611593578160200160208202803683370190505b50905060005b828110156115da576115ab858261103f565b8282815181106115bd576115bd612d7f565b6020908102919091010152806115d281612dab565b915050611599565b509392505050565b6000818152600260205260408120546001600160a01b0316806107585760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161079c565b600e818154811061166957600080fd5b60009182526020909120600790910201805460018201546002830154600384015460048501546005909501549395509193909286565b60108054610eab90612dc6565b60006001600160a01b0382166117175760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161079c565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461175d5760405162461bcd60e51b815260040161079c90612e01565b6117676000612038565b565b606060018054610bec90612dc6565b61153c33838361208a565b61178d3383611d9a565b6117a95760405162461bcd60e51b815260040161079c90612e5e565b6112c584848484612159565b6000818152600260205260409020546060906001600160a01b03166118345760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161079c565b600061183e61218c565b9050600081511161185e5760405180602001604052806000815250611889565b806118688461219b565b604051602001611879929190612eaf565b6040516020818303038152906040525b9392505050565b6000600a54600160a01b900460ff1660038111156118b0576118b0612ba3565b146118cd5760405162461bcd60e51b815260040161079c90612e36565b8160018160038111156118e2576118e2612ba3565b146118ff5760405162461bcd60e51b815260040161079c90612d3e565b600a546001600160a01b031633146119295760405162461bcd60e51b815260040161079c90612e01565b81600e84600381111561193e5761193e612ba3565b8154811061194e5761194e612d7f565b906000526020600020906007020160030181905550505050565b6001600a54600160a01b900460ff16600381111561198857611988612ba3565b14806119b157506002600a54600160a01b900460ff1660038111156119af576119af612ba3565b145b6119ef5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b604482015260640161079c565b600a546001600160a01b03163314611a195760405162461bcd60e51b815260040161079c90612e01565b600a80546000919060ff60a01b1916600160a01b83610e97565b6002600a54600160a01b900460ff166003811115611a5357611a53612ba3565b14611a995760405162461bcd60e51b81526020600482015260166024820152755075626c69632053616c65206e6f742061637469766560501b604482015260640161079c565b6000611aa460085490565b9050600c54821115611af85760405162461bcd60e51b815260206004820181905260248201527f4d696e74696e6720746f6f206d616e7920746f6b656e73206174206f6e636521604482015260640161079c565b600b54611b058284611cfa565b1115611b535760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f75676820546f6b656e732072656d61696e696e672e00000000604482015260640161079c565b34611b69600d5484611d0690919063ffffffff16565b1115611bb05760405162461bcd60e51b8152602060048201526016602482015275496e636f727265637420616d6f756e742073656e742160501b604482015260640161079c565b60005b82811015610e1557611bce33610b7583610b6f866001611cfa565b80611bd881612dab565b915050611bb3565b600a546001600160a01b03163314611c0a5760405162461bcd60e51b815260040161079c90612e01565b6001600160a01b038116611c6f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161079c565b6112fd81612038565b60006001600160e01b0319821663780e9d6360e01b1480610758575061075882612299565b600a54600090600e90600160a01b900460ff166003811115611cc157611cc1612ba3565b81548110611cd157611cd1612d7f565b9060005260206000209060070201905090565b600082611cf185846122e9565b14949350505050565b60006118898284612ede565b60006118898284612ef6565b61153c828260405180602001604052806000815250612355565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d61826115e2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611e135760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161079c565b6000611e1e836115e2565b9050806001600160a01b0316846001600160a01b03161480611e595750836001600160a01b0316611e4e84610c6f565b6001600160a01b0316145b80611e8957506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ea4826115e2565b6001600160a01b031614611f085760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161079c565b6001600160a01b038216611f6a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161079c565b611f75838383612388565b611f80600082611d2c565b6001600160a01b0383166000908152600360205260408120805460019290611fa9908490612f15565b90915550506001600160a01b0382166000908152600360205260408120805460019290611fd7908490612ede565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156120ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161079c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612164848484611e91565b61217084848484612393565b6112c55760405162461bcd60e51b815260040161079c90612f2c565b606060108054610bec90612dc6565b6060816121bf5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121e957806121d381612dab565b91506121e29050600a83612f94565b91506121c3565b60008167ffffffffffffffff81111561220457612204612ace565b6040519080825280601f01601f19166020018201604052801561222e576020820181803683370190505b5090505b8415611e8957612243600183612f15565b9150612250600a86612fa8565b61225b906030612ede565b60f81b81838151811061227057612270612d7f565b60200101906001600160f81b031916908160001a905350612292600a86612f94565b9450612232565b60006001600160e01b031982166380ac58cd60e01b14806122ca57506001600160e01b03198216635b5e139f60e01b145b8061075857506301ffc9a760e01b6001600160e01b0319831614610758565b600081815b84518110156115da57600085828151811061230b5761230b612d7f565b602002602001015190508083116123315760008381526020829052604090209250612342565b600081815260208490526040902092505b508061234d81612dab565b9150506122ee565b61235f8383612491565b61236c6000848484612393565b610e155760405162461bcd60e51b815260040161079c90612f2c565b610e158383836125df565b60006001600160a01b0384163b1561248657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906123d7903390899088908890600401612fbc565b6020604051808303816000875af1925050508015612412575060408051601f3d908101601f1916820190925261240f91810190612ff9565b60015b61246c573d808015612440576040519150601f19603f3d011682016040523d82523d6000602084013e612445565b606091505b5080516124645760405162461bcd60e51b815260040161079c90612f2c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e89565b506001949350505050565b6001600160a01b0382166124e75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161079c565b6000818152600260205260409020546001600160a01b03161561254c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161079c565b61255860008383612388565b6001600160a01b0382166000908152600360205260408120805460019290612581908490612ede565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b03831661263a5761263581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61265d565b816001600160a01b0316836001600160a01b03161461265d5761265d8382612697565b6001600160a01b03821661267457610e1581612734565b826001600160a01b0316826001600160a01b031614610e1557610e1582826127e3565b600060016126a4846116ac565b6126ae9190612f15565b600083815260076020526040902054909150808214612701576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061274690600190612f15565b6000838152600960205260408120546008805493945090928490811061276e5761276e612d7f565b90600052602060002001549050806008838154811061278f5761278f612d7f565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806127c7576127c7613016565b6001900381819060005260206000200160009055905550505050565b60006127ee836116ac565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461283390612dc6565b90600052602060002090601f016020900481019282612855576000855561289b565b82601f1061286e57805160ff191683800117855561289b565b8280016001018555821561289b579182015b8281111561289b578251825591602001919060010190612880565b506128a79291506128ab565b5090565b5b808211156128a757600081556001016128ac565b6001600160e01b0319811681146112fd57600080fd5b6000602082840312156128e857600080fd5b8135611889816128c0565b60008060006040848603121561290857600080fd5b83359250602084013567ffffffffffffffff8082111561292757600080fd5b818601915086601f83011261293b57600080fd5b81358181111561294a57600080fd5b8760208260051b850101111561295f57600080fd5b6020830194508093505050509250925092565b60005b8381101561298d578181015183820152602001612975565b838111156112c55750506000910152565b600081518084526129b6816020860160208601612972565b601f01601f19169290920160200192915050565b602081526000611889602083018461299e565b6000602082840312156129ef57600080fd5b5035919050565b80356001600160a01b0381168114612a0d57600080fd5b919050565b60008060408385031215612a2557600080fd5b612a2e836129f6565b946020939093013593505050565b600080600060608486031215612a5157600080fd5b612a5a846129f6565b9250612a68602085016129f6565b9150604084013590509250925092565b60008060408385031215612a8b57600080fd5b82359150612a9b602084016129f6565b90509250929050565b803560048110612a0d57600080fd5b600060208284031215612ac557600080fd5b61188982612aa4565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612aff57612aff612ace565b604051601f8501601f19908116603f01168101908282118183101715612b2757612b27612ace565b81604052809350858152868686011115612b4057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612b6c57600080fd5b813567ffffffffffffffff811115612b8357600080fd5b8201601f81018413612b9457600080fd5b611e8984823560208401612ae4565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612bdb57634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215612bf357600080fd5b611889826129f6565b6020808252825182820181905260009190848201906040850190845b81811015612c3457835183529284019291840191600101612c18565b50909695505050505050565b60008060408385031215612c5357600080fd5b612c5c836129f6565b915060208301358015158114612c7157600080fd5b809150509250929050565b60008060008060808587031215612c9257600080fd5b612c9b856129f6565b9350612ca9602086016129f6565b925060408501359150606085013567ffffffffffffffff811115612ccc57600080fd5b8501601f81018713612cdd57600080fd5b612cec87823560208401612ae4565b91505092959194509250565b60008060408385031215612d0b57600080fd5b612a2e83612aa4565b60008060408385031215612d2757600080fd5b612d30836129f6565b9150612a9b602084016129f6565b60208082526021908201527f506172616d65746572206d75737420626520612076616c69642070726573616c6040820152606560f81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612dbf57612dbf612d95565b5060010190565b600181811c90821680612dda57607f821691505b60208210811415612dfb57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d53616c652069732061637469766560901b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008351612ec1818460208801612972565b835190830190612ed5818360208801612972565b01949350505050565b60008219821115612ef157612ef1612d95565b500190565b6000816000190483118215151615612f1057612f10612d95565b500290565b600082821015612f2757612f27612d95565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612fa357612fa3612f7e565b500490565b600082612fb757612fb7612f7e565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612fef9083018461299e565b9695505050505050565b60006020828403121561300b57600080fd5b8151611889816128c0565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220e9eaee746eae094621fa83367072e7ff7bf5e79fb73a383838dc92ecccd3ff7d64736f6c634300080c003330666135303632396531356230303164333738393237316261383430626265326532363736343638346232326631653430326136613131306535303262323132
Deployed Bytecode
0x60806040526004361061023b5760003560e01c8063603f4d521161012e578063a035b1fe116100ab578063d5abeb011161006f578063d5abeb01146106a6578063e36b0b37146106bc578063e985e9c5146106d1578063efd0cbf91461071a578063f2fde38b1461072d57600080fd5b8063a035b1fe14610610578063a22cb46514610626578063b88d4fde14610646578063c87b56dd14610666578063cedae23e1461068657600080fd5b80636c0360eb116100f25780636c0360eb1461059357806370a08231146105a8578063715018a6146105c85780638da5cb5b146105dd57806395d89b41146105fb57600080fd5b8063603f4d52146104b157806361c5c935146104df5780636352211e1461050c578063699d47a21461052c5780636bec2c511461057957600080fd5b806323b872dd116101bc5780633ccfd60b116101805780633ccfd60b1461041c57806342842e0e146104315780634f6ccce714610451578063528f5d281461047157806355f804b31461049157600080fd5b806323b872dd1461037c5780632c96f0991461039c5780632f745c59146103bc57806338af3eed146103dc57806339192fd7146103fc57600080fd5b8063095ea7b311610203578063095ea7b3146103085780630c1c972a146103285780630f7309e81461033d57806318160ddd146103525780631e6bdfc01461036757600080fd5b806301f569971461024057806301ffc9a714610269578063061431a81461029957806306fdde03146102ae578063081812fc146102d0575b600080fd5b34801561024c57600080fd5b50610256600c5481565b6040519081526020015b60405180910390f35b34801561027557600080fd5b506102896102843660046128d6565b61074d565b6040519015158152602001610260565b6102ac6102a73660046128f3565b61075e565b005b3480156102ba57600080fd5b506102c3610bdd565b60405161026091906129ca565b3480156102dc57600080fd5b506102f06102eb3660046129dd565b610c6f565b6040516001600160a01b039091168152602001610260565b34801561031457600080fd5b506102ac610323366004612a12565b610d04565b34801561033457600080fd5b506102ac610e1a565b34801561034957600080fd5b506102c3610e9e565b34801561035e57600080fd5b50600854610256565b34801561037357600080fd5b506102ac610f2c565b34801561038857600080fd5b506102ac610397366004612a3c565b610fc8565b3480156103a857600080fd5b506102566103b7366004612a78565b610ff9565b3480156103c857600080fd5b506102566103d7366004612a12565b61103f565b3480156103e857600080fd5b50600f546102f0906001600160a01b031681565b34801561040857600080fd5b506102ac610417366004612a12565b6110d5565b34801561042857600080fd5b506102ac6112cb565b34801561043d57600080fd5b506102ac61044c366004612a3c565b611300565b34801561045d57600080fd5b5061025661046c3660046129dd565b61131b565b34801561047d57600080fd5b506102ac61048c366004612ab3565b6113ae565b34801561049d57600080fd5b506102ac6104ac366004612b5a565b6114ff565b3480156104bd57600080fd5b50600a546104d290600160a01b900460ff1681565b6040516102609190612bb9565b3480156104eb57600080fd5b506104ff6104fa366004612be1565b611540565b6040516102609190612bfc565b34801561051857600080fd5b506102f06105273660046129dd565b6115e2565b34801561053857600080fd5b5061054c6105473660046129dd565b611659565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610260565b34801561058557600080fd5b506011546102899060ff1681565b34801561059f57600080fd5b506102c361169f565b3480156105b457600080fd5b506102566105c3366004612be1565b6116ac565b3480156105d457600080fd5b506102ac611733565b3480156105e957600080fd5b50600a546001600160a01b03166102f0565b34801561060757600080fd5b506102c3611769565b34801561061c57600080fd5b50610256600d5481565b34801561063257600080fd5b506102ac610641366004612c40565b611778565b34801561065257600080fd5b506102ac610661366004612c7c565b611783565b34801561067257600080fd5b506102c36106813660046129dd565b6117b5565b34801561069257600080fd5b506102ac6106a1366004612cf8565b611890565b3480156106b257600080fd5b50610256600b5481565b3480156106c857600080fd5b506102ac611968565b3480156106dd57600080fd5b506102896106ec366004612d14565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102ac6107283660046129dd565b611a33565b34801561073957600080fd5b506102ac610748366004612be1565b611be0565b600061075882611c78565b92915050565b600a54600160a01b900460ff16600181600381111561077f5761077f612ba3565b146107a55760405162461bcd60e51b815260040161079c90612d3e565b60405180910390fd5b600a54600160a01b900460ff16600e8160038111156107c6576107c6612ba3565b815481106107d6576107d6612d7f565b9060005260206000209060070201600301546000801b141561083a5760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c65726f6f74206e6f742073657420666f722070726573616c650000604482015260640161079c565b8383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506108b9925083915061087c9050611c9d565b600301546040516bffffffffffffffffffffffff193360601b16602082015260340160405160208183030381529060405280519060200120611ce4565b6108f95760405162461bcd60e51b8152602060048201526011602482015270139bdd081bdb881dda1a5d19481b1a5cdd607a1b604482015260640161079c565b600061090460085490565b90506000610910611c9d565b6005015490506000610920611c9d565b3360009081526006919091016020526040902054905061093e611c9d565b600101548911156109a95760405162461bcd60e51b815260206004820152602f60248201527f43616e6e6f74206d696e742074686174206d616e7920746f6b656e7320696e2060448201526e37b732903a3930b739b0b1ba34b7b760891b606482015260840161079c565b6109b1611c9d565b546109bc828b611cfa565b1115610a185760405162461bcd60e51b815260206004820152602560248201527f4578636565647320746865206e756d626572206f662077686974656c697374206044820152646d696e747360d81b606482015260840161079c565b610a20611c9d565b60040154610a2e838b611cfa565b1115610a8c5760405162461bcd60e51b815260206004820152602760248201527f4e6f7420656e6f75676820546f6b656e732072656d61696e696e6720696e20706044820152663932b9b0b6329760c91b606482015260840161079c565b600b54610a99848b611cfa565b1115610af35760405162461bcd60e51b8152602060048201526024808201527f4e6f7420656e6f75676820546f6b656e732072656d61696e696e6720696e207360448201526330b6329760e11b606482015260840161079c565b34610b0a610aff611c9d565b600201548b90611d06565b1115610b515760405162461bcd60e51b8152602060048201526016602482015275496e636f727265637420616d6f756e742073656e742160501b604482015260640161079c565b60005b89811015610bab57610b7a33610b7583610b6f886001611cfa565b90611cfa565b611d12565b610b82611c9d565b6005018054906000610b9383612dab565b91905055508080610ba390612dab565b915050610b54565b50610bb6818a611cfa565b610bbe611c9d565b3360009081526006919091016020526040902055505050505050505050565b606060008054610bec90612dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1890612dc6565b8015610c655780601f10610c3a57610100808354040283529160200191610c65565b820191906000526020600020905b815481529060010190602001808311610c4857829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610ce85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161079c565b506000908152600460205260409020546001600160a01b031690565b6000610d0f826115e2565b9050806001600160a01b0316836001600160a01b03161415610d7d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161079c565b336001600160a01b0382161480610d995750610d9981336106ec565b610e0b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161079c565b610e158383611d2c565b505050565b600a546001600160a01b03163314610e445760405162461bcd60e51b815260040161079c90612e01565b6000600a54600160a01b900460ff166003811115610e6457610e64612ba3565b14610e815760405162461bcd60e51b815260040161079c90612e36565b600a80546002919060ff60a01b1916600160a01b835b0217905550565b60128054610eab90612dc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed790612dc6565b8015610f245780601f10610ef957610100808354040283529160200191610f24565b820191906000526020600020905b815481529060010190602001808311610f0757829003601f168201915b505050505081565b600a546001600160a01b03163314610f565760405162461bcd60e51b815260040161079c90612e01565b60115460ff1615610fb95760405162461bcd60e51b815260206004820152602760248201527f486f6c79204f6e6573206861766520616c7265616479206265656e20726573756044820152661c9c9958dd195960ca1b606482015260840161079c565b6011805460ff19166001179055565b610fd23382611d9a565b610fee5760405162461bcd60e51b815260040161079c90612e5e565b610e15838383611e91565b6000600e838154811061100e5761100e612d7f565b600091825260208083206001600160a01b038616845260066007909302019190910190526040902054905092915050565b600061104a836116ac565b82106110ac5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161079c565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b031633146110ff5760405162461bcd60e51b815260040161079c90612e01565b6000600a54600160a01b900460ff16600381111561111f5761111f612ba3565b146111775760405162461bcd60e51b815260206004820152602260248201527f53616c65206d757374206265206f666620746f207265736572766520746f6b656044820152616e7360f01b606482015260840161079c565b6001600160a01b0382166111e45760405162461bcd60e51b815260206004820152602e60248201527f43616e6e6f74206d696e74207265736572766520746f6b656e7320746f20746860448201526d65206275726e206164647265737360901b606482015260840161079c565b60006111ef60085490565b600b549091506111ff8284611cfa565b111561124d5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f74206d696e74206d6f7265207468616e206d617820737570706c79604482015260640161079c565b60328211156112955760405162461bcd60e51b815260206004820152601460248201527323b0b9903634b6b4ba10383937ba32b1ba34b7b760611b604482015260640161079c565b60005b828110156112c5576112b384610b7583610b6f866001611cfa565b806112bd81612dab565b915050611298565b50505050565b600f5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050506112fd57600080fd5b50565b610e1583838360405180602001604052806000815250611783565b600061132660085490565b82106113895760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161079c565b6008828154811061139c5761139c612d7f565b90600052602060002001549050919050565b6000600a54600160a01b900460ff1660038111156113ce576113ce612ba3565b146113eb5760405162461bcd60e51b815260040161079c90612e36565b80600181600381111561140057611400612ba3565b1461141d5760405162461bcd60e51b815260040161079c90612d3e565b81600e81600381111561143257611432612ba3565b8154811061144257611442612d7f565b9060005260206000209060070201600301546000801b14156114a65760405162461bcd60e51b815260206004820152601e60248201527f4d65726b6c65726f6f74206e6f742073657420666f722070726573616c650000604482015260640161079c565b600a546001600160a01b031633146114d05760405162461bcd60e51b815260040161079c90612e01565b600a805484919060ff60a01b1916600160a01b8360038111156114f5576114f5612ba3565b0217905550505050565b600a546001600160a01b031633146115295760405162461bcd60e51b815260040161079c90612e01565b805161153c906010906020840190612827565b5050565b6060600061154d836116ac565b905060008167ffffffffffffffff81111561156a5761156a612ace565b604051908082528060200260200182016040528015611593578160200160208202803683370190505b50905060005b828110156115da576115ab858261103f565b8282815181106115bd576115bd612d7f565b6020908102919091010152806115d281612dab565b915050611599565b509392505050565b6000818152600260205260408120546001600160a01b0316806107585760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161079c565b600e818154811061166957600080fd5b60009182526020909120600790910201805460018201546002830154600384015460048501546005909501549395509193909286565b60108054610eab90612dc6565b60006001600160a01b0382166117175760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161079c565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461175d5760405162461bcd60e51b815260040161079c90612e01565b6117676000612038565b565b606060018054610bec90612dc6565b61153c33838361208a565b61178d3383611d9a565b6117a95760405162461bcd60e51b815260040161079c90612e5e565b6112c584848484612159565b6000818152600260205260409020546060906001600160a01b03166118345760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161079c565b600061183e61218c565b9050600081511161185e5760405180602001604052806000815250611889565b806118688461219b565b604051602001611879929190612eaf565b6040516020818303038152906040525b9392505050565b6000600a54600160a01b900460ff1660038111156118b0576118b0612ba3565b146118cd5760405162461bcd60e51b815260040161079c90612e36565b8160018160038111156118e2576118e2612ba3565b146118ff5760405162461bcd60e51b815260040161079c90612d3e565b600a546001600160a01b031633146119295760405162461bcd60e51b815260040161079c90612e01565b81600e84600381111561193e5761193e612ba3565b8154811061194e5761194e612d7f565b906000526020600020906007020160030181905550505050565b6001600a54600160a01b900460ff16600381111561198857611988612ba3565b14806119b157506002600a54600160a01b900460ff1660038111156119af576119af612ba3565b145b6119ef5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b604482015260640161079c565b600a546001600160a01b03163314611a195760405162461bcd60e51b815260040161079c90612e01565b600a80546000919060ff60a01b1916600160a01b83610e97565b6002600a54600160a01b900460ff166003811115611a5357611a53612ba3565b14611a995760405162461bcd60e51b81526020600482015260166024820152755075626c69632053616c65206e6f742061637469766560501b604482015260640161079c565b6000611aa460085490565b9050600c54821115611af85760405162461bcd60e51b815260206004820181905260248201527f4d696e74696e6720746f6f206d616e7920746f6b656e73206174206f6e636521604482015260640161079c565b600b54611b058284611cfa565b1115611b535760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f75676820546f6b656e732072656d61696e696e672e00000000604482015260640161079c565b34611b69600d5484611d0690919063ffffffff16565b1115611bb05760405162461bcd60e51b8152602060048201526016602482015275496e636f727265637420616d6f756e742073656e742160501b604482015260640161079c565b60005b82811015610e1557611bce33610b7583610b6f866001611cfa565b80611bd881612dab565b915050611bb3565b600a546001600160a01b03163314611c0a5760405162461bcd60e51b815260040161079c90612e01565b6001600160a01b038116611c6f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161079c565b6112fd81612038565b60006001600160e01b0319821663780e9d6360e01b1480610758575061075882612299565b600a54600090600e90600160a01b900460ff166003811115611cc157611cc1612ba3565b81548110611cd157611cd1612d7f565b9060005260206000209060070201905090565b600082611cf185846122e9565b14949350505050565b60006118898284612ede565b60006118898284612ef6565b61153c828260405180602001604052806000815250612355565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611d61826115e2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611e135760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161079c565b6000611e1e836115e2565b9050806001600160a01b0316846001600160a01b03161480611e595750836001600160a01b0316611e4e84610c6f565b6001600160a01b0316145b80611e8957506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611ea4826115e2565b6001600160a01b031614611f085760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161079c565b6001600160a01b038216611f6a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161079c565b611f75838383612388565b611f80600082611d2c565b6001600160a01b0383166000908152600360205260408120805460019290611fa9908490612f15565b90915550506001600160a01b0382166000908152600360205260408120805460019290611fd7908490612ede565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156120ec5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161079c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612164848484611e91565b61217084848484612393565b6112c55760405162461bcd60e51b815260040161079c90612f2c565b606060108054610bec90612dc6565b6060816121bf5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121e957806121d381612dab565b91506121e29050600a83612f94565b91506121c3565b60008167ffffffffffffffff81111561220457612204612ace565b6040519080825280601f01601f19166020018201604052801561222e576020820181803683370190505b5090505b8415611e8957612243600183612f15565b9150612250600a86612fa8565b61225b906030612ede565b60f81b81838151811061227057612270612d7f565b60200101906001600160f81b031916908160001a905350612292600a86612f94565b9450612232565b60006001600160e01b031982166380ac58cd60e01b14806122ca57506001600160e01b03198216635b5e139f60e01b145b8061075857506301ffc9a760e01b6001600160e01b0319831614610758565b600081815b84518110156115da57600085828151811061230b5761230b612d7f565b602002602001015190508083116123315760008381526020829052604090209250612342565b600081815260208490526040902092505b508061234d81612dab565b9150506122ee565b61235f8383612491565b61236c6000848484612393565b610e155760405162461bcd60e51b815260040161079c90612f2c565b610e158383836125df565b60006001600160a01b0384163b1561248657604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906123d7903390899088908890600401612fbc565b6020604051808303816000875af1925050508015612412575060408051601f3d908101601f1916820190925261240f91810190612ff9565b60015b61246c573d808015612440576040519150601f19603f3d011682016040523d82523d6000602084013e612445565b606091505b5080516124645760405162461bcd60e51b815260040161079c90612f2c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611e89565b506001949350505050565b6001600160a01b0382166124e75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161079c565b6000818152600260205260409020546001600160a01b03161561254c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161079c565b61255860008383612388565b6001600160a01b0382166000908152600360205260408120805460019290612581908490612ede565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b03831661263a5761263581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61265d565b816001600160a01b0316836001600160a01b03161461265d5761265d8382612697565b6001600160a01b03821661267457610e1581612734565b826001600160a01b0316826001600160a01b031614610e1557610e1582826127e3565b600060016126a4846116ac565b6126ae9190612f15565b600083815260076020526040902054909150808214612701576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061274690600190612f15565b6000838152600960205260408120546008805493945090928490811061276e5761276e612d7f565b90600052602060002001549050806008838154811061278f5761278f612d7f565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806127c7576127c7613016565b6001900381819060005260206000200160009055905550505050565b60006127ee836116ac565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b82805461283390612dc6565b90600052602060002090601f016020900481019282612855576000855561289b565b82601f1061286e57805160ff191683800117855561289b565b8280016001018555821561289b579182015b8281111561289b578251825591602001919060010190612880565b506128a79291506128ab565b5090565b5b808211156128a757600081556001016128ac565b6001600160e01b0319811681146112fd57600080fd5b6000602082840312156128e857600080fd5b8135611889816128c0565b60008060006040848603121561290857600080fd5b83359250602084013567ffffffffffffffff8082111561292757600080fd5b818601915086601f83011261293b57600080fd5b81358181111561294a57600080fd5b8760208260051b850101111561295f57600080fd5b6020830194508093505050509250925092565b60005b8381101561298d578181015183820152602001612975565b838111156112c55750506000910152565b600081518084526129b6816020860160208601612972565b601f01601f19169290920160200192915050565b602081526000611889602083018461299e565b6000602082840312156129ef57600080fd5b5035919050565b80356001600160a01b0381168114612a0d57600080fd5b919050565b60008060408385031215612a2557600080fd5b612a2e836129f6565b946020939093013593505050565b600080600060608486031215612a5157600080fd5b612a5a846129f6565b9250612a68602085016129f6565b9150604084013590509250925092565b60008060408385031215612a8b57600080fd5b82359150612a9b602084016129f6565b90509250929050565b803560048110612a0d57600080fd5b600060208284031215612ac557600080fd5b61188982612aa4565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612aff57612aff612ace565b604051601f8501601f19908116603f01168101908282118183101715612b2757612b27612ace565b81604052809350858152868686011115612b4057600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612b6c57600080fd5b813567ffffffffffffffff811115612b8357600080fd5b8201601f81018413612b9457600080fd5b611e8984823560208401612ae4565b634e487b7160e01b600052602160045260246000fd5b6020810160048310612bdb57634e487b7160e01b600052602160045260246000fd5b91905290565b600060208284031215612bf357600080fd5b611889826129f6565b6020808252825182820181905260009190848201906040850190845b81811015612c3457835183529284019291840191600101612c18565b50909695505050505050565b60008060408385031215612c5357600080fd5b612c5c836129f6565b915060208301358015158114612c7157600080fd5b809150509250929050565b60008060008060808587031215612c9257600080fd5b612c9b856129f6565b9350612ca9602086016129f6565b925060408501359150606085013567ffffffffffffffff811115612ccc57600080fd5b8501601f81018713612cdd57600080fd5b612cec87823560208401612ae4565b91505092959194509250565b60008060408385031215612d0b57600080fd5b612a2e83612aa4565b60008060408385031215612d2757600080fd5b612d30836129f6565b9150612a9b602084016129f6565b60208082526021908201527f506172616d65746572206d75737420626520612076616c69642070726573616c6040820152606560f81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612dbf57612dbf612d95565b5060010190565b600181811c90821680612dda57607f821691505b60208210811415612dfb57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600e908201526d53616c652069732061637469766560901b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60008351612ec1818460208801612972565b835190830190612ed5818360208801612972565b01949350505050565b60008219821115612ef157612ef1612d95565b500190565b6000816000190483118215151615612f1057612f10612d95565b500290565b600082821015612f2757612f27612d95565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612fa357612fa3612f7e565b500490565b600082612fb757612fb7612f7e565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612fef9083018461299e565b9695505050505050565b60006020828403121561300b57600080fd5b8151611889816128c0565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220e9eaee746eae094621fa83367072e7ff7bf5e79fb73a383838dc92ecccd3ff7d64736f6c634300080c0033
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.