ERC-721
Overview
Max Total Supply
462 OKLApe
Holders
122
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 OKLApeLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
OKLetsApe
Compiler Version
v0.8.4+commit.c7e474f2
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.4; import '@openzeppelin/contracts/token/ERC721/ERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import './interfaces/IERC721Helpers.sol'; import './utils/Counters.sol'; /** * * ok.lets.ape. NFT contract * */ contract OKLetsApe is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using Counters for Counters.Counter; // Token id counter Counters.Counter private _tokenIds; // Sale round counters Counters.Counter public _preSaleRound; Counters.Counter public _publicSaleRound; // Mints per sale round counter Counters.Counter public _tokensMintedPerSaleRound; // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ // Payment address address private paymentAddress; // Royalties address address private royaltyAddress; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = 'ok.lets.ape.'; string public constant TOKEN_SYMBOL = 'OKLApe'; uint256 public constant TOTAL_TOKENS = 10000; // Mint cost and max per wallet uint256 public mintCost = 0.0542069 ether; // Mint cost contract address public mintCostContract; // Max wallet amount uint256 public maxWalletAmount = 10; // Amount of tokens to mint before automatically stopping public sale uint256 public maxMintsPerSaleRound = 1000; // Pre sale/Public sale active bool public preSaleActive; bool public publicSaleActive; // Presale whitelist mapping(address => bool) public presaleWhitelist; // Authorized addresses mapping(address => bool) public authorizedAddresses; //-- Events --// event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPreSaleActive() { require(preSaleActive, 'Pre sale is not active'); _; } // Public sale active modifier modifier whenPublicSaleActive() { require(publicSaleActive, 'Public sale is not active'); _; } // Owner or public sale active modifier modifier whenOwnerOrSaleActive() { require( owner() == _msgSender() || preSaleActive || publicSaleActive, 'Sale is not active' ); _; } // Owner or authorized addresses modifier modifier whenOwnerOrAuthorizedAddress() { require( owner() == _msgSender() || authorizedAddresses[_msgSender()], 'Not authorized' ); _; } // -- Constructor --// constructor(string memory _baseTokenURI, uint8 _counterType) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { baseTokenURI = _baseTokenURI; paymentAddress = owner(); royaltyAddress = owner(); _tokenIds.setType(_counterType); } // -- External Functions -- // // Start pre sale function startPreSale() external onlyOwner { _preSaleRound.increment(); _tokensMintedPerSaleRound.reset(); preSaleActive = true; publicSaleActive = false; } // End pre sale function endPreSale() external onlyOwner { preSaleActive = false; publicSaleActive = false; } // Start public sale function startPublicSale() external onlyOwner { _publicSaleRound.increment(); _tokensMintedPerSaleRound.reset(); preSaleActive = false; publicSaleActive = true; } // End public sale function endPublicSale() external onlyOwner { preSaleActive = false; publicSaleActive = false; } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { return (royaltyAddress, (_salePrice.mul(royaltyBasisPoints)).div(10000)); } // Adds multiple addresses to whitelist function addToPresaleWhitelist(address[] memory _addresses) external onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { address _address = _addresses[i]; presaleWhitelist[_address] = true; } } // Removes multiple addresses from whitelist function removeFromPresaleWhitelist(address[] memory _addresses) external onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { address _address = _addresses[i]; presaleWhitelist[_address] = false; } } // Mint token - requires amount function mint(uint256 _amount) external payable whenOwnerOrSaleActive { require(_amount > 0, 'Must mint at least one'); // Check there enough mints left to mint require(_amount <= getMintsLeft(), 'Minting would exceed max supply'); // Check there are mints left per sale round require( _amount <= getMintsLeftPerSaleRound(), 'Minting would exceed max mint amount per sale round' ); // Set cost to mint uint256 costToMint = 0; bool isOwner = owner() == _msgSender(); if (!isOwner) { // If pre sale is active, make sure user is on whitelist if (preSaleActive) { require(presaleWhitelist[_msgSender()], 'Must be on whitelist'); } // Set cost to mint costToMint = getMintCost(_msgSender()) * _amount; // Get current address total balance uint256 currentWalletAmount = super.balanceOf(_msgSender()); // Check current token amount and mint amount is not more than max wallet amount require( currentWalletAmount.add(_amount) <= maxWalletAmount, 'Requested amount exceeds maximum mint amount per wallet' ); } // Check cost to mint, and if enough ETH is passed to mint require(costToMint <= msg.value, 'ETH amount sent is not correct'); for (uint256 i = 0; i < _amount; i++) { // Increment token id _tokenIds.increment(); // Safe mint _safeMint(_msgSender(), _tokenIds.current()); // Increment tokens minted per sale round _tokensMintedPerSaleRound.increment(); } // Send mint cost to payment address Address.sendValue(payable(paymentAddress), costToMint); // Return unused value if (msg.value > costToMint) { Address.sendValue(payable(_msgSender()), msg.value.sub(costToMint)); } // If tokens minted per sale round hits the max mints per sale round, end pre/public sale if (_tokensMintedPerSaleRound.current() >= maxMintsPerSaleRound) { preSaleActive = false; publicSaleActive = false; } } // Custom mint function - requires token id and reciever address // Mint or transfer token id - Used for cross chain bridging function customMint(uint256 _tokenId, address _reciever) external whenOwnerOrAuthorizedAddress { require(!publicSaleActive && !preSaleActive, 'Sales must be inactive'); require( _tokenId > 0 && _tokenId <= TOTAL_TOKENS, 'Must pass valid token id' ); if (_exists(_tokenId)) { // If token exists, make sure token owner is contract owner require(owner() == ownerOf(_tokenId), 'Token is already owned'); // Transfer from contract owner to reciever safeTransferFrom(owner(), _reciever, _tokenId); } else { // Safe mint _safeMint(_reciever, _tokenId); } } // Custom burn function - required token id // Transfer token id to contract owner - used for cross chain bridging function customBurn(uint256 _tokenId) external whenOwnerOrAuthorizedAddress { require(!publicSaleActive && !preSaleActive, 'Sales must be inactive'); require( _tokenId > 0 && _tokenId <= TOTAL_TOKENS, 'Must pass valid token id' ); require(_exists(_tokenId), 'Nonexistent token'); // Transfer from token owner to contract owner safeTransferFrom(ownerOf(_tokenId), owner(), _tokenId); } // Adds multiple addresses to authorized addresses function addToAuthorizedAddresses(address[] memory _addresses) external onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { address _address = _addresses[i]; authorizedAddresses[_address] = true; } } // Removes multiple addresses from authorized addresses function removeFromAuthorizedAddresses(address[] memory _addresses) external onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { address _address = _addresses[i]; authorizedAddresses[_address] = false; } } // Set mint cost function setMintCost(uint256 _cost) external onlyOwner { mintCost = _cost; } // Set mint cost contract function setERC721HelperContract(address _contract) external onlyOwner { if (_contract != address(0)) { IERC721Helpers _contCheck = IERC721Helpers(_contract); // allow setting to zero address to effectively turn off logic require( _contCheck.getMintCost(_msgSender()) == 0 || _contCheck.getMintCost(_msgSender()) > 0, 'Contract does not implement interface' ); } mintCostContract = _contract; } // Set max wallet amount function setMaxWalletAmount(uint256 _amount) external onlyOwner { maxWalletAmount = _amount; } // Set max mints per sale round amount function setMaxMintsPerSaleRound(uint256 _amount) external onlyOwner { maxMintsPerSaleRound = _amount; } // Reset tokens minted per sale round function resetTokensMintedPerSaleRound() external onlyOwner { _tokensMintedPerSaleRound.reset(); } // Reset pre sale rounds function resetPreSaleRounds() external onlyOwner { _preSaleRound.reset(); } // Reset public sale rounds function resetPublicSaleRounds() external onlyOwner { _publicSaleRound.reset(); } // Set payment address function setPaymentAddress(address _address) external onlyOwner { paymentAddress = _address; } // Set royalty wallet address function setRoyaltyAddress(address _address) external onlyOwner { royaltyAddress = _address; } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) external onlyOwner { royaltyBasisPoints = _basisPoints; emit RoyaltyBasisPoints(_basisPoints); } // Set base URI function setBaseURI(string memory _uri) external onlyOwner { baseTokenURI = _uri; } //-- Public Functions --// // Get mint cost from mint cost contract, or fallback to local mintCost function getMintCost(address _address) public view returns (uint256) { return mintCostContract != address(0) ? IERC721Helpers(mintCostContract).getMintCost(_address) : mintCost; } // Get mints left function getMintsLeft() public view returns (uint256) { uint256 currentSupply = super.totalSupply(); uint256 counterType = _tokenIds._type; uint256 totalTokens = counterType != 0 ? TOTAL_TOKENS.div(2) : TOTAL_TOKENS; return totalTokens.sub(currentSupply); } // Get mints left per sale round function getMintsLeftPerSaleRound() public view returns (uint256) { return maxMintsPerSaleRound.sub(_tokensMintedPerSaleRound.current()); } // Get circulating supply - current supply minus contract owner supply function getCirculatingSupply() public view returns (uint256) { uint256 currentSupply = super.totalSupply(); uint256 ownerSupply = balanceOf(owner()); return currentSupply.sub(ownerSupply); } // Get total tokens based on counter type function getTotalTokens() public view returns (uint256) { uint256 counterType = _tokenIds._type; uint256 totalTokens = counterType != 0 ? TOTAL_TOKENS.div(2) : TOTAL_TOKENS; return totalTokens; } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), 'Nonexistent token'); return string(abi.encodePacked(_baseURI(), _tokenId.toString(), '.json')); } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { return string(abi.encodePacked(_baseURI(), 'contract.json')); } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(_interfaceId); } // Pauses all token transfers - See {ERC721Pausable} function pause() external virtual onlyOwner { _pause(); } // Unpauses all token transfers - See {ERC721Pausable} function unpause() external virtual onlyOwner { _unpause(); } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { return baseTokenURI; } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { super._beforeTokenTransfer(_from, _to, _tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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); } /** * @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); } /** * @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 of token that is not own"); 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); } /** * @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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } }
// 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 pragma solidity ^0.8.4; /** * @dev Interface that can be used to build custom logic for ERC721 tokens.. */ interface IERC721Helpers { /** * @dev Returns mint cost in wei. */ function getMintCost(address _address) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Lance Whatley * @dev Provides counters that can be incremented, decremented or reset, and provides even/odd only logic. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // 0: single digit increment // 1: skip one, and only odds // 2: skip one, and only get even numbers uint8 _type; // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function setType(Counter storage counter, uint8 counterType) internal { require( counterType == 0 || counterType == 1 || counterType == 2, 'invalid type' ); counter._type = counterType; } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { uint256 incAmount = 1; if (counter._type != 0) { if (counter._value == 0) { incAmount = counter._type == 1 ? 1 : 2; } else { incAmount = 2; } } counter._value += incAmount; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, 'Counter: decrement overflow'); unchecked { uint256 decAmount = counter._type == 0 ? 1 : counter._value == 1 ? 1 : 2; counter._value = value - decAmount; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 tokenId); /** * @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 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"uint8","name":"_counterType","type":"uint8"}],"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_royaltyBasisPoints","type":"uint256"}],"name":"RoyaltyBasisPoints","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"TOKEN_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_SYMBOL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_preSaleRound","outputs":[{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_publicSaleRound","outputs":[{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokensMintedPerSaleRound","outputs":[{"internalType":"uint8","name":"_type","type":"uint8"},{"internalType":"uint256","name":"_value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addToAuthorizedAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addToPresaleWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"customBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_reciever","type":"address"}],"name":"customMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endPreSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCirculatingSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getMintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintsLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintsLeftPerSaleRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalTokens","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":"maxMintsPerSaleRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintCostContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"presaleWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeFromAuthorizedAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeFromPresaleWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetPreSaleRounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetPublicSaleRounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetTokensMintedPerSaleRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"setERC721HelperContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxMintsPerSaleRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMaxWalletAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setPaymentAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_basisPoints","type":"uint256"}],"name":"setRoyaltyBasisPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPreSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPublicSale","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":[],"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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526103e860175566c094e36ae00800601855600a601a556103e8601b553480156200002d57600080fd5b5060405162003dd438038062003dd48339810160408190526200005091620002cf565b6040518060400160405280600c81526020016b37b5973632ba399730b8329760a11b815250604051806040016040528060068152602001654f4b4c41706560d01b815250620000ae620000a86200014a60201b60201c565b6200014e565b8151620000c390600190602085019062000212565b508051620000d990600290602084019062000212565b5050600b805460ff19169055508151620000fb90601490602085019062000212565b50600054601580546001600160a01b039092166001600160a01b031992831681179091556016805490921617905562000142600c826200019e602090811b6200230a17901c565b50506200040d565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60ff81161580620001b257508060ff166001145b80620001c157508060ff166002145b620002015760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b604482015260640160405180910390fd5b815460ff191660ff91909116179055565b8280546200022090620003ba565b90600052602060002090601f0160209004810192826200024457600085556200028f565b82601f106200025f57805160ff19168380011785556200028f565b828001600101855582156200028f579182015b828111156200028f57825182559160200191906001019062000272565b506200029d929150620002a1565b5090565b5b808211156200029d5760008155600101620002a2565b805160ff81168114620002ca57600080fd5b919050565b60008060408385031215620002e2578182fd5b82516001600160401b0380821115620002f9578384fd5b818501915085601f8301126200030d578384fd5b815181811115620003225762000322620003f7565b604051601f8201601f19908116603f011681019083821181831017156200034d576200034d620003f7565b8160405282815260209350888484870101111562000369578687fd5b8691505b828210156200038c57848201840151818301850152908301906200036d565b828211156200039d57868484830101525b9550620003af915050858201620002b8565b925050509250929050565b600181811c90821680620003cf57607f821691505b60208210811415620003f157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6139b7806200041d6000396000f3fe6080604052600436106103d95760003560e01c80635c5b8ef3116101fd578063a22cb46511610118578063c87b56dd116100ab578063eb8835ab1161007a578063eb8835ab14610b57578063ee889ed014610aa4578063f08b82e614610b87578063f19e207e14610b9c578063f2fde38b14610bcc57600080fd5b8063c87b56dd14610ab9578063e8a3d48514610ad9578063e985e9c514610aee578063eb7114b214610b3757600080fd5b8063b88d4fde116100e7578063b88d4fde14610a4f578063bc8893b414610a6f578063bdb4b84814610a8e578063c7d17fd114610aa457600080fd5b8063a22cb465146109e4578063aa4bde2814610a04578063b6361b5614610a1a578063b6b8194014610a2f57600080fd5b806384494708116101905780638e07484c1161015f5780638e07484c1461097c5780638f65fe0a1461099c57806395d89b41146109bc578063a0712d68146109d157600080fd5b8063844947081461090f5780638456cb59146109295780638545f4ea1461093e5780638da5cb5b1461095e57600080fd5b8063700c43a9116101cc578063700c43a9146108a557806370a08231146108ba578063715018a6146108da5780638284616d146108ef57600080fd5b80635c5b8ef31461082d5780635c975abb1461084d5780635e1e1004146108655780636352211e1461088557600080fd5b806327a14fc2116102f85780633f4ba83a1161028b5780634f6ccce71161025a5780634f6ccce71461079c57806352c110d7146107bc57806355dd574c146107da57806355f804b3146107ef57806358989e781461080f57600080fd5b80633f4ba83a14610727578063410ad6a61461073c57806342842e0e1461075c57806342966c681461077c57600080fd5b80632f745c59116102c75780632f745c59146106b25780633549aae2146106d257806336a84b80146106f25780633c455c871461070757600080fd5b806327a14fc21461060c5780632a55205a1461062c5780632a9053181461066b5780632b112e491461069d57600080fd5b80630b7abf7711610370578063188214001161033f578063188214001461057f57806322e572db146105b757806323b872dd146105cc57806324502ca4146105ec57600080fd5b80630b7abf771461052a5780630c1c972a146105405780630c3a92d31461055557806318160ddd1461056a57600080fd5b8063081812fc116103ac578063081812fc14610485578063090dfdd8146104bd578063095ea7b3146104d35780630b2a5bc2146104f357600080fd5b80630163d025146103de57806301ffc9a71461041157806306d254da1461044157806306fdde0314610463575b600080fd5b3480156103ea57600080fd5b506103fe6103f9366004613362565b610bec565b6040519081526020015b60405180910390f35b34801561041d57600080fd5b5061043161042c366004613574565b610c8a565b6040519015158152602001610408565b34801561044d57600080fd5b5061046161045c366004613362565b610c95565b005b34801561046f57600080fd5b50610478610cea565b604051610408919061373e565b34801561049157600080fd5b506104a56104a03660046135f2565b610d7c565b6040516001600160a01b039091168152602001610408565b3480156104c957600080fd5b506103fe601b5481565b3480156104df57600080fd5b506104616104ee36600461349c565b610e04565b3480156104ff57600080fd5b506012546013546105119160ff169082565b6040805160ff9093168352602083019190915201610408565b34801561053657600080fd5b506103fe61271081565b34801561054c57600080fd5b50610461610f1a565b34801561056157600080fd5b506103fe610f64565b34801561057657600080fd5b506009546103fe565b34801561058b57600080fd5b506104786040518060400160405280600c81526020016b37b5973632ba399730b8329760a11b81525081565b3480156105c357600080fd5b506103fe610fa9565b3480156105d857600080fd5b506104616105e73660046133ae565b610fc1565b3480156105f857600080fd5b50610461610607366004613622565b610ff3565b34801561061857600080fd5b506104616106273660046135f2565b6111bc565b34801561063857600080fd5b5061064c610647366004613644565b6111eb565b604080516001600160a01b039093168352602083019190915201610408565b34801561067757600080fd5b50610478604051806040016040528060068152602001654f4b4c41706560d01b81525081565b3480156106a957600080fd5b506103fe611226565b3480156106be57600080fd5b506103fe6106cd36600461349c565b61125e565b3480156106de57600080fd5b506104616106ed3660046134c5565b6112f4565b3480156106fe57600080fd5b5061046161138a565b34801561071357600080fd5b506104616107223660046135f2565b6113bd565b34801561073357600080fd5b50610461611545565b34801561074857600080fd5b506104616107573660046134c5565b611577565b34801561076857600080fd5b506104616107773660046133ae565b611610565b34801561078857600080fd5b506104616107973660046135f2565b61162b565b3480156107a857600080fd5b506103fe6107b73660046135f2565b6116a2565b3480156107c857600080fd5b506010546011546105119160ff169082565b3480156107e657600080fd5b50610461611743565b3480156107fb57600080fd5b5061046161080a3660046135ac565b61178c565b34801561081b57600080fd5b50600e54600f546105119160ff169082565b34801561083957600080fd5b506104616108483660046135f2565b6117c9565b34801561085957600080fd5b50600b5460ff16610431565b34801561087157600080fd5b50610461610880366004613362565b6117f8565b34801561089157600080fd5b506104a56108a03660046135f2565b611844565b3480156108b157600080fd5b506104616118bb565b3480156108c657600080fd5b506103fe6108d5366004613362565b6118ec565b3480156108e657600080fd5b50610461611973565b3480156108fb57600080fd5b5061046161090a366004613362565b6119a7565b34801561091b57600080fd5b50601c546104319060ff1681565b34801561093557600080fd5b50610461611b78565b34801561094a57600080fd5b506104616109593660046135f2565b611baa565b34801561096a57600080fd5b506000546001600160a01b03166104a5565b34801561098857600080fd5b506104616109973660046134c5565b611bd9565b3480156109a857600080fd5b506104616109b73660046134c5565b611c72565b3480156109c857600080fd5b50610478611d08565b6104616109df3660046135f2565b611d17565b3480156109f057600080fd5b506104616109ff366004613462565b61208e565b348015610a1057600080fd5b506103fe601a5481565b348015610a2657600080fd5b50610461612099565b348015610a3b57600080fd5b50610461610a4a3660046135f2565b6120ca565b348015610a5b57600080fd5b50610461610a6a3660046133e9565b612127565b348015610a7b57600080fd5b50601c5461043190610100900460ff1681565b348015610a9a57600080fd5b506103fe60185481565b348015610ab057600080fd5b5061046161215f565b348015610ac557600080fd5b50610478610ad43660046135f2565b612196565b348015610ae557600080fd5b50610478612219565b348015610afa57600080fd5b50610431610b0936600461337c565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610b4357600080fd5b506019546104a5906001600160a01b031681565b348015610b6357600080fd5b50610431610b72366004613362565b601d6020526000908152604090205460ff1681565b348015610b9357600080fd5b506103fe612247565b348015610ba857600080fd5b50610431610bb7366004613362565b601e6020526000908152604090205460ff1681565b348015610bd857600080fd5b50610461610be7366004613362565b612272565b6019546000906001600160a01b0316610c0757601854610c84565b601954604051630163d02560e01b81526001600160a01b03848116600483015290911690630163d0259060240160206040518083038186803b158015610c4c57600080fd5b505afa158015610c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c84919061360a565b92915050565b6000610c8482612377565b6000546001600160a01b03163314610cc85760405162461bcd60e51b8152600401610cbf906137a3565b60405180910390fd5b601680546001600160a01b0319166001600160a01b0392909216919091179055565b606060018054610cf9906138e8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d25906138e8565b8015610d725780601f10610d4757610100808354040283529160200191610d72565b820191906000526020600020905b815481529060010190602001808311610d5557829003601f168201915b5050505050905090565b6000610d878261239c565b610de85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610cbf565b506000908152600560205260409020546001600160a01b031690565b6000610e0f82611844565b9050806001600160a01b0316836001600160a01b03161415610e7d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610cbf565b336001600160a01b0382161480610e995750610e998133610b09565b610f0b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610cbf565b610f1583836123b9565b505050565b6000546001600160a01b03163314610f445760405162461bcd60e51b8152600401610cbf906137a3565b610f4e6010612427565b6000601355601c805461ffff1916610100179055565b600080610f7060095490565b600c5490915060ff16600081610f8857612710610f95565b610f95612710600261246f565b9050610fa1818461247b565b935050505090565b601354600090610fbc90601b549061247b565b905090565b610fcc335b82612487565b610fe85760405162461bcd60e51b8152600401610cbf906137d8565b610f15838383612571565b6000546001600160a01b031633148061101b5750336000908152601e602052604090205460ff165b6110585760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610cbf565b601c54610100900460ff161580156110735750601c5460ff16155b6110b85760405162461bcd60e51b815260206004820152601660248201527553616c6573206d75737420626520696e61637469766560501b6044820152606401610cbf565b6000821180156110ca57506127108211155b6111115760405162461bcd60e51b8152602060048201526018602482015277135d5cdd081c185cdcc81d985b1a59081d1bdad95b881a5960421b6044820152606401610cbf565b61111a8261239c565b156111b25761112882611844565b6001600160a01b03166111436000546001600160a01b031690565b6001600160a01b0316146111925760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881a5cc8185b1c9958591e481bdddb995960521b6044820152606401610cbf565b6111ae6111a76000546001600160a01b031690565b8284611610565b5050565b6111ae818361271c565b6000546001600160a01b031633146111e65760405162461bcd60e51b8152600401610cbf906137a3565b601a55565b60165460175460009182916001600160a01b039091169061121b9061271090611215908790612736565b9061246f565b915091509250929050565b60008061123260095490565b9050600061124b6108d56000546001600160a01b031690565b9050611257828261247b565b9250505090565b6000611269836118ec565b82106112cb5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610cbf565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000546001600160a01b0316331461131e5760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae57600082828151811061134c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601e90915260409020805460ff19169055508061138281613923565b915050611321565b6000546001600160a01b031633146113b45760405162461bcd60e51b8152600401610cbf906137a3565b6000600f55565b565b6000546001600160a01b03163314806113e55750336000908152601e602052604090205460ff165b6114225760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610cbf565b601c54610100900460ff1615801561143d5750601c5460ff16155b6114825760405162461bcd60e51b815260206004820152601660248201527553616c6573206d75737420626520696e61637469766560501b6044820152606401610cbf565b60008111801561149457506127108111155b6114db5760405162461bcd60e51b8152602060048201526018602482015277135d5cdd081c185cdcc81d985b1a59081d1bdad95b881a5960421b6044820152606401610cbf565b6114e48161239c565b6115245760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610cbf565b61154261153082611844565b6000546001600160a01b031683611610565b50565b6000546001600160a01b0316331461156f5760405162461bcd60e51b8152600401610cbf906137a3565b6113bb612742565b6000546001600160a01b031633146115a15760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae5760008282815181106115cf57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601e90915260409020805460ff19166001179055508061160881613923565b9150506115a4565b610f1583838360405180602001604052806000815250612127565b61163433610fc6565b6116995760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610cbf565b611542816127d5565b60006116ad60095490565b82106117105760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610cbf565b6009828154811061173157634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000546001600160a01b0316331461176d5760405162461bcd60e51b8152600401610cbf906137a3565b611777600e612427565b6000601355601c805461ffff19166001179055565b6000546001600160a01b031633146117b65760405162461bcd60e51b8152600401610cbf906137a3565b80516111ae906014906020840190613255565b6000546001600160a01b031633146117f35760405162461bcd60e51b8152600401610cbf906137a3565b601b55565b6000546001600160a01b031633146118225760405162461bcd60e51b8152600401610cbf906137a3565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600360205260408120546001600160a01b031680610c845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610cbf565b6000546001600160a01b031633146118e55760405162461bcd60e51b8152600401610cbf906137a3565b6000601355565b60006001600160a01b0382166119575760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610cbf565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b0316331461199d5760405162461bcd60e51b8152600401610cbf906137a3565b6113bb600061287c565b6000546001600160a01b031633146119d15760405162461bcd60e51b8152600401610cbf906137a3565b6001600160a01b03811615611b5657806001600160a01b038116630163d025336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611a3057600080fd5b505afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a68919061360a565b1580611afa575060006001600160a01b038216630163d025336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611ac057600080fd5b505afa158015611ad4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af8919061360a565b115b611b545760405162461bcd60e51b815260206004820152602560248201527f436f6e747261637420646f6573206e6f7420696d706c656d656e7420696e7465604482015264726661636560d81b6064820152608401610cbf565b505b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611ba25760405162461bcd60e51b8152600401610cbf906137a3565b6113bb6128cc565b6000546001600160a01b03163314611bd45760405162461bcd60e51b8152600401610cbf906137a3565b601855565b6000546001600160a01b03163314611c035760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae576000828281518110611c3157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601d90915260409020805460ff191660011790555080611c6a81613923565b915050611c06565b6000546001600160a01b03163314611c9c5760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae576000828281518110611cca57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601d90915260409020805460ff191690555080611d0081613923565b915050611c9f565b606060028054610cf9906138e8565b6000546001600160a01b0316331480611d325750601c5460ff165b80611d445750601c54610100900460ff165b611d855760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610cbf565b60008111611dce5760405162461bcd60e51b81526020600482015260166024820152754d757374206d696e74206174206c65617374206f6e6560501b6044820152606401610cbf565b611dd6610f64565b811115611e255760405162461bcd60e51b815260206004820152601f60248201527f4d696e74696e6720776f756c6420657863656564206d617820737570706c79006044820152606401610cbf565b611e2d610fa9565b811115611e985760405162461bcd60e51b815260206004820152603360248201527f4d696e74696e6720776f756c6420657863656564206d6178206d696e7420616d6044820152721bdd5b9d081c195c881cd85b19481c9bdd5b99606a1b6064820152608401610cbf565b600080546001600160a01b0316331480611fb457601c5460ff1615611f0d57336000908152601d602052604090205460ff16611f0d5760405162461bcd60e51b8152602060048201526014602482015273135d5cdd081899481bdb881dda1a5d195b1a5cdd60621b6044820152606401610cbf565b82611f1733610bec565b611f219190613886565b91506000611f2e336118ec565b601a54909150611f3e8286612947565b1115611fb25760405162461bcd60e51b815260206004820152603760248201527f52657175657374656420616d6f756e742065786365656473206d6178696d756d60448201527f206d696e7420616d6f756e74207065722077616c6c65740000000000000000006064820152608401610cbf565b505b348211156120045760405162461bcd60e51b815260206004820152601e60248201527f45544820616d6f756e742073656e74206973206e6f7420636f727265637400006044820152606401610cbf565b60005b8381101561204157612019600c612427565b61202533600d5461271c565b61202f6012612427565b8061203981613923565b915050612007565b50601554612058906001600160a01b031683612953565b81341115612073576120733361206e348561247b565b612953565b601b5460135410610f1557601c805461ffff19169055505050565b6111ae338383612a6c565b6000546001600160a01b031633146120c35760405162461bcd60e51b8152600401610cbf906137a3565b6000601155565b6000546001600160a01b031633146120f45760405162461bcd60e51b8152600401610cbf906137a3565b601781905560405181907fce3498f3236889c7e9256b3643e0f7fae5a1b912f2ac0daa1d89236c70b522c690600090a250565b6121313383612487565b61214d5760405162461bcd60e51b8152600401610cbf906137d8565b61215984848484612b3b565b50505050565b6000546001600160a01b031633146121895760405162461bcd60e51b8152600401610cbf906137a3565b601c805461ffff19169055565b60606121a18261239c565b6121e15760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610cbf565b6121e9612b6e565b6121f283612b7d565b604051602001612203929190613691565b6040516020818303038152906040529050919050565b6060612223612b6e565b60405160200161223391906136d0565b604051602081830303815290604052905090565b600c5460009060ff16818161225e5761271061226b565b61226b612710600261246f565b9392505050565b6000546001600160a01b0316331461229c5760405162461bcd60e51b8152600401610cbf906137a3565b6001600160a01b0381166123015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cbf565b6115428161287c565b60ff8116158061231d57508060ff166001145b8061232b57508060ff166002145b6123665760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b6044820152606401610cbf565b815460ff191660ff91909116179055565b60006001600160e01b0319821663780e9d6360e01b1480610c845750610c8482612c97565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123ee82611844565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b805460019060ff161561246157600182015461245d57815460ff16600114612450576002612453565b60015b60ff169050612461565b5060025b600190910180549091019055565b600061226b8284613872565b600061226b82846138a5565b60006124928261239c565b6124f35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610cbf565b60006124fe83611844565b9050806001600160a01b0316846001600160a01b031614806125395750836001600160a01b031661252e84610d7c565b6001600160a01b0316145b8061256957506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661258482611844565b6001600160a01b0316146125ec5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610cbf565b6001600160a01b03821661264e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610cbf565b612659838383612ce7565b6126646000826123b9565b6001600160a01b038316600090815260046020526040812080546001929061268d9084906138a5565b90915550506001600160a01b03821660009081526004602052604081208054600192906126bb90849061385a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6111ae828260405180602001604052806000815250612cf2565b600061226b8284613886565b600b5460ff1661278b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610cbf565b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006127e082611844565b90506127ee81600084612ce7565b6127f96000836123b9565b6001600160a01b03811660009081526004602052604081208054600192906128229084906138a5565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600b5460ff16156129125760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610cbf565b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586127b83390565b600061226b828461385a565b804710156129a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610cbf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146129f0576040519150601f19603f3d011682016040523d82523d6000602084013e6129f5565b606091505b5050905080610f155760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610cbf565b816001600160a01b0316836001600160a01b03161415612ace5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610cbf565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612b46848484612571565b612b5284848484612d25565b6121595760405162461bcd60e51b8152600401610cbf90613751565b606060148054610cf9906138e8565b606081612ba15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bcb5780612bb581613923565b9150612bc49050600a83613872565b9150612ba5565b60008167ffffffffffffffff811115612bf457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612c1e576020820181803683370190505b5090505b841561256957612c336001836138a5565b9150612c40600a8661393e565b612c4b90603061385a565b60f81b818381518110612c6e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612c90600a86613872565b9450612c22565b60006001600160e01b031982166380ac58cd60e01b1480612cc857506001600160e01b03198216635b5e139f60e01b145b80610c8457506301ffc9a760e01b6001600160e01b0319831614610c84565b610f15838383612e32565b612cfc8383612ea4565b612d096000848484612d25565b610f155760405162461bcd60e51b8152600401610cbf90613751565b60006001600160a01b0384163b15612e2757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d69903390899088908890600401613701565b602060405180830381600087803b158015612d8357600080fd5b505af1925050508015612db3575060408051601f3d908101601f19168201909252612db091810190613590565b60015b612e0d573d808015612de1576040519150601f19603f3d011682016040523d82523d6000602084013e612de6565b606091505b508051612e055760405162461bcd60e51b8152600401610cbf90613751565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612569565b506001949350505050565b612e3d838383612fe3565b600b5460ff1615610f155760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610cbf565b6001600160a01b038216612efa5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610cbf565b612f038161239c565b15612f505760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610cbf565b612f5c60008383612ce7565b6001600160a01b0382166000908152600460205260408120805460019290612f8590849061385a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b03831661303e5761303981600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613061565b816001600160a01b0316836001600160a01b03161461306157613061838261309b565b6001600160a01b03821661307857610f1581613138565b826001600160a01b0316826001600160a01b031614610f1557610f158282613211565b600060016130a8846118ec565b6130b291906138a5565b600083815260086020526040902054909150808214613105576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061314a906001906138a5565b6000838152600a60205260408120546009805493945090928490811061318057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600983815481106131af57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806131f557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061321c836118ec565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b828054613261906138e8565b90600052602060002090601f01602090048101928261328357600085556132c9565b82601f1061329c57805160ff19168380011785556132c9565b828001600101855582156132c9579182015b828111156132c95782518255916020019190600101906132ae565b506132d59291506132d9565b5090565b5b808211156132d557600081556001016132da565b600067ffffffffffffffff8311156133085761330861397e565b61331b601f8401601f1916602001613829565b905082815283838301111561332f57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461335d57600080fd5b919050565b600060208284031215613373578081fd5b61226b82613346565b6000806040838503121561338e578081fd5b61339783613346565b91506133a560208401613346565b90509250929050565b6000806000606084860312156133c2578081fd5b6133cb84613346565b92506133d960208501613346565b9150604084013590509250925092565b600080600080608085870312156133fe578081fd5b61340785613346565b935061341560208601613346565b925060408501359150606085013567ffffffffffffffff811115613437578182fd5b8501601f81018713613447578182fd5b613456878235602084016132ee565b91505092959194509250565b60008060408385031215613474578182fd5b61347d83613346565b915060208301358015158114613491578182fd5b809150509250929050565b600080604083850312156134ae578182fd5b6134b783613346565b946020939093013593505050565b600060208083850312156134d7578182fd5b823567ffffffffffffffff808211156134ee578384fd5b818501915085601f830112613501578384fd5b8135818111156135135761351361397e565b8060051b9150613524848301613829565b8181528481019084860184860187018a101561353e578788fd5b8795505b838610156135675761355381613346565b835260019590950194918601918601613542565b5098975050505050505050565b600060208284031215613585578081fd5b813561226b81613994565b6000602082840312156135a1578081fd5b815161226b81613994565b6000602082840312156135bd578081fd5b813567ffffffffffffffff8111156135d3578182fd5b8201601f810184136135e3578182fd5b612569848235602084016132ee565b600060208284031215613603578081fd5b5035919050565b60006020828403121561361b578081fd5b5051919050565b60008060408385031215613634578182fd5b823591506133a560208401613346565b60008060408385031215613656578182fd5b50508035926020909101359150565b6000815180845261367d8160208601602086016138bc565b601f01601f19169290920160200192915050565b600083516136a38184602088016138bc565b8351908301906136b78183602088016138bc565b64173539b7b760d91b9101908152600501949350505050565b600082516136e28184602087016138bc565b6c31b7b73a3930b1ba173539b7b760991b920191825250600d01919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061373490830184613665565b9695505050505050565b60208152600061226b6020830184613665565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156138525761385261397e565b604052919050565b6000821982111561386d5761386d613952565b500190565b60008261388157613881613968565b500490565b60008160001904831182151516156138a0576138a0613952565b500290565b6000828210156138b7576138b7613952565b500390565b60005b838110156138d75781810151838201526020016138bf565b838111156121595750506000910152565b600181811c908216806138fc57607f821691505b6020821081141561391d57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561393757613937613952565b5060010190565b60008261394d5761394d613968565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461154257600080fdfea164736f6c6343000804000a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5344376463733635596e7634714e395a39796b4d385961726f507567736d586f574a67567568734e4e774e502f00000000000000000000
Deployed Bytecode
0x6080604052600436106103d95760003560e01c80635c5b8ef3116101fd578063a22cb46511610118578063c87b56dd116100ab578063eb8835ab1161007a578063eb8835ab14610b57578063ee889ed014610aa4578063f08b82e614610b87578063f19e207e14610b9c578063f2fde38b14610bcc57600080fd5b8063c87b56dd14610ab9578063e8a3d48514610ad9578063e985e9c514610aee578063eb7114b214610b3757600080fd5b8063b88d4fde116100e7578063b88d4fde14610a4f578063bc8893b414610a6f578063bdb4b84814610a8e578063c7d17fd114610aa457600080fd5b8063a22cb465146109e4578063aa4bde2814610a04578063b6361b5614610a1a578063b6b8194014610a2f57600080fd5b806384494708116101905780638e07484c1161015f5780638e07484c1461097c5780638f65fe0a1461099c57806395d89b41146109bc578063a0712d68146109d157600080fd5b8063844947081461090f5780638456cb59146109295780638545f4ea1461093e5780638da5cb5b1461095e57600080fd5b8063700c43a9116101cc578063700c43a9146108a557806370a08231146108ba578063715018a6146108da5780638284616d146108ef57600080fd5b80635c5b8ef31461082d5780635c975abb1461084d5780635e1e1004146108655780636352211e1461088557600080fd5b806327a14fc2116102f85780633f4ba83a1161028b5780634f6ccce71161025a5780634f6ccce71461079c57806352c110d7146107bc57806355dd574c146107da57806355f804b3146107ef57806358989e781461080f57600080fd5b80633f4ba83a14610727578063410ad6a61461073c57806342842e0e1461075c57806342966c681461077c57600080fd5b80632f745c59116102c75780632f745c59146106b25780633549aae2146106d257806336a84b80146106f25780633c455c871461070757600080fd5b806327a14fc21461060c5780632a55205a1461062c5780632a9053181461066b5780632b112e491461069d57600080fd5b80630b7abf7711610370578063188214001161033f578063188214001461057f57806322e572db146105b757806323b872dd146105cc57806324502ca4146105ec57600080fd5b80630b7abf771461052a5780630c1c972a146105405780630c3a92d31461055557806318160ddd1461056a57600080fd5b8063081812fc116103ac578063081812fc14610485578063090dfdd8146104bd578063095ea7b3146104d35780630b2a5bc2146104f357600080fd5b80630163d025146103de57806301ffc9a71461041157806306d254da1461044157806306fdde0314610463575b600080fd5b3480156103ea57600080fd5b506103fe6103f9366004613362565b610bec565b6040519081526020015b60405180910390f35b34801561041d57600080fd5b5061043161042c366004613574565b610c8a565b6040519015158152602001610408565b34801561044d57600080fd5b5061046161045c366004613362565b610c95565b005b34801561046f57600080fd5b50610478610cea565b604051610408919061373e565b34801561049157600080fd5b506104a56104a03660046135f2565b610d7c565b6040516001600160a01b039091168152602001610408565b3480156104c957600080fd5b506103fe601b5481565b3480156104df57600080fd5b506104616104ee36600461349c565b610e04565b3480156104ff57600080fd5b506012546013546105119160ff169082565b6040805160ff9093168352602083019190915201610408565b34801561053657600080fd5b506103fe61271081565b34801561054c57600080fd5b50610461610f1a565b34801561056157600080fd5b506103fe610f64565b34801561057657600080fd5b506009546103fe565b34801561058b57600080fd5b506104786040518060400160405280600c81526020016b37b5973632ba399730b8329760a11b81525081565b3480156105c357600080fd5b506103fe610fa9565b3480156105d857600080fd5b506104616105e73660046133ae565b610fc1565b3480156105f857600080fd5b50610461610607366004613622565b610ff3565b34801561061857600080fd5b506104616106273660046135f2565b6111bc565b34801561063857600080fd5b5061064c610647366004613644565b6111eb565b604080516001600160a01b039093168352602083019190915201610408565b34801561067757600080fd5b50610478604051806040016040528060068152602001654f4b4c41706560d01b81525081565b3480156106a957600080fd5b506103fe611226565b3480156106be57600080fd5b506103fe6106cd36600461349c565b61125e565b3480156106de57600080fd5b506104616106ed3660046134c5565b6112f4565b3480156106fe57600080fd5b5061046161138a565b34801561071357600080fd5b506104616107223660046135f2565b6113bd565b34801561073357600080fd5b50610461611545565b34801561074857600080fd5b506104616107573660046134c5565b611577565b34801561076857600080fd5b506104616107773660046133ae565b611610565b34801561078857600080fd5b506104616107973660046135f2565b61162b565b3480156107a857600080fd5b506103fe6107b73660046135f2565b6116a2565b3480156107c857600080fd5b506010546011546105119160ff169082565b3480156107e657600080fd5b50610461611743565b3480156107fb57600080fd5b5061046161080a3660046135ac565b61178c565b34801561081b57600080fd5b50600e54600f546105119160ff169082565b34801561083957600080fd5b506104616108483660046135f2565b6117c9565b34801561085957600080fd5b50600b5460ff16610431565b34801561087157600080fd5b50610461610880366004613362565b6117f8565b34801561089157600080fd5b506104a56108a03660046135f2565b611844565b3480156108b157600080fd5b506104616118bb565b3480156108c657600080fd5b506103fe6108d5366004613362565b6118ec565b3480156108e657600080fd5b50610461611973565b3480156108fb57600080fd5b5061046161090a366004613362565b6119a7565b34801561091b57600080fd5b50601c546104319060ff1681565b34801561093557600080fd5b50610461611b78565b34801561094a57600080fd5b506104616109593660046135f2565b611baa565b34801561096a57600080fd5b506000546001600160a01b03166104a5565b34801561098857600080fd5b506104616109973660046134c5565b611bd9565b3480156109a857600080fd5b506104616109b73660046134c5565b611c72565b3480156109c857600080fd5b50610478611d08565b6104616109df3660046135f2565b611d17565b3480156109f057600080fd5b506104616109ff366004613462565b61208e565b348015610a1057600080fd5b506103fe601a5481565b348015610a2657600080fd5b50610461612099565b348015610a3b57600080fd5b50610461610a4a3660046135f2565b6120ca565b348015610a5b57600080fd5b50610461610a6a3660046133e9565b612127565b348015610a7b57600080fd5b50601c5461043190610100900460ff1681565b348015610a9a57600080fd5b506103fe60185481565b348015610ab057600080fd5b5061046161215f565b348015610ac557600080fd5b50610478610ad43660046135f2565b612196565b348015610ae557600080fd5b50610478612219565b348015610afa57600080fd5b50610431610b0936600461337c565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b348015610b4357600080fd5b506019546104a5906001600160a01b031681565b348015610b6357600080fd5b50610431610b72366004613362565b601d6020526000908152604090205460ff1681565b348015610b9357600080fd5b506103fe612247565b348015610ba857600080fd5b50610431610bb7366004613362565b601e6020526000908152604090205460ff1681565b348015610bd857600080fd5b50610461610be7366004613362565b612272565b6019546000906001600160a01b0316610c0757601854610c84565b601954604051630163d02560e01b81526001600160a01b03848116600483015290911690630163d0259060240160206040518083038186803b158015610c4c57600080fd5b505afa158015610c60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c84919061360a565b92915050565b6000610c8482612377565b6000546001600160a01b03163314610cc85760405162461bcd60e51b8152600401610cbf906137a3565b60405180910390fd5b601680546001600160a01b0319166001600160a01b0392909216919091179055565b606060018054610cf9906138e8565b80601f0160208091040260200160405190810160405280929190818152602001828054610d25906138e8565b8015610d725780601f10610d4757610100808354040283529160200191610d72565b820191906000526020600020905b815481529060010190602001808311610d5557829003601f168201915b5050505050905090565b6000610d878261239c565b610de85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610cbf565b506000908152600560205260409020546001600160a01b031690565b6000610e0f82611844565b9050806001600160a01b0316836001600160a01b03161415610e7d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610cbf565b336001600160a01b0382161480610e995750610e998133610b09565b610f0b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610cbf565b610f1583836123b9565b505050565b6000546001600160a01b03163314610f445760405162461bcd60e51b8152600401610cbf906137a3565b610f4e6010612427565b6000601355601c805461ffff1916610100179055565b600080610f7060095490565b600c5490915060ff16600081610f8857612710610f95565b610f95612710600261246f565b9050610fa1818461247b565b935050505090565b601354600090610fbc90601b549061247b565b905090565b610fcc335b82612487565b610fe85760405162461bcd60e51b8152600401610cbf906137d8565b610f15838383612571565b6000546001600160a01b031633148061101b5750336000908152601e602052604090205460ff165b6110585760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610cbf565b601c54610100900460ff161580156110735750601c5460ff16155b6110b85760405162461bcd60e51b815260206004820152601660248201527553616c6573206d75737420626520696e61637469766560501b6044820152606401610cbf565b6000821180156110ca57506127108211155b6111115760405162461bcd60e51b8152602060048201526018602482015277135d5cdd081c185cdcc81d985b1a59081d1bdad95b881a5960421b6044820152606401610cbf565b61111a8261239c565b156111b25761112882611844565b6001600160a01b03166111436000546001600160a01b031690565b6001600160a01b0316146111925760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881a5cc8185b1c9958591e481bdddb995960521b6044820152606401610cbf565b6111ae6111a76000546001600160a01b031690565b8284611610565b5050565b6111ae818361271c565b6000546001600160a01b031633146111e65760405162461bcd60e51b8152600401610cbf906137a3565b601a55565b60165460175460009182916001600160a01b039091169061121b9061271090611215908790612736565b9061246f565b915091509250929050565b60008061123260095490565b9050600061124b6108d56000546001600160a01b031690565b9050611257828261247b565b9250505090565b6000611269836118ec565b82106112cb5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610cbf565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b6000546001600160a01b0316331461131e5760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae57600082828151811061134c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601e90915260409020805460ff19169055508061138281613923565b915050611321565b6000546001600160a01b031633146113b45760405162461bcd60e51b8152600401610cbf906137a3565b6000600f55565b565b6000546001600160a01b03163314806113e55750336000908152601e602052604090205460ff165b6114225760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610cbf565b601c54610100900460ff1615801561143d5750601c5460ff16155b6114825760405162461bcd60e51b815260206004820152601660248201527553616c6573206d75737420626520696e61637469766560501b6044820152606401610cbf565b60008111801561149457506127108111155b6114db5760405162461bcd60e51b8152602060048201526018602482015277135d5cdd081c185cdcc81d985b1a59081d1bdad95b881a5960421b6044820152606401610cbf565b6114e48161239c565b6115245760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610cbf565b61154261153082611844565b6000546001600160a01b031683611610565b50565b6000546001600160a01b0316331461156f5760405162461bcd60e51b8152600401610cbf906137a3565b6113bb612742565b6000546001600160a01b031633146115a15760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae5760008282815181106115cf57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601e90915260409020805460ff19166001179055508061160881613923565b9150506115a4565b610f1583838360405180602001604052806000815250612127565b61163433610fc6565b6116995760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610cbf565b611542816127d5565b60006116ad60095490565b82106117105760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610cbf565b6009828154811061173157634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000546001600160a01b0316331461176d5760405162461bcd60e51b8152600401610cbf906137a3565b611777600e612427565b6000601355601c805461ffff19166001179055565b6000546001600160a01b031633146117b65760405162461bcd60e51b8152600401610cbf906137a3565b80516111ae906014906020840190613255565b6000546001600160a01b031633146117f35760405162461bcd60e51b8152600401610cbf906137a3565b601b55565b6000546001600160a01b031633146118225760405162461bcd60e51b8152600401610cbf906137a3565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600360205260408120546001600160a01b031680610c845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610cbf565b6000546001600160a01b031633146118e55760405162461bcd60e51b8152600401610cbf906137a3565b6000601355565b60006001600160a01b0382166119575760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610cbf565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b0316331461199d5760405162461bcd60e51b8152600401610cbf906137a3565b6113bb600061287c565b6000546001600160a01b031633146119d15760405162461bcd60e51b8152600401610cbf906137a3565b6001600160a01b03811615611b5657806001600160a01b038116630163d025336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611a3057600080fd5b505afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a68919061360a565b1580611afa575060006001600160a01b038216630163d025336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b158015611ac057600080fd5b505afa158015611ad4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af8919061360a565b115b611b545760405162461bcd60e51b815260206004820152602560248201527f436f6e747261637420646f6573206e6f7420696d706c656d656e7420696e7465604482015264726661636560d81b6064820152608401610cbf565b505b601980546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611ba25760405162461bcd60e51b8152600401610cbf906137a3565b6113bb6128cc565b6000546001600160a01b03163314611bd45760405162461bcd60e51b8152600401610cbf906137a3565b601855565b6000546001600160a01b03163314611c035760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae576000828281518110611c3157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601d90915260409020805460ff191660011790555080611c6a81613923565b915050611c06565b6000546001600160a01b03163314611c9c5760405162461bcd60e51b8152600401610cbf906137a3565b60005b81518110156111ae576000828281518110611cca57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03166000908152601d90915260409020805460ff191690555080611d0081613923565b915050611c9f565b606060028054610cf9906138e8565b6000546001600160a01b0316331480611d325750601c5460ff165b80611d445750601c54610100900460ff165b611d855760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610cbf565b60008111611dce5760405162461bcd60e51b81526020600482015260166024820152754d757374206d696e74206174206c65617374206f6e6560501b6044820152606401610cbf565b611dd6610f64565b811115611e255760405162461bcd60e51b815260206004820152601f60248201527f4d696e74696e6720776f756c6420657863656564206d617820737570706c79006044820152606401610cbf565b611e2d610fa9565b811115611e985760405162461bcd60e51b815260206004820152603360248201527f4d696e74696e6720776f756c6420657863656564206d6178206d696e7420616d6044820152721bdd5b9d081c195c881cd85b19481c9bdd5b99606a1b6064820152608401610cbf565b600080546001600160a01b0316331480611fb457601c5460ff1615611f0d57336000908152601d602052604090205460ff16611f0d5760405162461bcd60e51b8152602060048201526014602482015273135d5cdd081899481bdb881dda1a5d195b1a5cdd60621b6044820152606401610cbf565b82611f1733610bec565b611f219190613886565b91506000611f2e336118ec565b601a54909150611f3e8286612947565b1115611fb25760405162461bcd60e51b815260206004820152603760248201527f52657175657374656420616d6f756e742065786365656473206d6178696d756d60448201527f206d696e7420616d6f756e74207065722077616c6c65740000000000000000006064820152608401610cbf565b505b348211156120045760405162461bcd60e51b815260206004820152601e60248201527f45544820616d6f756e742073656e74206973206e6f7420636f727265637400006044820152606401610cbf565b60005b8381101561204157612019600c612427565b61202533600d5461271c565b61202f6012612427565b8061203981613923565b915050612007565b50601554612058906001600160a01b031683612953565b81341115612073576120733361206e348561247b565b612953565b601b5460135410610f1557601c805461ffff19169055505050565b6111ae338383612a6c565b6000546001600160a01b031633146120c35760405162461bcd60e51b8152600401610cbf906137a3565b6000601155565b6000546001600160a01b031633146120f45760405162461bcd60e51b8152600401610cbf906137a3565b601781905560405181907fce3498f3236889c7e9256b3643e0f7fae5a1b912f2ac0daa1d89236c70b522c690600090a250565b6121313383612487565b61214d5760405162461bcd60e51b8152600401610cbf906137d8565b61215984848484612b3b565b50505050565b6000546001600160a01b031633146121895760405162461bcd60e51b8152600401610cbf906137a3565b601c805461ffff19169055565b60606121a18261239c565b6121e15760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b6044820152606401610cbf565b6121e9612b6e565b6121f283612b7d565b604051602001612203929190613691565b6040516020818303038152906040529050919050565b6060612223612b6e565b60405160200161223391906136d0565b604051602081830303815290604052905090565b600c5460009060ff16818161225e5761271061226b565b61226b612710600261246f565b9392505050565b6000546001600160a01b0316331461229c5760405162461bcd60e51b8152600401610cbf906137a3565b6001600160a01b0381166123015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cbf565b6115428161287c565b60ff8116158061231d57508060ff166001145b8061232b57508060ff166002145b6123665760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b6044820152606401610cbf565b815460ff191660ff91909116179055565b60006001600160e01b0319821663780e9d6360e01b1480610c845750610c8482612c97565b6000908152600360205260409020546001600160a01b0316151590565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123ee82611844565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b805460019060ff161561246157600182015461245d57815460ff16600114612450576002612453565b60015b60ff169050612461565b5060025b600190910180549091019055565b600061226b8284613872565b600061226b82846138a5565b60006124928261239c565b6124f35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610cbf565b60006124fe83611844565b9050806001600160a01b0316846001600160a01b031614806125395750836001600160a01b031661252e84610d7c565b6001600160a01b0316145b8061256957506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661258482611844565b6001600160a01b0316146125ec5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610cbf565b6001600160a01b03821661264e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610cbf565b612659838383612ce7565b6126646000826123b9565b6001600160a01b038316600090815260046020526040812080546001929061268d9084906138a5565b90915550506001600160a01b03821660009081526004602052604081208054600192906126bb90849061385a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6111ae828260405180602001604052806000815250612cf2565b600061226b8284613886565b600b5460ff1661278b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610cbf565b600b805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60006127e082611844565b90506127ee81600084612ce7565b6127f96000836123b9565b6001600160a01b03811660009081526004602052604081208054600192906128229084906138a5565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600b5460ff16156129125760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610cbf565b600b805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586127b83390565b600061226b828461385a565b804710156129a35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610cbf565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146129f0576040519150601f19603f3d011682016040523d82523d6000602084013e6129f5565b606091505b5050905080610f155760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610cbf565b816001600160a01b0316836001600160a01b03161415612ace5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610cbf565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612b46848484612571565b612b5284848484612d25565b6121595760405162461bcd60e51b8152600401610cbf90613751565b606060148054610cf9906138e8565b606081612ba15750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bcb5780612bb581613923565b9150612bc49050600a83613872565b9150612ba5565b60008167ffffffffffffffff811115612bf457634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612c1e576020820181803683370190505b5090505b841561256957612c336001836138a5565b9150612c40600a8661393e565b612c4b90603061385a565b60f81b818381518110612c6e57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612c90600a86613872565b9450612c22565b60006001600160e01b031982166380ac58cd60e01b1480612cc857506001600160e01b03198216635b5e139f60e01b145b80610c8457506301ffc9a760e01b6001600160e01b0319831614610c84565b610f15838383612e32565b612cfc8383612ea4565b612d096000848484612d25565b610f155760405162461bcd60e51b8152600401610cbf90613751565b60006001600160a01b0384163b15612e2757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d69903390899088908890600401613701565b602060405180830381600087803b158015612d8357600080fd5b505af1925050508015612db3575060408051601f3d908101601f19168201909252612db091810190613590565b60015b612e0d573d808015612de1576040519150601f19603f3d011682016040523d82523d6000602084013e612de6565b606091505b508051612e055760405162461bcd60e51b8152600401610cbf90613751565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612569565b506001949350505050565b612e3d838383612fe3565b600b5460ff1615610f155760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610cbf565b6001600160a01b038216612efa5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610cbf565b612f038161239c565b15612f505760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610cbf565b612f5c60008383612ce7565b6001600160a01b0382166000908152600460205260408120805460019290612f8590849061385a565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b03831661303e5761303981600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b613061565b816001600160a01b0316836001600160a01b03161461306157613061838261309b565b6001600160a01b03821661307857610f1581613138565b826001600160a01b0316826001600160a01b031614610f1557610f158282613211565b600060016130a8846118ec565b6130b291906138a5565b600083815260086020526040902054909150808214613105576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b60095460009061314a906001906138a5565b6000838152600a60205260408120546009805493945090928490811061318057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600983815481106131af57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600a909152604080822084905585825281205560098054806131f557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061321c836118ec565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b828054613261906138e8565b90600052602060002090601f01602090048101928261328357600085556132c9565b82601f1061329c57805160ff19168380011785556132c9565b828001600101855582156132c9579182015b828111156132c95782518255916020019190600101906132ae565b506132d59291506132d9565b5090565b5b808211156132d557600081556001016132da565b600067ffffffffffffffff8311156133085761330861397e565b61331b601f8401601f1916602001613829565b905082815283838301111561332f57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461335d57600080fd5b919050565b600060208284031215613373578081fd5b61226b82613346565b6000806040838503121561338e578081fd5b61339783613346565b91506133a560208401613346565b90509250929050565b6000806000606084860312156133c2578081fd5b6133cb84613346565b92506133d960208501613346565b9150604084013590509250925092565b600080600080608085870312156133fe578081fd5b61340785613346565b935061341560208601613346565b925060408501359150606085013567ffffffffffffffff811115613437578182fd5b8501601f81018713613447578182fd5b613456878235602084016132ee565b91505092959194509250565b60008060408385031215613474578182fd5b61347d83613346565b915060208301358015158114613491578182fd5b809150509250929050565b600080604083850312156134ae578182fd5b6134b783613346565b946020939093013593505050565b600060208083850312156134d7578182fd5b823567ffffffffffffffff808211156134ee578384fd5b818501915085601f830112613501578384fd5b8135818111156135135761351361397e565b8060051b9150613524848301613829565b8181528481019084860184860187018a101561353e578788fd5b8795505b838610156135675761355381613346565b835260019590950194918601918601613542565b5098975050505050505050565b600060208284031215613585578081fd5b813561226b81613994565b6000602082840312156135a1578081fd5b815161226b81613994565b6000602082840312156135bd578081fd5b813567ffffffffffffffff8111156135d3578182fd5b8201601f810184136135e3578182fd5b612569848235602084016132ee565b600060208284031215613603578081fd5b5035919050565b60006020828403121561361b578081fd5b5051919050565b60008060408385031215613634578182fd5b823591506133a560208401613346565b60008060408385031215613656578182fd5b50508035926020909101359150565b6000815180845261367d8160208601602086016138bc565b601f01601f19169290920160200192915050565b600083516136a38184602088016138bc565b8351908301906136b78183602088016138bc565b64173539b7b760d91b9101908152600501949350505050565b600082516136e28184602087016138bc565b6c31b7b73a3930b1ba173539b7b760991b920191825250600d01919050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061373490830184613665565b9695505050505050565b60208152600061226b6020830184613665565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156138525761385261397e565b604052919050565b6000821982111561386d5761386d613952565b500190565b60008261388157613881613968565b500490565b60008160001904831182151516156138a0576138a0613952565b500290565b6000828210156138b7576138b7613952565b500390565b60005b838110156138d75781810151838201526020016138bf565b838111156121595750506000910152565b600181811c908216806138fc57607f821691505b6020821081141561391d57634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561393757613937613952565b5060010190565b60008261394d5761394d613968565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461154257600080fdfea164736f6c6343000804000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5344376463733635596e7634714e395a39796b4d385961726f507567736d586f574a67567568734e4e774e502f00000000000000000000
-----Decoded View---------------
Arg [0] : _baseTokenURI (string): ipfs://QmSD7dcs65Ynv4qN9Z9ykM8YaroPugsmXoWJgVuhsNNwNP/
Arg [1] : _counterType (uint8): 1
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [3] : 697066733a2f2f516d5344376463733635596e7634714e395a39796b4d385961
Arg [4] : 726f507567736d586f574a67567568734e4e774e502f00000000000000000000
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.