ERC-721
Overview
Max Total Supply
1,202 HD
Holders
230
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 HDLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HeroDungeons
Compiler Version
v0.8.1+commit.df193b15
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.4.22 <0.9.0; /// @title Dungenos for Heroes NFT /* ERC721 Boilerplate */ import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // TODO - Swap out for Dungeons Staking contract interface Dungeons { // Dungeon layouts and metadata will be derived from random Crypts and Caverns dungeons function tokenByIndex(uint256 index) external view returns (uint256); function getLayout(uint256 tokenId) external view returns (bytes memory); function getSize(uint256 tokenId) external view returns (uint256); function getEnvironment(uint256 tokenId) external view returns (uint256); function getName(uint256 tokenId) external view returns (string memory); function getNumDoors(uint256 tokenId) external view returns (uint256); function getNumPoints(uint256 tokenId) external view returns (uint256); } interface Hearts { // Players must spend hearts to purchase dungeons. function balanceOf(address account) external view returns (uint256); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); } contract HeroDungeons is ERC721Enumerable, ReentrancyGuard, Ownable { // Initialize existing deployed contracts Dungeons internal dungeons; Hearts internal hearts; // Set price and supply variables uint256 public constant maxSupply = 3333; uint256 public claimed = 0; // Number of mints that have been claimed (to ensure we don't exceed the cap) uint256 public price = 6000 * 10**18; // Price in HEART bytes32 public root; // May 14, 2022 8:00 AM PT uint256 ALLOWLIST_START = 1652540400; // May 15, 20200 8:00 AM PT uint256 PUBLIC_MINT_START = 1652626800; uint256 MAX_ALLOWLIST = 2234; string BASE_URI; string PRE_REVEAL_URI; function updatePrice(uint256 newPrice) public onlyOwner { price = newPrice; } // Store seeds for our maps mapping(uint256 => uint256) public seeds; // Mapping used for PRNG uint256 internal numDungeons = 8773; // Total number of valid Crypts and Caverns dungeons mapping(uint256 => uint256) internal _idSwaps; // TODO - Change variable name to obfuscate anyone googling the post we got this from // Events for external website querying event Minted(address indexed account, uint256 tokenId); function setRoot(bytes32 _root) public onlyOwner { root = _root; } function verify(bytes32[] memory proof, bytes32 leaf) public view returns (bool) { return MerkleProof.verify(proof, root, leaf); } // Keep track of number of minter per address. Max 3 for allowlist. mapping(address => uint256) public allowlistMints; function setAllowListTime(uint256 time) public onlyOwner { ALLOWLIST_START = time; } function setPublicTime(uint256 time) public onlyOwner { PUBLIC_MINT_START = time; } function allowlistMintActive() public view returns (bool) { return block.timestamp >= ALLOWLIST_START; } function publicMintActive() public view returns (bool) { return block.timestamp >= PUBLIC_MINT_START; } uint256 public totalAllowlist; /// @notice Allow List: Mint a number of hero dungeons. /// @dev Each dungeon costs 6000 $HEART tokens. Heroes NFT and Crypts and Caverns holders are eligible as of 4/25 snapshot. /// @param proof A merkle proof for your wallet (obtained via https://market.theheroes.app/dungeons) /// @param amount The number of dungeons you want to mint. Max 3 per wallet. function allowlistMint(bytes32[] memory proof, uint256 amount) public payable nonReentrant { require(totalAllowlist < MAX_ALLOWLIST, "Allowlist minted"); require(totalAllowlist + amount <= MAX_ALLOWLIST, "Cannot mint amount"); require(allowlistMintActive(), "Allowlist mint not started"); require(!publicMintActive(), "Use public mint"); require( verify(proof, keccak256(abi.encodePacked(msg.sender))), "Not valid" ); require( allowlistMints[msg.sender] + amount <= 3, "Max 3 per allowlisted address" ); _internalMint(amount); allowlistMints[msg.sender] += amount; totalAllowlist += amount; } /// @notice Mints a number of Hero Dungeons. /// @dev Each dungeon costs 6000 $HEART tokens. /// @param amount The number of dungeons you want to mint. Max 20 per mint. function publicMint(uint256 amount) public payable nonReentrant { require(publicMintActive(), "Public mint not started"); require(amount <= 20, "Cannot mint more than 20"); _internalMint(amount); } uint256 ownerMinted; function ownerMint(uint256 amount) public payable nonReentrant onlyOwner { require(ownerMinted < 100, "Owner can only mint 50"); require( ownerMinted + amount <= 100, "amount + ownerMinted must be lte 100" ); _internalMint(amount); ownerMinted += amount; } /** * @dev Mints a new dungeon in exchange for Hearts. */ function _internalMint(uint256 amount) internal { require(claimed + amount <= maxSupply, "Cannot mint amount"); require(amount > 0, "Amount must be gt than 0"); if (msg.sender != owner()) { uint256 totalCost = amount * price; require(hearts.balanceOf(msg.sender) >= totalCost, "Insufficient HEARTS"); // Transfer HEARTS to this contract hearts.transferFrom(msg.sender, address(this), totalCost); } for (uint256 i = 0; i < amount; i++) { claimed += 1; uint256 tokenId = claimed; seeds[tokenId] = pluckDungeon(tokenId); // Assign a random C&C dungeon ID _mint(_msgSender(), tokenId); // Using mint vs safemint to save gas. Safemint is only required to ensure that the mintign wallet accepts ERC721's which should be the case. emit Minted(_msgSender(), tokenId); } } function setBaseUri(string memory baseUri) public onlyOwner { BASE_URI = baseUri; } function _baseURI() internal view virtual override returns (string memory) { return BASE_URI; } bool revealed; function reveal() public onlyOwner { revealed = true; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { return !revealed ? PRE_REVEAL_URI : super.tokenURI(tokenId); } /** * @dev Withdraws ETH from the contract to a specified wallet */ function withdrawETH(address payable recipient) public payable nonReentrant onlyOwner { (bool succeed, ) = recipient.call{ value: address(this).balance }(""); require(succeed, "Withdraw failed"); } /** * @dev Withdraw heart balance to specified address */ function withdrawHearts(address to) public payable onlyOwner { hearts.transfer(to, hearts.balanceOf(address(this))); } /** * @dev Proxy to retrieve dungeon layout from the Crypts and Caverns project. */ function getLayout(uint256 tokenId) public view returns (bytes memory) { require(_exists(tokenId), "Token does not exist"); // bytes memory layout = dungeons.getLayout(seeds[tokenId]); return (dungeons.getLayout(getValidDungeon(seeds[tokenId]))); // return(dungeons.getLayout(seeds[tokenId])); } /** * @dev Proxy to retrieve dungeon size from the Crypts and Caverns project. */ function getSize(uint256 tokenId) public view returns (uint256) { require(_exists(tokenId), "Token does not exist"); return (dungeons.getSize(getValidDungeon(seeds[tokenId]))); } /** * @dev Proxy to retrieve dungeon environment from the Crypts and Caverns project. */ function getEnvironment(uint256 tokenId) public view returns (uint256) { require(_exists(tokenId), "Token does not exist"); // 2% of environments should become 'ghoul' land uint256 ghoulChance = random(seeds[tokenId] << 15, 0, 100); if (ghoulChance <= 2) { return (6); // New environment! } else { return (dungeons.getEnvironment(getValidDungeon(seeds[tokenId]))); } } /** * @dev Proxy to retrieve dungeon name from the Crypts and Caverns project. */ function getName(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "Token does not exist"); return (dungeons.getName(getValidDungeon(seeds[tokenId]))); } /** * @dev Proxy to retrieve dungeon name from the Crypts and Caverns project. */ function getNumDoors(uint256 tokenId) public view returns (uint256) { require(_exists(tokenId), "Token does not exist"); return (dungeons.getNumPoints(getValidDungeon(seeds[tokenId]))); // Points and doors are swapped due to tuple bug in original contract. } /** * @dev Proxy to retrieve dungeon name from the Crypts and Caverns project. */ function getNumPoints(uint256 tokenId) public view returns (uint256) { require(_exists(tokenId), "Token does not exist"); return (dungeons.getNumPoints(getValidDungeon(seeds[tokenId]))); // Points and doors are swapped due to tuple bug in original contract. } /** * @dev Returns the tokenId withing Crypts and Caverns that this dungeon references */ function getCnCId(uint256 tokenId) public view returns (uint256) { require(_exists(tokenId), "Token does not exist"); return (getValidDungeon(seeds[tokenId])); // Points and doors are swapped due to tuple bug in original contract. } /** * @dev Helper function to return invalid (broken) dungeons */ function getValidDungeon(uint256 seed) public pure returns (uint256) { // Input: Index of dungeon // Output: Index of valid dungeon (skips broken dungeons) // 1 => 1 // 2 => 2 // 270 => 271 // 271 => 272 // ... // 684 => 686 // 685 => 687 if (seed < 270) { // 1->269 return (seed); } else if (seed < 685 - 1) { // Filter 685 return (seed + 1); } else if (seed + 1 < 1135 - 1) { // Filter 1135 return (seed + 2); } else if (seed + 2 < 1807 - 1) { // Filter 1807 return (seed + 3); } else if (seed + 3 < 3032 - 1) { // Filter 3032 return (seed + 4); } else if (seed + 4 < 4706 - 1) { // Filter 4706 return (seed + 5); } else if (seed + 5 < 5947 - 1) { // Filter 5947 return (seed + 6); } else if (seed + 6 < 6421 - 1) { // Filter 6421 return (seed + 7); } else if (seed + 7 < 7162 - 1) { // Filter 7162 return (seed + 8); } else if (seed + 8 < 7730 - 1) { // Filter 7730 return (seed + 9); } else if (seed + 9 < 7785 - 1) { // Gap from 7785->8001 (reserved mints) return (seed + 10); } else if (seed + 226 < 8232) { // Filter 8232 return (seed + 226); } else { // 8233->9000 return (seed + 227); } } /** * @dev Randomly assigns a dungeon from the eligible list. Heroes dungeon will be based off this original dungeon layout. */ function pluckDungeon(uint256 tokenId) private returns (uint256) { // PRNG to get a dungeon IDs uint256 randomNumber = uint256( // Generates a random number from a few variables (e.g. leftToMint) keccak256( abi.encodePacked(numDungeons, tokenId + 1, blockhash(block.number - 1)) ) ); uint256 index = 1 + (randomNumber % numDungeons); // Generates random number between 1->leftToMint (e.g. 3214) uint256 dungeonId = _idSwaps[index]; if (dungeonId == 0) { dungeonId = index; } uint256 temp = _idSwaps[numDungeons]; // "swap" indexes so we don't loose any unminted ids // either it's id leftToMint or the id that was swapped with it if (temp == 0) { _idSwaps[index] = numDungeons; } else { // remove the swapped dungeon _idSwaps[index] = temp; delete _idSwaps[numDungeons]; } // decrement so we will only get [1; numDungeons] next time numDungeons--; return (dungeonId); } /* Utility Functions */ function random( uint256 input, uint256 min, uint256 max ) internal pure returns (uint256) { // Returns a random (deterministic) seed between 0-range based on an arbitrary set of inputs uint256 output = (uint256(keccak256(abi.encodePacked(input))) % (max - min)) + min; return output; } constructor( Dungeons _dungeons, Hearts _hearts, string memory _prerevealUri ) ERC721("Dungeons: A Heroes NFT Collection", "HD") Ownable() { dungeons = _dungeons; hearts = _hearts; PRE_REVEAL_URI = _prerevealUri; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual 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 || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract Dungeons","name":"_dungeons","type":"address"},{"internalType":"contract Hearts","name":"_hearts","type":"address"},{"internalType":"string","name":"_prerevealUri","type":"string"}],"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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"allowlistMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlistMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCnCId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getEnvironment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLayout","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNumDoors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNumPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"getValidDungeon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","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":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ownerMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"uint256","name":"","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setAllowListTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"}],"name":"setPublicTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setRoot","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":"totalAllowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdrawHearts","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60806040526000600e5569014542ba12a337c00000600f5563627fc3f060115563628115706012556108ba6013556122456017553480156200004057600080fd5b50604051620040f3380380620040f38339810160408190526200006391620002b1565b604051806060016040528060218152602001620040d26021913960405180604001604052806002815260200161121160f21b8152508160009080519060200190620000b092919062000187565b508051620000c690600190602084019062000187565b50506001600a5550620000e2620000dc62000131565b62000135565b600c80546001600160a01b038086166001600160a01b031992831617909255600d80549285169290911691909117905580516200012790601590602084019062000187565b505050506200047e565b3390565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200019590620003cb565b90600052602060002090601f016020900481019282620001b9576000855562000204565b82601f10620001d457805160ff191683800117855562000204565b8280016001018555821562000204579182015b8281111562000204578251825591602001919060010190620001e7565b506200021292915062000216565b5090565b5b8082111562000212576000815560010162000217565b6000620002446200023e8462000342565b6200031d565b9050828152602081018484840111156200025d57600080fd5b6200026a84828562000398565b509392505050565b80516200027f8162000464565b92915050565b600082601f8301126200029757600080fd5b8151620002a98482602086016200022d565b949350505050565b600080600060608486031215620002c757600080fd5b6000620002d5868662000272565b9350506020620002e88682870162000272565b92505060408401516001600160401b038111156200030557600080fd5b620003138682870162000285565b9150509250925092565b6000620003296200033c565b9050620003378282620003fc565b919050565b60405190565b60006001600160401b038211156200035e576200035e62000444565b62000369826200045a565b60200192915050565b60006200027f826200038c565b60006200027f8262000372565b6001600160a01b031690565b60005b83811015620003b55781810151838201526020016200039b565b83811115620003c5576000848401525b50505050565b600281046001821680620003e057607f821691505b60208210811415620003f657620003f66200042e565b50919050565b62000407826200045a565b81018181106001600160401b038211171562000427576200042762000444565b6040525050565b634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f01601f191690565b6200046f816200037f565b81146200047b57600080fd5b50565b613c44806200048e6000396000f3fe6080604052600436106102935760003560e01c80637cdee4d71161015a578063b88d4fde116100c1578063e834a8341161007a578063e834a8341461074a578063e985e9c51461075f578063ebf0c7171461077f578063f0503e8014610794578063f19e75d4146107b4578063f2fde38b146107c757610293565b8063b88d4fde146106b5578063c73d06a9146106d5578063c87b56dd146106f5578063d5abeb0114610715578063dab5f3401461072a578063db9ee4451461042757610293565b8063972a2a6211610113578063972a2a6214610616578063a035b1fe14610636578063a0bcfc7f1461064b578063a22cb4651461066b578063a475b5dd1461068b578063b67c25a3146106a057610293565b80637cdee4d7146105775780638d6cc56d146105975780638da5cb5b146105b75780638f23fcf6146105cc5780639237ea74146105e157806395d89b411461060157610293565b80633bb31416116101fe578063690d8320116101b7578063690d8320146104da5780636b8ff574146104ed5780636db408001461050d57806370a082311461052d578063715018a61461054d5780637417d6cc1461056257610293565b80633bb314161461042757806342842e0e146104475780634e961609146104675780634f6ccce71461047a578063562ea2991461049a5780636352211e146104ba57610293565b80631338a83f116102505780631338a83f1461038c578063150c5c261461039f57806318160ddd146103bf57806323b872dd146103d45780632db11544146103f45780632f745c591461040757610293565b8063012921351461029857806301ffc9a7146102ce578063023c23db146102fb57806306fdde0314610328578063081812fc1461033d578063095ea7b31461036a575b600080fd5b3480156102a457600080fd5b506102b86102b3366004612b4a565b6107e7565b6040516102c59190613149565b60405180910390f35b3480156102da57600080fd5b506102ee6102e9366004612b68565b6108bc565b6040516102c5919061312d565b34801561030757600080fd5b5061031b610316366004612b4a565b6108e1565b6040516102c5919061313b565b34801561033457600080fd5b506102b86109a1565b34801561034957600080fd5b5061035d610358366004612b4a565b610a33565b6040516102c59190613098565b34801561037657600080fd5b5061038a610385366004612ac6565b610a76565b005b61038a61039a366004612af6565b610b0e565b3480156103ab57600080fd5b5061038a6103ba366004612b4a565b610ca8565b3480156103cb57600080fd5b5061031b610cec565b3480156103e057600080fd5b5061038a6103ef3660046129d0565b610cf2565b61038a610402366004612b4a565b610d2a565b34801561041357600080fd5b5061031b610422366004612ac6565b610da8565b34801561043357600080fd5b5061031b610442366004612b4a565b610dfd565b34801561045357600080fd5b5061038a6104623660046129d0565b610e51565b61038a610475366004612978565b610e6c565b34801561048657600080fd5b5061031b610495366004612b4a565b610fa8565b3480156104a657600080fd5b5061031b6104b5366004612b4a565b611003565b3480156104c657600080fd5b5061035d6104d5366004612b4a565b611042565b61038a6104e8366004612978565b611077565b3480156104f957600080fd5b506102b8610508366004612b4a565b611163565b34801561051957600080fd5b5061031b610528366004612b4a565b6111b7565b34801561053957600080fd5b5061031b610548366004612978565b6112b7565b34801561055957600080fd5b5061038a6112fb565b34801561056e57600080fd5b506102ee611346565b34801561058357600080fd5b5061031b610592366004612978565b61134f565b3480156105a357600080fd5b5061038a6105b2366004612b4a565b611361565b3480156105c357600080fd5b5061035d6113a5565b3480156105d857600080fd5b5061031b6113b4565b3480156105ed57600080fd5b5061031b6105fc366004612b4a565b6113ba565b34801561060d57600080fd5b506102b861152a565b34801561062257600080fd5b506102ee610631366004612af6565b611539565b34801561064257600080fd5b5061031b61154f565b34801561065757600080fd5b5061038a610666366004612bd9565b611555565b34801561067757600080fd5b5061038a610686366004612a96565b6115a7565b34801561069757600080fd5b5061038a6115b9565b3480156106ac57600080fd5b506102ee611607565b3480156106c157600080fd5b5061038a6106d0366004612a1d565b611610565b3480156106e157600080fd5b5061038a6106f0366004612b4a565b61164f565b34801561070157600080fd5b506102b8610710366004612b4a565b611693565b34801561072157600080fd5b5061031b611741565b34801561073657600080fd5b5061038a610745366004612b4a565b611747565b34801561075657600080fd5b5061031b61178b565b34801561076b57600080fd5b506102ee61077a366004612996565b611791565b34801561078b57600080fd5b5061031b6117bf565b3480156107a057600080fd5b5061031b6107af366004612b4a565b6117c5565b61038a6107c2366004612b4a565b6117d7565b3480156107d357600080fd5b5061038a6107e2366004612978565b6118b6565b60606107f282611927565b6108175760405162461bcd60e51b815260040161080e906131fa565b60405180910390fd5b600c546000838152601660205260409020546001600160a01b0390911690630129213590610844906113ba565b6040518263ffffffff1660e01b8152600401610860919061313b565b60006040518083038186803b15801561087857600080fd5b505afa15801561088c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108b49190810190612ba4565b90505b919050565b60006001600160e01b0319821663780e9d6360e01b14806108b457506108b482611944565b60006108ec82611927565b6109085760405162461bcd60e51b815260040161080e906131fa565b600c546000838152601660205260409020546001600160a01b039091169063023c23db90610935906113ba565b6040518263ffffffff1660e01b8152600401610951919061313b565b60206040518083038186803b15801561096957600080fd5b505afa15801561097d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190612c0e565b6060600080546109b090613523565b80601f01602080910402602001604051908101604052809291908181526020018280546109dc90613523565b8015610a295780601f106109fe57610100808354040283529160200191610a29565b820191906000526020600020905b815481529060010190602001808311610a0c57829003601f168201915b5050505050905090565b6000610a3e82611927565b610a5a5760405162461bcd60e51b815260040161080e906132aa565b506000908152600460205260409020546001600160a01b031690565b6000610a8182611042565b9050806001600160a01b0316836001600160a01b03161415610ab55760405162461bcd60e51b815260040161080e906132fa565b806001600160a01b0316610ac7611984565b6001600160a01b03161480610ae35750610ae38161077a611984565b610aff5760405162461bcd60e51b815260040161080e9061323a565b610b098383611988565b505050565b6002600a541415610b315760405162461bcd60e51b815260040161080e9061334a565b6002600a55601354601a5410610b595760405162461bcd60e51b815260040161080e9061335a565b60135481601a54610b6a91906133e3565b1115610b885760405162461bcd60e51b815260040161080e9061322a565b610b90611346565b610bac5760405162461bcd60e51b815260040161080e9061326a565b610bb4611607565b15610bd15760405162461bcd60e51b815260040161080e9061317a565b610c018233604051602001610be69190613014565b60405160208183030381529060405280519060200120611539565b610c1d5760405162461bcd60e51b815260040161080e906132da565b33600090815260196020526040902054600390610c3b9083906133e3565b1115610c595760405162461bcd60e51b815260040161080e9061327a565b610c62816119f6565b3360009081526019602052604081208054839290610c819084906133e3565b9250508190555080601a6000828254610c9a91906133e3565b90915550506001600a555050565b610cb0611984565b6001600160a01b0316610cc16113a5565b6001600160a01b031614610ce75760405162461bcd60e51b815260040161080e906132ba565b601255565b60085490565b610d03610cfd611984565b82611c4b565b610d1f5760405162461bcd60e51b815260040161080e9061331a565b610b09838383611cd0565b6002600a541415610d4d5760405162461bcd60e51b815260040161080e9061334a565b6002600a55610d5a611607565b610d765760405162461bcd60e51b815260040161080e906131ea565b6014811115610d975760405162461bcd60e51b815260040161080e9061333a565b610da0816119f6565b506001600a55565b6000610db3836112b7565b8210610dd15760405162461bcd60e51b815260040161080e9061315a565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b6000610e0882611927565b610e245760405162461bcd60e51b815260040161080e906131fa565b600c546000838152601660205260409020546001600160a01b0390911690633bb3141690610935906113ba565b610b0983838360405180602001604052806000815250611610565b610e74611984565b6001600160a01b0316610e856113a5565b6001600160a01b031614610eab5760405162461bcd60e51b815260040161080e906132ba565b600d546040516370a0823160e01b81526001600160a01b039091169063a9059cbb90839083906370a0823190610ee5903090600401613098565b60206040518083038186803b158015610efd57600080fd5b505afa158015610f11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f359190612c0e565b6040518363ffffffff1660e01b8152600401610f52929190613112565b602060405180830381600087803b158015610f6c57600080fd5b505af1158015610f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa49190612b2c565b5050565b6000610fb2610cec565b8210610fd05760405162461bcd60e51b815260040161080e9061332a565b60088281548110610ff157634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600061100e82611927565b61102a5760405162461bcd60e51b815260040161080e906131fa565b6000828152601660205260409020546108b4906113ba565b6000818152600260205260408120546001600160a01b0316806108b45760405162461bcd60e51b815260040161080e9061325a565b6002600a54141561109a5760405162461bcd60e51b815260040161080e9061334a565b6002600a556110a7611984565b6001600160a01b03166110b86113a5565b6001600160a01b0316146110de5760405162461bcd60e51b815260040161080e906132ba565b6000816001600160a01b0316476040516110f790613041565b60006040518083038185875af1925050503d8060008114611134576040519150601f19603f3d011682016040523d82523d6000602084013e611139565b606091505b505090508061115a5760405162461bcd60e51b815260040161080e906131ba565b50506001600a55565b606061116e82611927565b61118a5760405162461bcd60e51b815260040161080e906131fa565b600c546000838152601660205260409020546001600160a01b0390911690636b8ff57490610844906113ba565b60006111c282611927565b6111de5760405162461bcd60e51b815260040161080e906131fa565b6000828152601660205260408120546111fc90600f1b826064611e03565b9050600281116112105760069150506108b7565b600c546000848152601660205260409020546001600160a01b0390911690636db408009061123d906113ba565b6040518263ffffffff1660e01b8152600401611259919061313b565b60206040518083038186803b15801561127157600080fd5b505afa158015611285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a99190612c0e565b9150506108b7565b50919050565b60006001600160a01b0382166112df5760405162461bcd60e51b815260040161080e9061324a565b506001600160a01b031660009081526003602052604090205490565b611303611984565b6001600160a01b03166113146113a5565b6001600160a01b03161461133a5760405162461bcd60e51b815260040161080e906132ba565b6113446000611e58565b565b60115442101590565b60196020526000908152604090205481565b611369611984565b6001600160a01b031661137a6113a5565b6001600160a01b0316146113a05760405162461bcd60e51b815260040161080e906132ba565b600f55565b600b546001600160a01b031690565b601a5481565b600061010e8210156113cd5750806108b7565b6102ac8210156113e9576113e28260016133e3565b90506108b7565b61046e6113f78360016133e3565b1015611408576113e28260026133e3565b61070e6114168360026133e3565b1015611427576113e28260036133e3565b610bd76114358360036133e3565b1015611446576113e28260046133e3565b6112616114548360046133e3565b1015611465576113e28260056133e3565b61173a6114738360056133e3565b1015611484576113e28260066133e3565b6119146114928360066133e3565b10156114a3576113e28260076133e3565b611bf96114b18360076133e3565b10156114c2576113e28260086133e3565b611e316114d08360086133e3565b10156114e1576113e28260096133e3565b611e686114ef8360096133e3565b1015611500576113e282600a6133e3565b61202861150e8360e26133e3565b101561151f576113e28260e26133e3565b6113e28260e36133e3565b6060600180546109b090613523565b60006115488360105484611eaa565b9392505050565b600f5481565b61155d611984565b6001600160a01b031661156e6113a5565b6001600160a01b0316146115945760405162461bcd60e51b815260040161080e906132ba565b8051610fa4906014906020840190612765565b610fa46115b2611984565b8383611ec0565b6115c1611984565b6001600160a01b03166115d26113a5565b6001600160a01b0316146115f85760405162461bcd60e51b815260040161080e906132ba565b601c805460ff19166001179055565b60125442101590565b61162161161b611984565b83611c4b565b61163d5760405162461bcd60e51b815260040161080e9061331a565b61164984848484611f63565b50505050565b611657611984565b6001600160a01b03166116686113a5565b6001600160a01b03161461168e5760405162461bcd60e51b815260040161080e906132ba565b601155565b601c5460609060ff16156116af576116aa82611f96565b6108b4565b601580546116bc90613523565b80601f01602080910402602001604051908101604052809291908181526020018280546116e890613523565b80156117355780601f1061170a57610100808354040283529160200191611735565b820191906000526020600020905b81548152906001019060200180831161171857829003601f168201915b50505050509050919050565b610d0581565b61174f611984565b6001600160a01b03166117606113a5565b6001600160a01b0316146117865760405162461bcd60e51b815260040161080e906132ba565b601055565b600e5481565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60105481565b60166020526000908152604090205481565b6002600a5414156117fa5760405162461bcd60e51b815260040161080e9061334a565b6002600a55611807611984565b6001600160a01b03166118186113a5565b6001600160a01b03161461183e5760405162461bcd60e51b815260040161080e906132ba565b6064601b54106118605760405162461bcd60e51b815260040161080e9061321a565b606481601b5461187091906133e3565b111561188e5760405162461bcd60e51b815260040161080e9061330a565b611897816119f6565b80601b60008282546118a991906133e3565b90915550506001600a5550565b6118be611984565b6001600160a01b03166118cf6113a5565b6001600160a01b0316146118f55760405162461bcd60e51b815260040161080e906132ba565b6001600160a01b03811661191b5760405162461bcd60e51b815260040161080e9061318a565b61192481611e58565b50565b6000908152600260205260409020546001600160a01b0316151590565b60006001600160e01b031982166380ac58cd60e01b148061197557506001600160e01b03198216635b5e139f60e01b145b806108b457506108b482612018565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906119bd82611042565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610d0581600e54611a0791906133e3565b1115611a255760405162461bcd60e51b815260040161080e9061322a565b60008111611a455760405162461bcd60e51b815260040161080e906132ea565b611a4d6113a5565b6001600160a01b0316336001600160a01b031614611ba1576000600f5482611a75919061343b565b600d546040516370a0823160e01b815291925082916001600160a01b03909116906370a0823190611aaa903390600401613098565b60206040518083038186803b158015611ac257600080fd5b505afa158015611ad6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afa9190612c0e565b1015611b185760405162461bcd60e51b815260040161080e9061328a565b600d546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90611b4c903390309086906004016130a6565b602060405180830381600087803b158015611b6657600080fd5b505af1158015611b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9e9190612b2c565b50505b60005b81811015610fa4576001600e6000828254611bbf91906133e3565b9091555050600e54611bd081612031565b600082815260166020526040902055611bf0611bea611984565b8261211a565b611bf8611984565b6001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe82604051611c30919061313b565b60405180910390a25080611c4381613578565b915050611ba4565b6000611c5682611927565b611c725760405162461bcd60e51b815260040161080e9061320a565b6000611c7d83611042565b9050806001600160a01b0316846001600160a01b03161480611ca45750611ca48185611791565b80611cc85750836001600160a01b0316611cbd84610a33565b6001600160a01b0316145b949350505050565b826001600160a01b0316611ce382611042565b6001600160a01b031614611d095760405162461bcd60e51b815260040161080e9061319a565b6001600160a01b038216611d2f5760405162461bcd60e51b815260040161080e906131ca565b611d3a838383612201565b611d45600082611988565b6001600160a01b0383166000908152600360205260408120805460019290611d6e908490613470565b90915550506001600160a01b0382166000908152600360205260408120805460019290611d9c9084906133e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610b09838383610b09565b60008083611e118185613470565b86604051602001611e22919061304c565b6040516020818303038152906040528051906020012060001c611e4591906135af565b611e4f91906133e3565b95945050505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082611eb7858461228a565b14949350505050565b816001600160a01b0316836001600160a01b03161415611ef25760405162461bcd60e51b815260040161080e906131da565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611f5690859061312d565b60405180910390a3505050565b611f6e848484611cd0565b611f7a84848484612304565b6116495760405162461bcd60e51b815260040161080e9061316a565b6060611fa182611927565b611fbd5760405162461bcd60e51b815260040161080e906132ca565b6000611fc761241f565b90506000815111611fe75760405180602001604052806000815250611548565b80611ff18461242e565b604051602001612002929190613029565b6040516020818303038152906040529392505050565b6001600160e01b031981166301ffc9a760e01b14919050565b60008060175483600161204491906133e3565b61204f600143613470565b4060405160200161206293929190613061565b6040516020818303038152906040528051906020012060001c905060006017548261208d91906135af565b6120989060016133e3565b600081815260186020526040902054909150806120b25750805b601754600090815260186020526040902054806120e0576017546000848152601860205260409020556120fb565b60008381526018602052604080822083905560175482528120555b6017805490600061210b83613501565b90915550919695505050505050565b6001600160a01b0382166121405760405162461bcd60e51b815260040161080e9061329a565b61214981611927565b156121665760405162461bcd60e51b815260040161080e906131aa565b61217260008383612201565b6001600160a01b038216600090815260036020526040812080546001929061219b9084906133e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610fa460008383610b09565b61220c838383610b09565b6001600160a01b0383166122285761222381612549565b61224b565b816001600160a01b0316836001600160a01b03161461224b5761224b838261258d565b6001600160a01b038216612267576122628161262a565b610b09565b826001600160a01b0316826001600160a01b031614610b0957610b098282612703565b600081815b84518110156122fc5760008582815181106122ba57634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122dc576122d58382612747565b92506122e9565b6122e68184612747565b92505b50806122f481613578565b91505061228f565b509392505050565b6000612318846001600160a01b0316612756565b1561241457836001600160a01b031663150b7a02612334611984565b8786866040518563ffffffff1660e01b815260040161235694939291906130ce565b602060405180830381600087803b15801561237057600080fd5b505af19250505080156123a0575060408051601f3d908101601f1916820190925261239d91810190612b86565b60015b6123fa573d8080156123ce576040519150601f19603f3d011682016040523d82523d6000602084013e6123d3565b606091505b5080516123f25760405162461bcd60e51b815260040161080e9061316a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cc8565b506001949350505050565b6060601480546109b090613523565b60608161245357506040805180820190915260018152600360fc1b60208201526108b7565b8160005b811561247d578061246781613578565b91506124769050600a83613411565b9150612457565b60008167ffffffffffffffff8111156124a657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156124d0576020820181803683370190505b5090505b8415611cc8576124e5600183613470565b91506124f2600a866135af565b6124fd9060306133e3565b60f81b81838151811061252057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612542600a86613411565b94506124d4565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161259a846112b7565b6125a49190613470565b6000838152600760205260409020549091508082146125f7576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061263c90600190613470565b6000838152600960205260408120546008805493945090928490811061267257634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106126a157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806126e757634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061270e836112b7565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60009182526020526040902090565b6001600160a01b03163b151590565b82805461277190613523565b90600052602060002090601f01602090048101928261279357600085556127d9565b82601f106127ac57805160ff19168380011785556127d9565b828001600101855582156127d9579182015b828111156127d95782518255916020019190600101906127be565b506127e59291506127e9565b5090565b5b808211156127e557600081556001016127ea565b600061281161280c84613386565b61336a565b9050808382526020820190508285602086028201111561283057600080fd5b60005b8581101561285c5781612846888261290a565b8452506020928301929190910190600101612833565b5050509392505050565b600061287461280c846133aa565b90508281526020810184848401111561288c57600080fd5b6122fc8482856134c9565b60006128a561280c846133aa565b9050828152602081018484840111156128bd57600080fd5b6122fc8482856134d5565b8035610df781613bdf565b600082601f8301126128e457600080fd5b8135611cc88482602086016127fe565b8035610df781613bf3565b8051610df781613bf3565b8035610df781613bfc565b8035610df781613c05565b8051610df781613c05565b600082601f83011261293c57600080fd5b8135611cc8848260208601612866565b600082601f83011261295d57600080fd5b8151611cc8848260208601612897565b8051610df781613bfc565b60006020828403121561298a57600080fd5b6000611cc884846128c8565b600080604083850312156129a957600080fd5b60006129b585856128c8565b92505060206129c6858286016128c8565b9150509250929050565b6000806000606084860312156129e557600080fd5b60006129f186866128c8565b9350506020612a02868287016128c8565b9250506040612a138682870161290a565b9150509250925092565b60008060008060808587031215612a3357600080fd5b6000612a3f87876128c8565b9450506020612a50878288016128c8565b9350506040612a618782880161290a565b925050606085013567ffffffffffffffff811115612a7e57600080fd5b612a8a8782880161292b565b91505092959194509250565b60008060408385031215612aa957600080fd5b6000612ab585856128c8565b92505060206129c6858286016128f4565b60008060408385031215612ad957600080fd5b6000612ae585856128c8565b92505060206129c68582860161290a565b60008060408385031215612b0957600080fd5b823567ffffffffffffffff811115612b2057600080fd5b612ae5858286016128d3565b600060208284031215612b3e57600080fd5b6000611cc884846128ff565b600060208284031215612b5c57600080fd5b6000611cc8848461290a565b600060208284031215612b7a57600080fd5b6000611cc88484612915565b600060208284031215612b9857600080fd5b6000611cc88484612920565b600060208284031215612bb657600080fd5b815167ffffffffffffffff811115612bcd57600080fd5b611cc88482850161294c565b600060208284031215612beb57600080fd5b813567ffffffffffffffff811115612c0257600080fd5b611cc88482850161292b565b600060208284031215612c2057600080fd5b6000611cc8848461296d565b612c358161349d565b82525050565b612c35612c478261349d565b61359e565b612c35816134a8565b612c35816134ad565b612c35612c6a826134ad565b6134ad565b6000612c7a826133d6565b612c8481856133da565b9350612c948185602086016134d5565b612c9d81613631565b9093019392505050565b6000612cb2826133d6565b612cbc81856108b7565b9350612ccc8185602086016134d5565b9290920192915050565b6000612ce3602b836133da565b9150612cee82613641565b5060400190565b6000612d026032836133da565b9150612cee8261367b565b6000612d1a600f836133da565b9150612d25826136bc565b5060200190565b6000612d396026836133da565b9150612cee826136d3565b6000612d516025836133da565b9150612cee82613708565b6000612d69601c836133da565b9150612d258261373c565b6000612d81600f836133da565b9150612d2582613761565b6000612d996024836133da565b9150612cee82613778565b6000612db16019836133da565b9150612d25826137ab565b6000612dc96017836133da565b9150612d25826137d0565b6000612de16014836133da565b9150612d25826137f5565b6000612df9602c836133da565b9150612cee82613811565b6000612e116016836133da565b9150612d258261384c565b6000612e296012836133da565b9150612d258261386a565b6000612e416038836133da565b9150612cee82613884565b6000612e59602a836133da565b9150612cee826138d0565b6000612e716029836133da565b9150612cee82613909565b6000612e89601a836133da565b9150612d2582613941565b6000612ea1601d836133da565b9150612d2582613966565b6000612eb96013836133da565b9150612d258261398b565b6000612ed16020836133da565b9150612d25826139a6565b6000612ee9602c836133da565b9150612cee826139cb565b6000612f016020836133da565b9150612d2582613a06565b6000612f19602f836133da565b9150612cee82613a2b565b6000612f316009836133da565b9150612d2582613a69565b6000612f496018836133da565b9150612d2582613a7a565b6000612f616021836133da565b9150612cee82613a9f565b6000612f796024836133da565b9150612cee82613acf565b6000612f916000836108b7565b91506127e582611924565b6000612fa96031836133da565b9150612cee82613b02565b6000612fc1602c836133da565b9150612cee82613b42565b6000612fd96018836133da565b9150612d2582613b7d565b6000612ff1601f836133da565b9150612d2582613ba2565b60006130096010836133da565b9150612d2582613bc7565b60006130208284612c3b565b50601401919050565b60006130358285612ca7565b9150611cc88284612ca7565b6000610df782612f84565b60006130588284612c5e565b50602001919050565b600061306d8286612c5e565b60208201915061307d8285612c5e565b60208201915061308d8284612c5e565b506020019392505050565b60208101610df78284612c2c565b606081016130b48286612c2c565b6130c16020830185612c2c565b611cc86040830184612c55565b608081016130dc8287612c2c565b6130e96020830186612c2c565b6130f66040830185612c55565b81810360608301526131088184612c6f565b9695505050505050565b604081016131208285612c2c565b6115486020830184612c55565b60208101610df78284612c4c565b60208101610df78284612c55565b602080825281016115488184612c6f565b602080825281016108b481612cd6565b602080825281016108b481612cf5565b602080825281016108b481612d0d565b602080825281016108b481612d2c565b602080825281016108b481612d44565b602080825281016108b481612d5c565b602080825281016108b481612d74565b602080825281016108b481612d8c565b602080825281016108b481612da4565b602080825281016108b481612dbc565b602080825281016108b481612dd4565b602080825281016108b481612dec565b602080825281016108b481612e04565b602080825281016108b481612e1c565b602080825281016108b481612e34565b602080825281016108b481612e4c565b602080825281016108b481612e64565b602080825281016108b481612e7c565b602080825281016108b481612e94565b602080825281016108b481612eac565b602080825281016108b481612ec4565b602080825281016108b481612edc565b602080825281016108b481612ef4565b602080825281016108b481612f0c565b602080825281016108b481612f24565b602080825281016108b481612f3c565b602080825281016108b481612f54565b602080825281016108b481612f6c565b602080825281016108b481612f9c565b602080825281016108b481612fb4565b602080825281016108b481612fcc565b602080825281016108b481612fe4565b602080825281016108b481612ffc565b6000613374613380565b90506108b7828261354a565b60405190565b600067ffffffffffffffff8211156133a0576133a061361b565b5060209081020190565b600067ffffffffffffffff8211156133c4576133c461361b565b6133cd82613631565b60200192915050565b5190565b90815260200190565b60006133ee826134ad565b91506133f9836134ad565b9250821982111561340c5761340c6135d9565b500190565b600061341c826134ad565b9150613427836134ad565b925082613436576134366135ef565b500490565b6000613446826134ad565b9150613451836134ad565b925081600019048311821515161561346b5761346b6135d9565b500290565b600061347b826134ad565b9150613486836134ad565b925082821015613498576134986135d9565b500390565b60006108b4826134bd565b151590565b90565b6001600160e01b03191690565b6001600160a01b031690565b82818337506000910152565b60005b838110156134f05781810151838201526020016134d8565b838111156116495750506000910152565b600061350c826134ad565b91508161351b5761351b6135d9565b506000190190565b60028104600182168061353757607f821691505b602082108114156112b1576112b1613605565b61355382613631565b810181811067ffffffffffffffff821117156135715761357161361b565b6040525050565b6000613583826134ad565b9150600019821415613597576135976135d9565b5060010190565b60006108b48260006108b48261363b565b60006135ba826134ad565b91506135c5836134ad565b9250826135d4576135d46135ef565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f01601f191690565b60601b90565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602090910152565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b602090910152565b6e155cd9481c1d589b1a58c81b5a5b9d608a1b9052565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602090910152565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b602090910152565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000009052565b6e15da5d1a191c985dc819985a5b1959608a1b9052565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b602090910152565b7f4552433732313a20617070726f766520746f2063616c6c6572000000000000009052565b7f5075626c6963206d696e74206e6f7420737461727465640000000000000000009052565b73151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b9052565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602090910152565b7504f776e65722063616e206f6e6c79206d696e742035360541b9052565b7110d85b9b9bdd081b5a5b9d08185b5bdd5b9d60721b9052565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602090910152565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602090910152565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602090910152565b7f416c6c6f776c697374206d696e74206e6f7420737461727465640000000000009052565b7f4d617820332070657220616c6c6f776c697374656420616464726573730000009052565b72496e73756666696369656e742048454152545360681b9052565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573739052565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602090910152565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729052565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b602090910152565b68139bdd081d985b1a5960ba1b9052565b7f416d6f756e74206d757374206265206774207468616e203000000000000000009052565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b602090910152565b7f616d6f756e74202b206f776e65724d696e746564206d757374206265206c74658152630203130360e41b602090910152565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b602090910152565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602090910152565b7f43616e6e6f74206d696e74206d6f7265207468616e20323000000000000000009052565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c009052565b6f105b1b1bdddb1a5cdd081b5a5b9d195960821b9052565b613be88161349d565b811461192457600080fd5b613be8816134a8565b613be8816134ad565b613be8816134b056fea26469706673582212202ae6f37a435cd8f72ea9c27c519b7d30e3f5a32dc2d065024cbb80977d59497d64736f6c6343000801003344756e67656f6e733a2041204865726f6573204e465420436f6c6c656374696f6e00000000000000000000000086f7692569914b5060ef39aab99e62ec96a6ed45000000000000000000000000710aa623c2c881b0d7357bcf9aeedf660e606c220000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f6865726f65732e6d7970696e6174612e636c6f75642f697066732f516d635563315a6331394e555137326270514574414d525a384d326b45386141514439615a64376b645057773270000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102935760003560e01c80637cdee4d71161015a578063b88d4fde116100c1578063e834a8341161007a578063e834a8341461074a578063e985e9c51461075f578063ebf0c7171461077f578063f0503e8014610794578063f19e75d4146107b4578063f2fde38b146107c757610293565b8063b88d4fde146106b5578063c73d06a9146106d5578063c87b56dd146106f5578063d5abeb0114610715578063dab5f3401461072a578063db9ee4451461042757610293565b8063972a2a6211610113578063972a2a6214610616578063a035b1fe14610636578063a0bcfc7f1461064b578063a22cb4651461066b578063a475b5dd1461068b578063b67c25a3146106a057610293565b80637cdee4d7146105775780638d6cc56d146105975780638da5cb5b146105b75780638f23fcf6146105cc5780639237ea74146105e157806395d89b411461060157610293565b80633bb31416116101fe578063690d8320116101b7578063690d8320146104da5780636b8ff574146104ed5780636db408001461050d57806370a082311461052d578063715018a61461054d5780637417d6cc1461056257610293565b80633bb314161461042757806342842e0e146104475780634e961609146104675780634f6ccce71461047a578063562ea2991461049a5780636352211e146104ba57610293565b80631338a83f116102505780631338a83f1461038c578063150c5c261461039f57806318160ddd146103bf57806323b872dd146103d45780632db11544146103f45780632f745c591461040757610293565b8063012921351461029857806301ffc9a7146102ce578063023c23db146102fb57806306fdde0314610328578063081812fc1461033d578063095ea7b31461036a575b600080fd5b3480156102a457600080fd5b506102b86102b3366004612b4a565b6107e7565b6040516102c59190613149565b60405180910390f35b3480156102da57600080fd5b506102ee6102e9366004612b68565b6108bc565b6040516102c5919061312d565b34801561030757600080fd5b5061031b610316366004612b4a565b6108e1565b6040516102c5919061313b565b34801561033457600080fd5b506102b86109a1565b34801561034957600080fd5b5061035d610358366004612b4a565b610a33565b6040516102c59190613098565b34801561037657600080fd5b5061038a610385366004612ac6565b610a76565b005b61038a61039a366004612af6565b610b0e565b3480156103ab57600080fd5b5061038a6103ba366004612b4a565b610ca8565b3480156103cb57600080fd5b5061031b610cec565b3480156103e057600080fd5b5061038a6103ef3660046129d0565b610cf2565b61038a610402366004612b4a565b610d2a565b34801561041357600080fd5b5061031b610422366004612ac6565b610da8565b34801561043357600080fd5b5061031b610442366004612b4a565b610dfd565b34801561045357600080fd5b5061038a6104623660046129d0565b610e51565b61038a610475366004612978565b610e6c565b34801561048657600080fd5b5061031b610495366004612b4a565b610fa8565b3480156104a657600080fd5b5061031b6104b5366004612b4a565b611003565b3480156104c657600080fd5b5061035d6104d5366004612b4a565b611042565b61038a6104e8366004612978565b611077565b3480156104f957600080fd5b506102b8610508366004612b4a565b611163565b34801561051957600080fd5b5061031b610528366004612b4a565b6111b7565b34801561053957600080fd5b5061031b610548366004612978565b6112b7565b34801561055957600080fd5b5061038a6112fb565b34801561056e57600080fd5b506102ee611346565b34801561058357600080fd5b5061031b610592366004612978565b61134f565b3480156105a357600080fd5b5061038a6105b2366004612b4a565b611361565b3480156105c357600080fd5b5061035d6113a5565b3480156105d857600080fd5b5061031b6113b4565b3480156105ed57600080fd5b5061031b6105fc366004612b4a565b6113ba565b34801561060d57600080fd5b506102b861152a565b34801561062257600080fd5b506102ee610631366004612af6565b611539565b34801561064257600080fd5b5061031b61154f565b34801561065757600080fd5b5061038a610666366004612bd9565b611555565b34801561067757600080fd5b5061038a610686366004612a96565b6115a7565b34801561069757600080fd5b5061038a6115b9565b3480156106ac57600080fd5b506102ee611607565b3480156106c157600080fd5b5061038a6106d0366004612a1d565b611610565b3480156106e157600080fd5b5061038a6106f0366004612b4a565b61164f565b34801561070157600080fd5b506102b8610710366004612b4a565b611693565b34801561072157600080fd5b5061031b611741565b34801561073657600080fd5b5061038a610745366004612b4a565b611747565b34801561075657600080fd5b5061031b61178b565b34801561076b57600080fd5b506102ee61077a366004612996565b611791565b34801561078b57600080fd5b5061031b6117bf565b3480156107a057600080fd5b5061031b6107af366004612b4a565b6117c5565b61038a6107c2366004612b4a565b6117d7565b3480156107d357600080fd5b5061038a6107e2366004612978565b6118b6565b60606107f282611927565b6108175760405162461bcd60e51b815260040161080e906131fa565b60405180910390fd5b600c546000838152601660205260409020546001600160a01b0390911690630129213590610844906113ba565b6040518263ffffffff1660e01b8152600401610860919061313b565b60006040518083038186803b15801561087857600080fd5b505afa15801561088c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108b49190810190612ba4565b90505b919050565b60006001600160e01b0319821663780e9d6360e01b14806108b457506108b482611944565b60006108ec82611927565b6109085760405162461bcd60e51b815260040161080e906131fa565b600c546000838152601660205260409020546001600160a01b039091169063023c23db90610935906113ba565b6040518263ffffffff1660e01b8152600401610951919061313b565b60206040518083038186803b15801561096957600080fd5b505afa15801561097d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b49190612c0e565b6060600080546109b090613523565b80601f01602080910402602001604051908101604052809291908181526020018280546109dc90613523565b8015610a295780601f106109fe57610100808354040283529160200191610a29565b820191906000526020600020905b815481529060010190602001808311610a0c57829003601f168201915b5050505050905090565b6000610a3e82611927565b610a5a5760405162461bcd60e51b815260040161080e906132aa565b506000908152600460205260409020546001600160a01b031690565b6000610a8182611042565b9050806001600160a01b0316836001600160a01b03161415610ab55760405162461bcd60e51b815260040161080e906132fa565b806001600160a01b0316610ac7611984565b6001600160a01b03161480610ae35750610ae38161077a611984565b610aff5760405162461bcd60e51b815260040161080e9061323a565b610b098383611988565b505050565b6002600a541415610b315760405162461bcd60e51b815260040161080e9061334a565b6002600a55601354601a5410610b595760405162461bcd60e51b815260040161080e9061335a565b60135481601a54610b6a91906133e3565b1115610b885760405162461bcd60e51b815260040161080e9061322a565b610b90611346565b610bac5760405162461bcd60e51b815260040161080e9061326a565b610bb4611607565b15610bd15760405162461bcd60e51b815260040161080e9061317a565b610c018233604051602001610be69190613014565b60405160208183030381529060405280519060200120611539565b610c1d5760405162461bcd60e51b815260040161080e906132da565b33600090815260196020526040902054600390610c3b9083906133e3565b1115610c595760405162461bcd60e51b815260040161080e9061327a565b610c62816119f6565b3360009081526019602052604081208054839290610c819084906133e3565b9250508190555080601a6000828254610c9a91906133e3565b90915550506001600a555050565b610cb0611984565b6001600160a01b0316610cc16113a5565b6001600160a01b031614610ce75760405162461bcd60e51b815260040161080e906132ba565b601255565b60085490565b610d03610cfd611984565b82611c4b565b610d1f5760405162461bcd60e51b815260040161080e9061331a565b610b09838383611cd0565b6002600a541415610d4d5760405162461bcd60e51b815260040161080e9061334a565b6002600a55610d5a611607565b610d765760405162461bcd60e51b815260040161080e906131ea565b6014811115610d975760405162461bcd60e51b815260040161080e9061333a565b610da0816119f6565b506001600a55565b6000610db3836112b7565b8210610dd15760405162461bcd60e51b815260040161080e9061315a565b506001600160a01b03821660009081526006602090815260408083208484529091529020545b92915050565b6000610e0882611927565b610e245760405162461bcd60e51b815260040161080e906131fa565b600c546000838152601660205260409020546001600160a01b0390911690633bb3141690610935906113ba565b610b0983838360405180602001604052806000815250611610565b610e74611984565b6001600160a01b0316610e856113a5565b6001600160a01b031614610eab5760405162461bcd60e51b815260040161080e906132ba565b600d546040516370a0823160e01b81526001600160a01b039091169063a9059cbb90839083906370a0823190610ee5903090600401613098565b60206040518083038186803b158015610efd57600080fd5b505afa158015610f11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f359190612c0e565b6040518363ffffffff1660e01b8152600401610f52929190613112565b602060405180830381600087803b158015610f6c57600080fd5b505af1158015610f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa49190612b2c565b5050565b6000610fb2610cec565b8210610fd05760405162461bcd60e51b815260040161080e9061332a565b60088281548110610ff157634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600061100e82611927565b61102a5760405162461bcd60e51b815260040161080e906131fa565b6000828152601660205260409020546108b4906113ba565b6000818152600260205260408120546001600160a01b0316806108b45760405162461bcd60e51b815260040161080e9061325a565b6002600a54141561109a5760405162461bcd60e51b815260040161080e9061334a565b6002600a556110a7611984565b6001600160a01b03166110b86113a5565b6001600160a01b0316146110de5760405162461bcd60e51b815260040161080e906132ba565b6000816001600160a01b0316476040516110f790613041565b60006040518083038185875af1925050503d8060008114611134576040519150601f19603f3d011682016040523d82523d6000602084013e611139565b606091505b505090508061115a5760405162461bcd60e51b815260040161080e906131ba565b50506001600a55565b606061116e82611927565b61118a5760405162461bcd60e51b815260040161080e906131fa565b600c546000838152601660205260409020546001600160a01b0390911690636b8ff57490610844906113ba565b60006111c282611927565b6111de5760405162461bcd60e51b815260040161080e906131fa565b6000828152601660205260408120546111fc90600f1b826064611e03565b9050600281116112105760069150506108b7565b600c546000848152601660205260409020546001600160a01b0390911690636db408009061123d906113ba565b6040518263ffffffff1660e01b8152600401611259919061313b565b60206040518083038186803b15801561127157600080fd5b505afa158015611285573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112a99190612c0e565b9150506108b7565b50919050565b60006001600160a01b0382166112df5760405162461bcd60e51b815260040161080e9061324a565b506001600160a01b031660009081526003602052604090205490565b611303611984565b6001600160a01b03166113146113a5565b6001600160a01b03161461133a5760405162461bcd60e51b815260040161080e906132ba565b6113446000611e58565b565b60115442101590565b60196020526000908152604090205481565b611369611984565b6001600160a01b031661137a6113a5565b6001600160a01b0316146113a05760405162461bcd60e51b815260040161080e906132ba565b600f55565b600b546001600160a01b031690565b601a5481565b600061010e8210156113cd5750806108b7565b6102ac8210156113e9576113e28260016133e3565b90506108b7565b61046e6113f78360016133e3565b1015611408576113e28260026133e3565b61070e6114168360026133e3565b1015611427576113e28260036133e3565b610bd76114358360036133e3565b1015611446576113e28260046133e3565b6112616114548360046133e3565b1015611465576113e28260056133e3565b61173a6114738360056133e3565b1015611484576113e28260066133e3565b6119146114928360066133e3565b10156114a3576113e28260076133e3565b611bf96114b18360076133e3565b10156114c2576113e28260086133e3565b611e316114d08360086133e3565b10156114e1576113e28260096133e3565b611e686114ef8360096133e3565b1015611500576113e282600a6133e3565b61202861150e8360e26133e3565b101561151f576113e28260e26133e3565b6113e28260e36133e3565b6060600180546109b090613523565b60006115488360105484611eaa565b9392505050565b600f5481565b61155d611984565b6001600160a01b031661156e6113a5565b6001600160a01b0316146115945760405162461bcd60e51b815260040161080e906132ba565b8051610fa4906014906020840190612765565b610fa46115b2611984565b8383611ec0565b6115c1611984565b6001600160a01b03166115d26113a5565b6001600160a01b0316146115f85760405162461bcd60e51b815260040161080e906132ba565b601c805460ff19166001179055565b60125442101590565b61162161161b611984565b83611c4b565b61163d5760405162461bcd60e51b815260040161080e9061331a565b61164984848484611f63565b50505050565b611657611984565b6001600160a01b03166116686113a5565b6001600160a01b03161461168e5760405162461bcd60e51b815260040161080e906132ba565b601155565b601c5460609060ff16156116af576116aa82611f96565b6108b4565b601580546116bc90613523565b80601f01602080910402602001604051908101604052809291908181526020018280546116e890613523565b80156117355780601f1061170a57610100808354040283529160200191611735565b820191906000526020600020905b81548152906001019060200180831161171857829003601f168201915b50505050509050919050565b610d0581565b61174f611984565b6001600160a01b03166117606113a5565b6001600160a01b0316146117865760405162461bcd60e51b815260040161080e906132ba565b601055565b600e5481565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60105481565b60166020526000908152604090205481565b6002600a5414156117fa5760405162461bcd60e51b815260040161080e9061334a565b6002600a55611807611984565b6001600160a01b03166118186113a5565b6001600160a01b03161461183e5760405162461bcd60e51b815260040161080e906132ba565b6064601b54106118605760405162461bcd60e51b815260040161080e9061321a565b606481601b5461187091906133e3565b111561188e5760405162461bcd60e51b815260040161080e9061330a565b611897816119f6565b80601b60008282546118a991906133e3565b90915550506001600a5550565b6118be611984565b6001600160a01b03166118cf6113a5565b6001600160a01b0316146118f55760405162461bcd60e51b815260040161080e906132ba565b6001600160a01b03811661191b5760405162461bcd60e51b815260040161080e9061318a565b61192481611e58565b50565b6000908152600260205260409020546001600160a01b0316151590565b60006001600160e01b031982166380ac58cd60e01b148061197557506001600160e01b03198216635b5e139f60e01b145b806108b457506108b482612018565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906119bd82611042565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610d0581600e54611a0791906133e3565b1115611a255760405162461bcd60e51b815260040161080e9061322a565b60008111611a455760405162461bcd60e51b815260040161080e906132ea565b611a4d6113a5565b6001600160a01b0316336001600160a01b031614611ba1576000600f5482611a75919061343b565b600d546040516370a0823160e01b815291925082916001600160a01b03909116906370a0823190611aaa903390600401613098565b60206040518083038186803b158015611ac257600080fd5b505afa158015611ad6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afa9190612c0e565b1015611b185760405162461bcd60e51b815260040161080e9061328a565b600d546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90611b4c903390309086906004016130a6565b602060405180830381600087803b158015611b6657600080fd5b505af1158015611b7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9e9190612b2c565b50505b60005b81811015610fa4576001600e6000828254611bbf91906133e3565b9091555050600e54611bd081612031565b600082815260166020526040902055611bf0611bea611984565b8261211a565b611bf8611984565b6001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe82604051611c30919061313b565b60405180910390a25080611c4381613578565b915050611ba4565b6000611c5682611927565b611c725760405162461bcd60e51b815260040161080e9061320a565b6000611c7d83611042565b9050806001600160a01b0316846001600160a01b03161480611ca45750611ca48185611791565b80611cc85750836001600160a01b0316611cbd84610a33565b6001600160a01b0316145b949350505050565b826001600160a01b0316611ce382611042565b6001600160a01b031614611d095760405162461bcd60e51b815260040161080e9061319a565b6001600160a01b038216611d2f5760405162461bcd60e51b815260040161080e906131ca565b611d3a838383612201565b611d45600082611988565b6001600160a01b0383166000908152600360205260408120805460019290611d6e908490613470565b90915550506001600160a01b0382166000908152600360205260408120805460019290611d9c9084906133e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610b09838383610b09565b60008083611e118185613470565b86604051602001611e22919061304c565b6040516020818303038152906040528051906020012060001c611e4591906135af565b611e4f91906133e3565b95945050505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082611eb7858461228a565b14949350505050565b816001600160a01b0316836001600160a01b03161415611ef25760405162461bcd60e51b815260040161080e906131da565b6001600160a01b0383811660008181526005602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611f5690859061312d565b60405180910390a3505050565b611f6e848484611cd0565b611f7a84848484612304565b6116495760405162461bcd60e51b815260040161080e9061316a565b6060611fa182611927565b611fbd5760405162461bcd60e51b815260040161080e906132ca565b6000611fc761241f565b90506000815111611fe75760405180602001604052806000815250611548565b80611ff18461242e565b604051602001612002929190613029565b6040516020818303038152906040529392505050565b6001600160e01b031981166301ffc9a760e01b14919050565b60008060175483600161204491906133e3565b61204f600143613470565b4060405160200161206293929190613061565b6040516020818303038152906040528051906020012060001c905060006017548261208d91906135af565b6120989060016133e3565b600081815260186020526040902054909150806120b25750805b601754600090815260186020526040902054806120e0576017546000848152601860205260409020556120fb565b60008381526018602052604080822083905560175482528120555b6017805490600061210b83613501565b90915550919695505050505050565b6001600160a01b0382166121405760405162461bcd60e51b815260040161080e9061329a565b61214981611927565b156121665760405162461bcd60e51b815260040161080e906131aa565b61217260008383612201565b6001600160a01b038216600090815260036020526040812080546001929061219b9084906133e3565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610fa460008383610b09565b61220c838383610b09565b6001600160a01b0383166122285761222381612549565b61224b565b816001600160a01b0316836001600160a01b03161461224b5761224b838261258d565b6001600160a01b038216612267576122628161262a565b610b09565b826001600160a01b0316826001600160a01b031614610b0957610b098282612703565b600081815b84518110156122fc5760008582815181106122ba57634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122dc576122d58382612747565b92506122e9565b6122e68184612747565b92505b50806122f481613578565b91505061228f565b509392505050565b6000612318846001600160a01b0316612756565b1561241457836001600160a01b031663150b7a02612334611984565b8786866040518563ffffffff1660e01b815260040161235694939291906130ce565b602060405180830381600087803b15801561237057600080fd5b505af19250505080156123a0575060408051601f3d908101601f1916820190925261239d91810190612b86565b60015b6123fa573d8080156123ce576040519150601f19603f3d011682016040523d82523d6000602084013e6123d3565b606091505b5080516123f25760405162461bcd60e51b815260040161080e9061316a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cc8565b506001949350505050565b6060601480546109b090613523565b60608161245357506040805180820190915260018152600360fc1b60208201526108b7565b8160005b811561247d578061246781613578565b91506124769050600a83613411565b9150612457565b60008167ffffffffffffffff8111156124a657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156124d0576020820181803683370190505b5090505b8415611cc8576124e5600183613470565b91506124f2600a866135af565b6124fd9060306133e3565b60f81b81838151811061252057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612542600a86613411565b94506124d4565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600161259a846112b7565b6125a49190613470565b6000838152600760205260409020549091508082146125f7576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061263c90600190613470565b6000838152600960205260408120546008805493945090928490811061267257634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600883815481106126a157634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806126e757634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061270e836112b7565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60009182526020526040902090565b6001600160a01b03163b151590565b82805461277190613523565b90600052602060002090601f01602090048101928261279357600085556127d9565b82601f106127ac57805160ff19168380011785556127d9565b828001600101855582156127d9579182015b828111156127d95782518255916020019190600101906127be565b506127e59291506127e9565b5090565b5b808211156127e557600081556001016127ea565b600061281161280c84613386565b61336a565b9050808382526020820190508285602086028201111561283057600080fd5b60005b8581101561285c5781612846888261290a565b8452506020928301929190910190600101612833565b5050509392505050565b600061287461280c846133aa565b90508281526020810184848401111561288c57600080fd5b6122fc8482856134c9565b60006128a561280c846133aa565b9050828152602081018484840111156128bd57600080fd5b6122fc8482856134d5565b8035610df781613bdf565b600082601f8301126128e457600080fd5b8135611cc88482602086016127fe565b8035610df781613bf3565b8051610df781613bf3565b8035610df781613bfc565b8035610df781613c05565b8051610df781613c05565b600082601f83011261293c57600080fd5b8135611cc8848260208601612866565b600082601f83011261295d57600080fd5b8151611cc8848260208601612897565b8051610df781613bfc565b60006020828403121561298a57600080fd5b6000611cc884846128c8565b600080604083850312156129a957600080fd5b60006129b585856128c8565b92505060206129c6858286016128c8565b9150509250929050565b6000806000606084860312156129e557600080fd5b60006129f186866128c8565b9350506020612a02868287016128c8565b9250506040612a138682870161290a565b9150509250925092565b60008060008060808587031215612a3357600080fd5b6000612a3f87876128c8565b9450506020612a50878288016128c8565b9350506040612a618782880161290a565b925050606085013567ffffffffffffffff811115612a7e57600080fd5b612a8a8782880161292b565b91505092959194509250565b60008060408385031215612aa957600080fd5b6000612ab585856128c8565b92505060206129c6858286016128f4565b60008060408385031215612ad957600080fd5b6000612ae585856128c8565b92505060206129c68582860161290a565b60008060408385031215612b0957600080fd5b823567ffffffffffffffff811115612b2057600080fd5b612ae5858286016128d3565b600060208284031215612b3e57600080fd5b6000611cc884846128ff565b600060208284031215612b5c57600080fd5b6000611cc8848461290a565b600060208284031215612b7a57600080fd5b6000611cc88484612915565b600060208284031215612b9857600080fd5b6000611cc88484612920565b600060208284031215612bb657600080fd5b815167ffffffffffffffff811115612bcd57600080fd5b611cc88482850161294c565b600060208284031215612beb57600080fd5b813567ffffffffffffffff811115612c0257600080fd5b611cc88482850161292b565b600060208284031215612c2057600080fd5b6000611cc8848461296d565b612c358161349d565b82525050565b612c35612c478261349d565b61359e565b612c35816134a8565b612c35816134ad565b612c35612c6a826134ad565b6134ad565b6000612c7a826133d6565b612c8481856133da565b9350612c948185602086016134d5565b612c9d81613631565b9093019392505050565b6000612cb2826133d6565b612cbc81856108b7565b9350612ccc8185602086016134d5565b9290920192915050565b6000612ce3602b836133da565b9150612cee82613641565b5060400190565b6000612d026032836133da565b9150612cee8261367b565b6000612d1a600f836133da565b9150612d25826136bc565b5060200190565b6000612d396026836133da565b9150612cee826136d3565b6000612d516025836133da565b9150612cee82613708565b6000612d69601c836133da565b9150612d258261373c565b6000612d81600f836133da565b9150612d2582613761565b6000612d996024836133da565b9150612cee82613778565b6000612db16019836133da565b9150612d25826137ab565b6000612dc96017836133da565b9150612d25826137d0565b6000612de16014836133da565b9150612d25826137f5565b6000612df9602c836133da565b9150612cee82613811565b6000612e116016836133da565b9150612d258261384c565b6000612e296012836133da565b9150612d258261386a565b6000612e416038836133da565b9150612cee82613884565b6000612e59602a836133da565b9150612cee826138d0565b6000612e716029836133da565b9150612cee82613909565b6000612e89601a836133da565b9150612d2582613941565b6000612ea1601d836133da565b9150612d2582613966565b6000612eb96013836133da565b9150612d258261398b565b6000612ed16020836133da565b9150612d25826139a6565b6000612ee9602c836133da565b9150612cee826139cb565b6000612f016020836133da565b9150612d2582613a06565b6000612f19602f836133da565b9150612cee82613a2b565b6000612f316009836133da565b9150612d2582613a69565b6000612f496018836133da565b9150612d2582613a7a565b6000612f616021836133da565b9150612cee82613a9f565b6000612f796024836133da565b9150612cee82613acf565b6000612f916000836108b7565b91506127e582611924565b6000612fa96031836133da565b9150612cee82613b02565b6000612fc1602c836133da565b9150612cee82613b42565b6000612fd96018836133da565b9150612d2582613b7d565b6000612ff1601f836133da565b9150612d2582613ba2565b60006130096010836133da565b9150612d2582613bc7565b60006130208284612c3b565b50601401919050565b60006130358285612ca7565b9150611cc88284612ca7565b6000610df782612f84565b60006130588284612c5e565b50602001919050565b600061306d8286612c5e565b60208201915061307d8285612c5e565b60208201915061308d8284612c5e565b506020019392505050565b60208101610df78284612c2c565b606081016130b48286612c2c565b6130c16020830185612c2c565b611cc86040830184612c55565b608081016130dc8287612c2c565b6130e96020830186612c2c565b6130f66040830185612c55565b81810360608301526131088184612c6f565b9695505050505050565b604081016131208285612c2c565b6115486020830184612c55565b60208101610df78284612c4c565b60208101610df78284612c55565b602080825281016115488184612c6f565b602080825281016108b481612cd6565b602080825281016108b481612cf5565b602080825281016108b481612d0d565b602080825281016108b481612d2c565b602080825281016108b481612d44565b602080825281016108b481612d5c565b602080825281016108b481612d74565b602080825281016108b481612d8c565b602080825281016108b481612da4565b602080825281016108b481612dbc565b602080825281016108b481612dd4565b602080825281016108b481612dec565b602080825281016108b481612e04565b602080825281016108b481612e1c565b602080825281016108b481612e34565b602080825281016108b481612e4c565b602080825281016108b481612e64565b602080825281016108b481612e7c565b602080825281016108b481612e94565b602080825281016108b481612eac565b602080825281016108b481612ec4565b602080825281016108b481612edc565b602080825281016108b481612ef4565b602080825281016108b481612f0c565b602080825281016108b481612f24565b602080825281016108b481612f3c565b602080825281016108b481612f54565b602080825281016108b481612f6c565b602080825281016108b481612f9c565b602080825281016108b481612fb4565b602080825281016108b481612fcc565b602080825281016108b481612fe4565b602080825281016108b481612ffc565b6000613374613380565b90506108b7828261354a565b60405190565b600067ffffffffffffffff8211156133a0576133a061361b565b5060209081020190565b600067ffffffffffffffff8211156133c4576133c461361b565b6133cd82613631565b60200192915050565b5190565b90815260200190565b60006133ee826134ad565b91506133f9836134ad565b9250821982111561340c5761340c6135d9565b500190565b600061341c826134ad565b9150613427836134ad565b925082613436576134366135ef565b500490565b6000613446826134ad565b9150613451836134ad565b925081600019048311821515161561346b5761346b6135d9565b500290565b600061347b826134ad565b9150613486836134ad565b925082821015613498576134986135d9565b500390565b60006108b4826134bd565b151590565b90565b6001600160e01b03191690565b6001600160a01b031690565b82818337506000910152565b60005b838110156134f05781810151838201526020016134d8565b838111156116495750506000910152565b600061350c826134ad565b91508161351b5761351b6135d9565b506000190190565b60028104600182168061353757607f821691505b602082108114156112b1576112b1613605565b61355382613631565b810181811067ffffffffffffffff821117156135715761357161361b565b6040525050565b6000613583826134ad565b9150600019821415613597576135976135d9565b5060010190565b60006108b48260006108b48261363b565b60006135ba826134ad565b91506135c5836134ad565b9250826135d4576135d46135ef565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f01601f191690565b60601b90565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602090910152565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b602090910152565b6e155cd9481c1d589b1a58c81b5a5b9d608a1b9052565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602090910152565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742081526437bbb732b960d91b602090910152565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000009052565b6e15da5d1a191c985dc819985a5b1959608a1b9052565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b602090910152565b7f4552433732313a20617070726f766520746f2063616c6c6572000000000000009052565b7f5075626c6963206d696e74206e6f7420737461727465640000000000000000009052565b73151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b9052565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602090910152565b7504f776e65722063616e206f6e6c79206d696e742035360541b9052565b7110d85b9b9bdd081b5a5b9d08185b5bdd5b9d60721b9052565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602090910152565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602090910152565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602090910152565b7f416c6c6f776c697374206d696e74206e6f7420737461727465640000000000009052565b7f4d617820332070657220616c6c6f776c697374656420616464726573730000009052565b72496e73756666696369656e742048454152545360681b9052565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573739052565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602090910152565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65729052565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b602090910152565b68139bdd081d985b1a5960ba1b9052565b7f416d6f756e74206d757374206265206774207468616e203000000000000000009052565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b602090910152565b7f616d6f756e74202b206f776e65724d696e746564206d757374206265206c74658152630203130360e41b602090910152565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b602090910152565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602090910152565b7f43616e6e6f74206d696e74206d6f7265207468616e20323000000000000000009052565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c009052565b6f105b1b1bdddb1a5cdd081b5a5b9d195960821b9052565b613be88161349d565b811461192457600080fd5b613be8816134a8565b613be8816134ad565b613be8816134b056fea26469706673582212202ae6f37a435cd8f72ea9c27c519b7d30e3f5a32dc2d065024cbb80977d59497d64736f6c63430008010033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000086f7692569914b5060ef39aab99e62ec96a6ed45000000000000000000000000710aa623c2c881b0d7357bcf9aeedf660e606c220000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f6865726f65732e6d7970696e6174612e636c6f75642f697066732f516d635563315a6331394e555137326270514574414d525a384d326b45386141514439615a64376b645057773270000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _dungeons (address): 0x86f7692569914B5060Ef39aAb99e62eC96A6Ed45
Arg [1] : _hearts (address): 0x710Aa623c2c881b0d7357bCf9aEedf660E606C22
Arg [2] : _prerevealUri (string): https://heroes.mypinata.cloud/ipfs/QmcUc1Zc19NUQ72bpQEtAMRZ8M2kE8aAQD9aZd7kdPWw2p
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000086f7692569914b5060ef39aab99e62ec96a6ed45
Arg [1] : 000000000000000000000000710aa623c2c881b0d7357bcf9aeedf660e606c22
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [4] : 68747470733a2f2f6865726f65732e6d7970696e6174612e636c6f75642f6970
Arg [5] : 66732f516d635563315a6331394e555137326270514574414d525a384d326b45
Arg [6] : 386141514439615a64376b645057773270000000000000000000000000000000
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.