Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
6,600 HOTM
Holders
2,517
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 HOTMLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HeroesMetaverseTLEV2
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Heroes of the Metaverse: The Last Essence V2 pragma solidity ^0.8.7; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@chainlink/contracts/src/v0.8/KeeperCompatible.sol"; interface IHeroesMetaverseTLE { function balanceOf(address) external view returns (uint256); } contract HeroesMetaverseTLEV2 is ERC721A, Ownable, VRFConsumerBaseV2, KeeperCompatibleInterface { // VRF V2 VRFCoordinatorV2Interface COORDINATOR; uint32 callbackGasLimit = 100000; uint16 requestConfirmations = 3; uint32 numWords = 1; uint256 public chainlinkRequestId; bytes32 public chainlinkKeyHash; uint64 private chainlinkSubscriptionId; // Contract uint256 public immutable maxSupply; string public constant provenance = "eaafaca161f3508ddafa27006834e0911d1dd932f36567f4b626cc138d3e8b0a"; address public heroesContract = 0x1ecD6F0624cc9F20b30913bc081f94E1A7004271; // Mint uint256 public constant maxTokensPerWallet = 1; uint256 public constant commonHeroMultiplier = 2; uint256 public constant luckyHeroMultiplier = 3; uint256 public constant holderMultiplier = 10; // Token mapping(uint256 => string) gender; uint256 public offset; // Reservations uint256 public immutable amountForDevs; uint256 public immutable amountForProject; // MKT, gifts, givaways, etc uint256 public immutable maxBatchSize; // Operations string public baseURI; string private preRevealURI; bool public isMintOpen = false; bool public isHolderMintOn = false; bool public isGenderSwapOn = false; bool public revealed = false; address regentAddress; uint256 public withdrawInterval = 604800; // Week long in seconds uint256 public lastWithdraw; uint256 public regentInterval = 7776000; // 3 months in seconds uint256 public lastRegent; mapping(address => bool) public luckyHeroClaimed; constructor( uint256 _maxSupply, uint256 _amountForDevs, uint256 _amountForProject, uint256 _maxBatchSize, string memory _preRevealURI, address _vrfCoordinator, address _heroesContract ) ERC721A("HeroesMetaverseTLEV2", "HOTM") VRFConsumerBaseV2(_vrfCoordinator) { COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator); require(_amountForProject + _amountForDevs <= _maxSupply, "HOTM.constructor: Max supply should be higher than amount for devs"); maxSupply = _maxSupply; amountForDevs = _amountForDevs; amountForProject = _amountForProject; maxBatchSize = _maxBatchSize; regentAddress = msg.sender; preRevealURI = _preRevealURI; lastWithdraw = block.timestamp; heroesContract = _heroesContract; } /* Modifiers */ modifier availableReq(uint256 _quantity) { require(totalSupply() + _quantity <= maxSupply, "HOTM.mint: All heroes recruited"); _; } function _baseMintReq(uint256 _quantity, bool _isHolder) internal view availableReq(_quantity) { require(isMintOpen || _isHolder, "HOTM.mint: Open only for OG holders"); bool notMinted = _numberMinted(msg.sender) == 0; uint256 mintQty = _numberMinted(msg.sender); require( ((notMinted && luckyHeroClaimed[msg.sender] == false) || (_isHolder && mintQty == luckyHeroMultiplier && luckyHeroClaimed[msg.sender] == true)), "HOTM.mint: Already Minted" ); } /* Minting */ function mint() external { require(isMintOpen || isHolderMintOn, "HOTM.mint: Mint is not live"); uint256 prevMinted = IHeroesMetaverseTLE(heroesContract).balanceOf(msg.sender); uint256 quantity = prevMinted > 0 ? prevMinted * holderMultiplier : commonHeroMultiplier; _baseMintReq(quantity, prevMinted > 0); _safeMint(msg.sender, quantity); } function luckyHeroMint(address _luckyHeroAddress) external onlyOwner availableReq(luckyHeroMultiplier) { require(luckyHeroClaimed[_luckyHeroAddress] == false, "HOTM.mint: Already claimed"); _safeMint(_luckyHeroAddress, luckyHeroMultiplier); luckyHeroClaimed[_luckyHeroAddress] = true; } function devMint(uint256 _quantity, address _devAddress) external onlyOwner availableReq(_quantity) { require(_quantity % maxBatchSize == 0, "HOTM.devMint: Can only mint a multiple of the maxBatchSize"); uint256 numChunks = _quantity / maxBatchSize; for (uint256 i = 0; i < numChunks; i++) { _safeMint(_devAddress, maxBatchSize); } } /* Operations */ function setBaseURI(string calldata baseUri_) external onlyOwner { baseURI = baseUri_; } function _baseURI() internal view override(ERC721A) returns (string memory) { return baseURI; } function setOpenMint(bool _isOn) external onlyOwner { isMintOpen = _isOn; } function setHolderMint(bool _isOn) external onlyOwner { isHolderMintOn = _isOn; } function setGenderSwapOn(bool _isOn) external onlyOwner { isGenderSwapOn = _isOn; } /* Reveal Operations */ function setChainlinkConfig(bytes32 _keyhash, uint64 _subscriptionId) external onlyOwner { chainlinkKeyHash = _keyhash; chainlinkSubscriptionId = _subscriptionId; } function startReveal(string memory baseUri_) external onlyOwner { require(!revealed, "HOTM.Reveal: Already Revealed"); baseURI = baseUri_; chainlinkRequestId = COORDINATOR.requestRandomWords( chainlinkKeyHash, chainlinkSubscriptionId, requestConfirmations, callbackGasLimit, numWords ); } function fulfillRandomWords(uint256, uint256[] memory _randomWords) internal override { require(!revealed, "HOTM.Reveal: Already Revealed"); revealed = true; offset = (_randomWords[0] % totalSupply()); } function withdraw() public { if (regentAddress != owner()) { payable(regentAddress).transfer((address(this).balance * 1) / 100); } payable(owner()).transfer(address(this).balance); } function setRegent(address _regentAddress) public onlyOwner { require(_regentAddress != regentAddress, "HOTM.setRegent: No regent rules forever"); regentAddress = _regentAddress; } function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { return 1; } /* Hero Operations */ function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { if (!_exists(_tokenId)) revert URIQueryForNonexistentToken(); if (!revealed) return preRevealURI; string memory baseUri_ = _baseURI(); uint256 shiftedTokenId = getShiftedToken(_tokenId); return bytes(baseUri_).length != 0 ? string(abi.encodePacked(baseUri_, getGender(_tokenId), "_", Strings.toString(shiftedTokenId), ".json")) : ""; } function getShiftedToken(uint256 _tokenId) public view returns (uint256) { return (_tokenId + offset) % totalSupply(); } function compareStrings(string memory a, string memory b) internal pure returns (bool) { return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b)))); } function toggleGender(uint256 tokenId) external { require(isGenderSwapOn, "HOTM.toggleGender: Gender swap is not live"); require(ownerOf(tokenId) == _msgSender(), "HOTM.toggleGender: You are not the owner"); gender[tokenId] = compareStrings(getGender(tokenId), "male") ? "female" : "male"; } function getGender(uint256 tokenId) public view returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return bytes(gender[tokenId]).length != 0 ? gender[tokenId] : "male"; } function checkUpkeep( bytes calldata ) external view override returns ( bool upkeepNeeded, bytes memory ) { upkeepNeeded = (block.timestamp - lastWithdraw) > withdrawInterval || (block.timestamp - lastRegent) > regentInterval; } // We use this to do auto-withdraws so the Regent keeps receiving eth periodically and to kick automatically for new elections function performUpkeep( bytes calldata /* performData */ ) external override { if ((block.timestamp - lastWithdraw) > withdrawInterval) { lastWithdraw = block.timestamp; withdraw(); } if ((block.timestamp - lastRegent) > regentInterval) { lastRegent = block.timestamp; setRegent(owner()); } } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 { _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 { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./KeeperBase.sol"; import "./interfaces/KeeperCompatibleInterface.sol"; abstract contract KeeperCompatible is KeeperBase, KeeperCompatibleInterface {}
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract KeeperBase { error OnlySimulatedBackend(); /** * @notice method that allows it to be simulated via eth_call by checking that * the sender is the zero address. */ function preventExecution() internal view { if (tx.origin != address(0)) { revert OnlySimulatedBackend(); } } /** * @notice modifier that allows it to be simulated via eth_call by checking * that the sender is the zero address. */ modifier cannotExecute() { preventExecution(); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface KeeperCompatibleInterface { /** * @notice method that is simulated by the keepers to see if any work actually * needs to be performed. This method does does not actually need to be * executable, and since it is only ever simulated it can consume lots of gas. * @dev To ensure that it is never called, you may want to add the * cannotExecute modifier from KeeperBase to your implementation of this * method. * @param checkData specified in the upkeep registration so it is always the * same for a registered upkeep. This can easily be broken down into specific * arguments using `abi.decode`, so multiple upkeeps can be registered on the * same contract and easily differentiated by the contract. * @return upkeepNeeded boolean to indicate whether the keeper should call * performUpkeep or not. * @return performData bytes that the keeper should call performUpkeep with, if * upkeep is needed. If you would like to encode data to decode later, try * `abi.encode`. */ function checkUpkeep(bytes calldata checkData) external returns (bool upkeepNeeded, bytes memory performData); /** * @notice method that is actually executed by the keepers, via the registry. * The data returned by the checkUpkeep simulation will be passed into * this method to actually be executed. * @dev The input to this method should not be trusted, and the caller of the * method should not even be restricted to any single registry. Anyone should * be able call it, and the input should be validated, there is no guarantee * that the data passed in is the performData returned from checkUpkeep. This * could happen due to malicious keepers, racing keepers, or simply a state * change while the performUpkeep transaction is waiting for confirmation. * Always validate the data passed in. * @param performData is the data which was passed back from the checkData * simulation. If it is encoded, it can easily be decoded into other types by * calling `abi.decode`. This data should not be trusted, and should be * validated against the contract's current state. */ function performUpkeep(bytes calldata performData) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_amountForDevs","type":"uint256"},{"internalType":"uint256","name":"_amountForProject","type":"uint256"},{"internalType":"uint256","name":"_maxBatchSize","type":"uint256"},{"internalType":"string","name":"_preRevealURI","type":"string"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_heroesContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":[],"name":"amountForDevs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amountForProject","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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkKeyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkRequestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"checkUpkeep","outputs":[{"internalType":"bool","name":"upkeepNeeded","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commonHeroMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_devAddress","type":"address"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getGender","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getShiftedToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"heroesContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"holderMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isGenderSwapOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isHolderMintOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastRegent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"luckyHeroClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_luckyHeroAddress","type":"address"}],"name":"luckyHeroMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"luckyHeroMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"performUpkeep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"regentInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":"bytes32","name":"_keyhash","type":"bytes32"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"}],"name":"setChainlinkConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOn","type":"bool"}],"name":"setGenderSwapOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOn","type":"bool"}],"name":"setHolderMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOn","type":"bool"}],"name":"setOpenMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_regentAddress","type":"address"}],"name":"setRegent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri_","type":"string"}],"name":"startReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"toggleGender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61012060405260098054600160a01b600160f01b03191665080018000c3560a51b179055600c8054600160401b600160e01b0319167b1ecd6f0624cc9f20b30913bc081f94e1a700427100000000000000001790556011805463ffffffff1916905562093a806012556276a7006014553480156200007c57600080fd5b50604051620031e3380380620031e38339810160408190526200009f9162000382565b604080518082018252601481527f4865726f65734d6574617665727365544c455632000000000000000000000000602080830191825283518085019094526004845263484f544d60e01b908401528151859391620001019160029190620002bf565b50805162000117906003906020840190620002bf565b50506001600055506200012a336200026d565b60601b6001600160601b031916608052600980546001600160a01b0319166001600160a01b03841617905586620001628787620004af565b1115620001e65760405162461bcd60e51b815260206004820152604260248201527f484f544d2e636f6e7374727563746f723a204d617820737570706c792073686f60448201527f756c6420626520686967686572207468616e20616d6f756e7420666f72206465606482015261767360f01b608482015260a40160405180910390fd5b60a087905260c086905260e085905261010084905260118054600160201b600160c01b031916336401000000000217905582516200022c906010906020860190620002bf565b5042601355600c80546001600160a01b039092166801000000000000000002600160401b600160e01b03199092169190911790555062000529945050505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002cd90620004d6565b90600052602060002090601f016020900481019282620002f157600085556200033c565b82601f106200030c57805160ff19168380011785556200033c565b828001600101855582156200033c579182015b828111156200033c5782518255916020019190600101906200031f565b506200034a9291506200034e565b5090565b5b808211156200034a57600081556001016200034f565b80516001600160a01b03811681146200037d57600080fd5b919050565b600080600080600080600060e0888a0312156200039e57600080fd5b87516020808a015160408b015160608c015160808d0151949b5091995097509550906001600160401b0380821115620003d657600080fd5b818b0191508b601f830112620003eb57600080fd5b81518181111562000400576200040062000513565b604051601f8201601f19908116603f011681019083821181831017156200042b576200042b62000513565b816040528281528e868487010111156200044457600080fd5b600093505b8284101562000468578484018601518185018701529285019262000449565b828411156200047a5760008684830101525b8098505050505050506200049160a0890162000365565b9150620004a160c0890162000365565b905092959891949750929550565b60008219821115620004d157634e487b7160e01b600052601160045260246000fd5b500190565b600181811c90821680620004eb57607f821691505b602082108114156200050d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c60a05160c05160e05161010051612c41620005a26000396000818161049c01528181610bf001528181610c8f0152610cc70152600061040a015260006107b70152600081816106d301528181610b9b01528181610f560152611992015260008181610aea0152610b2c0152612c416000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c806367a050e5116101de578063b88d4fde1161010f578063e2af30f4116100ad578063f2fde38b1161007c578063f2fde38b14610784578063f6c1774814610797578063f92d8e8b1461079f578063fbe1aa51146107b257600080fd5b8063e2af30f41461071a578063e3286a471461072d578063e3e970e214610735578063e985e9c51461074857600080fd5b8063d5556544116100e9578063d5556544146106c5578063d5abeb01146106ce578063e0075744146106f5578063e06d2eb51461070757600080fd5b8063b88d4fde1461067c578063c87b56dd1461068f578063d2c04950146106a257600080fd5b80638226c2e41161017c5780639ff3e976116101565780639ff3e97614610645578063a22cb46514610658578063a4db7dc21461066b578063b52eea741461067357600080fd5b80638226c2e4146106195780638da5cb5b1461062c57806395d89b411461063d57600080fd5b806370a08231116101b857806370a08231146105d8578063715018a6146105eb57806372d6e8a4146105f357806375d7741b1461060657600080fd5b806367a050e5146105a65780636c0360eb146105af5780636e04ff0d146105b757600080fd5b80632d1a12f6116102b8578063469132ce1161025657806355b5b35b1161023057806355b5b35b1461055357806355f804b31461056d5780635a01a5a8146105805780636352211e1461059357600080fd5b8063469132ce14610524578063497035921461052c578063518302271461053f57600080fd5b80633ccfd60b116102925780633ccfd60b146104ed57806342842e0e146104f55780634585e33b146105085780634586fb4e1461051b57600080fd5b80632d1a12f6146104be57806333ace653146104d157806335b845f0146104da57600080fd5b8063162075d8116103255780631fe543e3116102ff5780631fe543e31461046857806321ebe5711461047b57806323b872dd146104845780632913daa01461049757600080fd5b8063162075d81461044a57806318160ddd14610453578063199080161461045b57600080fd5b8063095ea7b311610361578063095ea7b3146103f05780630ebeb3e6146104055780630f7309e81461043a5780631249c58b1461044257600080fd5b806301ffc9a71461038857806306fdde03146103b0578063081812fc146103c5575b600080fd5b61039b6103963660046126e4565b6107d9565b60405190151581526020015b60405180910390f35b6103b861082b565b6040516103a791906129b6565b6103d86103d33660046127a7565b6108bd565b6040516001600160a01b0390911681526020016103a7565b6104036103fe366004612663565b610901565b005b61042c7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016103a7565b6103b861098f565b6104036109ab565b61042c60125481565b61042c610ad1565b60115461039b9060ff1681565b6104036104763660046127fc565b610adf565b61042c60145481565b610403610492366004612582565b610b63565b61042c7f000000000000000000000000000000000000000000000000000000000000000081565b6104036104cc3660046127d9565b610b6e565b61042c60155481565b6104036104e836600461252d565b610d04565b610403610dd2565b610403610503366004612582565b610e86565b61040361051636600461271e565b610ea1565b61042c600b5481565b61042c600181565b60115461039b9062010000900460ff1681565b60115461039b906301000000900460ff1681565b600c546103d890600160401b90046001600160a01b031681565b61040361057b36600461271e565b610ef2565b61040361058e36600461252d565b610f28565b6103d86105a13660046127a7565b61103f565b61042c600a5481565b6103b8611051565b6105ca6105c536600461271e565b6110df565b6040516103a792919061299b565b61042c6105e636600461252d565b611116565b610403611164565b61040361060136600461268d565b61119a565b61040361061436600461275f565b6111e0565b61042c6106273660046127a7565b611341565b6008546001600160a01b03166103d8565b6103b8611362565b6104036106533660046127a7565b611371565b610403610666366004612639565b6114e4565b61042c600281565b61042c60135481565b61040361068a3660046125be565b61157a565b6103b861069d3660046127a7565b6115cb565b61039b6106b036600461252d565b60166020526000908152604090205460ff1681565b61042c600e5481565b61042c7f000000000000000000000000000000000000000000000000000000000000000081565b60115461039b90610100900460ff1681565b6103b86107153660046127a7565b61170b565b61040361072836600461268d565b61178f565b61042c600381565b61040361074336600461268d565b6117cc565b61039b61075636600461254f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b61040361079236600461252d565b611810565b61042c600a81565b6104036107ad3660046126a8565b6118a8565b61042c7f000000000000000000000000000000000000000000000000000000000000000081565b60006001600160e01b031982166380ac58cd60e01b148061080a57506001600160e01b03198216635b5e139f60e01b145b8061082557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461083a90612af3565b80601f016020809104026020016040519081016040528092919081815260200182805461086690612af3565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b5050505050905090565b60006108c8826118fa565b6108e5576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061090c8261103f565b9050806001600160a01b0316836001600160a01b031614156109415760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610961575061095f8133610756565b155b1561097f576040516367d9dca160e11b815260040160405180910390fd5b61098a838383611933565b505050565b604051806060016040528060408152602001612bcc6040913981565b60115460ff16806109c35750601154610100900460ff165b610a145760405162461bcd60e51b815260206004820152601b60248201527f484f544d2e6d696e743a204d696e74206973206e6f74206c697665000000000060448201526064015b60405180910390fd5b600c546040516370a0823160e01b8152336004820152600091600160401b90046001600160a01b0316906370a082319060240160206040518083038186803b158015610a5f57600080fd5b505afa158015610a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9791906127c0565b90506000808211610aa9576002610ab4565b610ab4600a83612a91565b9050610ac3816000841161198f565b610acd3382611b07565b5050565b600154600054036000190190565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b595760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610a0b565b610acd8282611b21565b61098a838383611bc2565b6008546001600160a01b03163314610b985760405162461bcd60e51b8152600401610a0b906129c9565b817f000000000000000000000000000000000000000000000000000000000000000081610bc3610ad1565b610bcd9190612a65565b1115610beb5760405162461bcd60e51b8152600401610a0b906129fe565b610c157f000000000000000000000000000000000000000000000000000000000000000084612b49565b15610c885760405162461bcd60e51b815260206004820152603a60248201527f484f544d2e6465764d696e743a2043616e206f6e6c79206d696e742061206d7560448201527f6c7469706c65206f6620746865206d6178426174636853697a650000000000006064820152608401610a0b565b6000610cb47f000000000000000000000000000000000000000000000000000000000000000085612a7d565b905060005b81811015610cfd57610ceb847f0000000000000000000000000000000000000000000000000000000000000000611b07565b80610cf581612b2e565b915050610cb9565b5050505050565b6008546001600160a01b03163314610d2e5760405162461bcd60e51b8152600401610a0b906129c9565b6011546001600160a01b03828116640100000000909204161415610da45760405162461bcd60e51b815260206004820152602760248201527f484f544d2e736574526567656e743a204e6f20726567656e742072756c6573206044820152663337b932bb32b960c91b6064820152608401610a0b565b601180546001600160a01b0390921664010000000002640100000000600160c01b0319909216919091179055565b60085460115464010000000090046001600160a01b03908116911614610e4a5760115464010000000090046001600160a01b03166108fc6064610e16476001612a91565b610e209190612a7d565b6040518115909202916000818181858888f19350505050158015610e48573d6000803e3d6000fd5b505b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610e83573d6000803e3d6000fd5b50565b61098a8383836040518060200160405280600081525061157a565b601254601354610eb19042612ab0565b1115610ec35742601355610ec3610dd2565b601454601554610ed39042612ab0565b1115610acd5742601555610acd6104e86008546001600160a01b031690565b6008546001600160a01b03163314610f1c5760405162461bcd60e51b8152600401610a0b906129c9565b61098a600f8383612355565b6008546001600160a01b03163314610f525760405162461bcd60e51b8152600401610a0b906129c9565b60037f000000000000000000000000000000000000000000000000000000000000000081610f7e610ad1565b610f889190612a65565b1115610fa65760405162461bcd60e51b8152600401610a0b906129fe565b6001600160a01b03821660009081526016602052604090205460ff161561100f5760405162461bcd60e51b815260206004820152601a60248201527f484f544d2e6d696e743a20416c726561647920636c61696d65640000000000006044820152606401610a0b565b61101a826003611b07565b506001600160a01b03166000908152601660205260409020805460ff19166001179055565b600061104a82611dad565b5192915050565b600f805461105e90612af3565b80601f016020809104026020016040519081016040528092919081815260200182805461108a90612af3565b80156110d75780601f106110ac576101008083540402835291602001916110d7565b820191906000526020600020905b8154815290600101906020018083116110ba57829003601f168201915b505050505081565b60006060601254601354426110f49190612ab0565b118061110d575060145460155461110b9042612ab0565b115b91509250929050565b60006001600160a01b03821661113f576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b0316331461118e5760405162461bcd60e51b8152600401610a0b906129c9565b6111986000611ed4565b565b6008546001600160a01b031633146111c45760405162461bcd60e51b8152600401610a0b906129c9565b60118054911515620100000262ff000019909216919091179055565b6008546001600160a01b0316331461120a5760405162461bcd60e51b8152600401610a0b906129c9565b6011546301000000900460ff16156112645760405162461bcd60e51b815260206004820152601d60248201527f484f544d2e52657665616c3a20416c72656164792052657665616c65640000006044820152606401610a0b565b805161127790600f9060208401906123d9565b50600954600b54600c546040516305d3b1d360e41b815260048101929092526001600160401b0316602482015261ffff600160c01b830416604482015263ffffffff600160a01b830481166064830152600160d01b83041660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133b91906127c0565b600a5550565b600061134b610ad1565b600e546113589084612a65565b6108259190612b49565b60606003805461083a90612af3565b60115462010000900460ff166113dc5760405162461bcd60e51b815260206004820152602a60248201527f484f544d2e746f67676c6547656e6465723a2047656e6465722073776170206960448201526973206e6f74206c69766560b01b6064820152608401610a0b565b336113e68261103f565b6001600160a01b03161461144d5760405162461bcd60e51b815260206004820152602860248201527f484f544d2e746f67676c6547656e6465723a20596f7520617265206e6f74207460448201526734329037bbb732b960c11b6064820152608401610a0b565b61147b6114598261170b565b604051806040016040528060048152602001636d616c6560e01b815250611f26565b6114a157604051806040016040528060048152602001636d616c6560e01b8152506114c1565b6040518060400160405280600681526020016566656d616c6560d01b8152505b6000828152600d602090815260409091208251610acd93919291909101906123d9565b6001600160a01b03821633141561150e5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611585848484611bc2565b6001600160a01b0383163b151580156115a757506115a584848484611f7f565b155b156115c5576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606115d6826118fa565b6115f357604051630a14c4b560e41b815260040160405180910390fd5b6011546301000000900460ff16611696576010805461161190612af3565b80601f016020809104026020016040519081016040528092919081815260200182805461163d90612af3565b801561168a5780601f1061165f5761010080835404028352916020019161168a565b820191906000526020600020905b81548152906001019060200180831161166d57829003601f168201915b50505050509050919050565b60006116a0612076565b905060006116ad84611341565b90508151600014156116ce5760405180602001604052806000815250611703565b816116d88561170b565b6116e183612085565b6040516020016116f3939291906128fc565b6040516020818303038152906040525b949350505050565b6060611716826118fa565b61173357604051630a14c4b560e41b815260040160405180910390fd5b6000828152600d60205260409020805461174c90612af3565b1515905061177657604051806040016040528060048152602001636d616c6560e01b815250610825565b6000828152600d60205260409020805461161190612af3565b6008546001600160a01b031633146117b95760405162461bcd60e51b8152600401610a0b906129c9565b6011805460ff1916911515919091179055565b6008546001600160a01b031633146117f65760405162461bcd60e51b8152600401610a0b906129c9565b601180549115156101000261ff0019909216919091179055565b6008546001600160a01b0316331461183a5760405162461bcd60e51b8152600401610a0b906129c9565b6001600160a01b03811661189f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a0b565b610e8381611ed4565b6008546001600160a01b031633146118d25760405162461bcd60e51b8152600401610a0b906129c9565b600b91909155600c805467ffffffffffffffff19166001600160401b03909216919091179055565b60008160011115801561190e575060005482105b8015610825575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b817f0000000000000000000000000000000000000000000000000000000000000000816119ba610ad1565b6119c49190612a65565b11156119e25760405162461bcd60e51b8152600401610a0b906129fe565b60115460ff16806119f05750815b611a485760405162461bcd60e51b815260206004820152602360248201527f484f544d2e6d696e743a204f70656e206f6e6c7920666f72204f4720686f6c6460448201526265727360e81b6064820152608401610a0b565b33600090815260056020526040902054600160401b90046001600160401b0316801590818015611a8857503360009081526016602052604090205460ff16155b80611abb5750838015611a9b5750600381145b8015611abb57503360009081526016602052604090205460ff1615156001145b610cfd5760405162461bcd60e51b815260206004820152601960248201527f484f544d2e6d696e743a20416c7265616479204d696e746564000000000000006044820152606401610a0b565b610acd828260405180602001604052806000815250612182565b6011546301000000900460ff1615611b7b5760405162461bcd60e51b815260206004820152601d60248201527f484f544d2e52657665616c3a20416c72656164792052657665616c65640000006044820152606401610a0b565b6011805463ff00000019166301000000179055611b96610ad1565b81600081518110611ba957611ba9612b89565b6020026020010151611bbb9190612b49565b600e555050565b6000611bcd82611dad565b9050836001600160a01b031681600001516001600160a01b031614611c045760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611c225750611c228533610756565b80611c3d575033611c32846108bd565b6001600160a01b0316145b905080611c5d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611c8457604051633a954ecd60e21b815260040160405180910390fd5b611c9060008487611933565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611d64576000548214611d6457805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610cfd565b60408051606081018252600080825260208201819052918101919091528180600111158015611ddd575060005481105b15611ebb57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611eb95780516001600160a01b031615611e50579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611eb4579392505050565b611e50565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081604051602001611f3991906128e0565b6040516020818303038152906040528051906020012083604051602001611f6091906128e0565b6040516020818303038152906040528051906020012014905092915050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fb490339089908890889060040161295e565b602060405180830381600087803b158015611fce57600080fd5b505af1925050508015611ffe575060408051601f3d908101601f19168201909252611ffb91810190612701565b60015b612059573d80801561202c576040519150601f19603f3d011682016040523d82523d6000602084013e612031565b606091505b508051612051576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060600f805461083a90612af3565b6060816120a95750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120d357806120bd81612b2e565b91506120cc9050600a83612a7d565b91506120ad565b6000816001600160401b038111156120ed576120ed612b9f565b6040519080825280601f01601f191660200182016040528015612117576020820181803683370190505b5090505b84156117035761212c600183612ab0565b9150612139600a86612b49565b612144906030612a65565b60f81b81838151811061215957612159612b89565b60200101906001600160f81b031916908160001a90535061217b600a86612a7d565b945061211b565b61098a83838360016000546001600160a01b0385166121b357604051622e076360e81b815260040160405180910390fd5b836121d15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561227d57506001600160a01b0387163b15155b15612306575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46122ce6000888480600101955088611f7f565b6122eb576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561228357826000541461230157600080fd5b61234c565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612307575b50600055610cfd565b82805461236190612af3565b90600052602060002090601f01602090048101928261238357600085556123c9565b82601f1061239c5782800160ff198235161785556123c9565b828001600101855582156123c9579182015b828111156123c95782358255916020019190600101906123ae565b506123d592915061244d565b5090565b8280546123e590612af3565b90600052602060002090601f01602090048101928261240757600085556123c9565b82601f1061242057805160ff19168380011785556123c9565b828001600101855582156123c9579182015b828111156123c9578251825591602001919060010190612432565b5b808211156123d5576000815560010161244e565b60006001600160401b0383111561247b5761247b612b9f565b61248e601f8401601f1916602001612a35565b90508281528383830111156124a257600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146124d057600080fd5b919050565b803580151581146124d057600080fd5b60008083601f8401126124f757600080fd5b5081356001600160401b0381111561250e57600080fd5b60208301915083602082850101111561252657600080fd5b9250929050565b60006020828403121561253f57600080fd5b612548826124b9565b9392505050565b6000806040838503121561256257600080fd5b61256b836124b9565b9150612579602084016124b9565b90509250929050565b60008060006060848603121561259757600080fd5b6125a0846124b9565b92506125ae602085016124b9565b9150604084013590509250925092565b600080600080608085870312156125d457600080fd5b6125dd856124b9565b93506125eb602086016124b9565b92506040850135915060608501356001600160401b0381111561260d57600080fd5b8501601f8101871361261e57600080fd5b61262d87823560208401612462565b91505092959194509250565b6000806040838503121561264c57600080fd5b612655836124b9565b9150612579602084016124d5565b6000806040838503121561267657600080fd5b61267f836124b9565b946020939093013593505050565b60006020828403121561269f57600080fd5b612548826124d5565b600080604083850312156126bb57600080fd5b8235915060208301356001600160401b03811681146126d957600080fd5b809150509250929050565b6000602082840312156126f657600080fd5b813561254881612bb5565b60006020828403121561271357600080fd5b815161254881612bb5565b6000806020838503121561273157600080fd5b82356001600160401b0381111561274757600080fd5b612753858286016124e5565b90969095509350505050565b60006020828403121561277157600080fd5b81356001600160401b0381111561278757600080fd5b8201601f8101841361279857600080fd5b61170384823560208401612462565b6000602082840312156127b957600080fd5b5035919050565b6000602082840312156127d257600080fd5b5051919050565b600080604083850312156127ec57600080fd5b82359150612579602084016124b9565b6000806040838503121561280f57600080fd5b823591506020808401356001600160401b038082111561282e57600080fd5b818601915086601f83011261284257600080fd5b81358181111561285457612854612b9f565b8060051b9150612865848301612a35565b8181528481019084860184860187018b101561288057600080fd5b600095505b838610156128a3578035835260019590950194918601918601612885565b508096505050505050509250929050565b600081518084526128cc816020860160208601612ac7565b601f01601f19169290920160200192915050565b600082516128f2818460208701612ac7565b9190910192915050565b6000845161290e818460208901612ac7565b845190830190612922818360208901612ac7565b605f60f81b9101908152835161293f816001840160208801612ac7565b64173539b7b760d91b6001929091019182015260060195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612991908301846128b4565b9695505050505050565b821515815260406020820152600061170360408301846128b4565b60208152600061254860208301846128b4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f484f544d2e6d696e743a20416c6c206865726f65732072656372756974656400604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715612a5d57612a5d612b9f565b604052919050565b60008219821115612a7857612a78612b5d565b500190565b600082612a8c57612a8c612b73565b500490565b6000816000190483118215151615612aab57612aab612b5d565b500290565b600082821015612ac257612ac2612b5d565b500390565b60005b83811015612ae2578181015183820152602001612aca565b838111156115c55750506000910152565b600181811c90821680612b0757607f821691505b60208210811415612b2857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612b4257612b42612b5d565b5060010190565b600082612b5857612b58612b73565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610e8357600080fdfe65616166616361313631663335303864646166613237303036383334653039313164316464393332663336353637663462363236636331333864336538623061a2646970667358221220f0a85689db63b0d6e0eea07ec012e63bf3f3e5e5857ac0894d8140980a90d75764736f6c6343000807003300000000000000000000000000000000000000000000000000000000000019c800000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699090000000000000000000000001ecd6f0624cc9f20b30913bc081f94e1a7004271000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f6261666b7265696833667a7263676a786c646b677a666d35687173746570706a7479616c696e65376275336b376f61676b676834636972676c6f342e697066732e6e667473746f726167652e6c696e6b2f00000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103835760003560e01c806367a050e5116101de578063b88d4fde1161010f578063e2af30f4116100ad578063f2fde38b1161007c578063f2fde38b14610784578063f6c1774814610797578063f92d8e8b1461079f578063fbe1aa51146107b257600080fd5b8063e2af30f41461071a578063e3286a471461072d578063e3e970e214610735578063e985e9c51461074857600080fd5b8063d5556544116100e9578063d5556544146106c5578063d5abeb01146106ce578063e0075744146106f5578063e06d2eb51461070757600080fd5b8063b88d4fde1461067c578063c87b56dd1461068f578063d2c04950146106a257600080fd5b80638226c2e41161017c5780639ff3e976116101565780639ff3e97614610645578063a22cb46514610658578063a4db7dc21461066b578063b52eea741461067357600080fd5b80638226c2e4146106195780638da5cb5b1461062c57806395d89b411461063d57600080fd5b806370a08231116101b857806370a08231146105d8578063715018a6146105eb57806372d6e8a4146105f357806375d7741b1461060657600080fd5b806367a050e5146105a65780636c0360eb146105af5780636e04ff0d146105b757600080fd5b80632d1a12f6116102b8578063469132ce1161025657806355b5b35b1161023057806355b5b35b1461055357806355f804b31461056d5780635a01a5a8146105805780636352211e1461059357600080fd5b8063469132ce14610524578063497035921461052c578063518302271461053f57600080fd5b80633ccfd60b116102925780633ccfd60b146104ed57806342842e0e146104f55780634585e33b146105085780634586fb4e1461051b57600080fd5b80632d1a12f6146104be57806333ace653146104d157806335b845f0146104da57600080fd5b8063162075d8116103255780631fe543e3116102ff5780631fe543e31461046857806321ebe5711461047b57806323b872dd146104845780632913daa01461049757600080fd5b8063162075d81461044a57806318160ddd14610453578063199080161461045b57600080fd5b8063095ea7b311610361578063095ea7b3146103f05780630ebeb3e6146104055780630f7309e81461043a5780631249c58b1461044257600080fd5b806301ffc9a71461038857806306fdde03146103b0578063081812fc146103c5575b600080fd5b61039b6103963660046126e4565b6107d9565b60405190151581526020015b60405180910390f35b6103b861082b565b6040516103a791906129b6565b6103d86103d33660046127a7565b6108bd565b6040516001600160a01b0390911681526020016103a7565b6104036103fe366004612663565b610901565b005b61042c7f00000000000000000000000000000000000000000000000000000000000000fa81565b6040519081526020016103a7565b6103b861098f565b6104036109ab565b61042c60125481565b61042c610ad1565b60115461039b9060ff1681565b6104036104763660046127fc565b610adf565b61042c60145481565b610403610492366004612582565b610b63565b61042c7f000000000000000000000000000000000000000000000000000000000000003281565b6104036104cc3660046127d9565b610b6e565b61042c60155481565b6104036104e836600461252d565b610d04565b610403610dd2565b610403610503366004612582565b610e86565b61040361051636600461271e565b610ea1565b61042c600b5481565b61042c600181565b60115461039b9062010000900460ff1681565b60115461039b906301000000900460ff1681565b600c546103d890600160401b90046001600160a01b031681565b61040361057b36600461271e565b610ef2565b61040361058e36600461252d565b610f28565b6103d86105a13660046127a7565b61103f565b61042c600a5481565b6103b8611051565b6105ca6105c536600461271e565b6110df565b6040516103a792919061299b565b61042c6105e636600461252d565b611116565b610403611164565b61040361060136600461268d565b61119a565b61040361061436600461275f565b6111e0565b61042c6106273660046127a7565b611341565b6008546001600160a01b03166103d8565b6103b8611362565b6104036106533660046127a7565b611371565b610403610666366004612639565b6114e4565b61042c600281565b61042c60135481565b61040361068a3660046125be565b61157a565b6103b861069d3660046127a7565b6115cb565b61039b6106b036600461252d565b60166020526000908152604090205460ff1681565b61042c600e5481565b61042c7f00000000000000000000000000000000000000000000000000000000000019c881565b60115461039b90610100900460ff1681565b6103b86107153660046127a7565b61170b565b61040361072836600461268d565b61178f565b61042c600381565b61040361074336600461268d565b6117cc565b61039b61075636600461254f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b61040361079236600461252d565b611810565b61042c600a81565b6104036107ad3660046126a8565b6118a8565b61042c7f00000000000000000000000000000000000000000000000000000000000002ee81565b60006001600160e01b031982166380ac58cd60e01b148061080a57506001600160e01b03198216635b5e139f60e01b145b8061082557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461083a90612af3565b80601f016020809104026020016040519081016040528092919081815260200182805461086690612af3565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b5050505050905090565b60006108c8826118fa565b6108e5576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061090c8261103f565b9050806001600160a01b0316836001600160a01b031614156109415760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610961575061095f8133610756565b155b1561097f576040516367d9dca160e11b815260040160405180910390fd5b61098a838383611933565b505050565b604051806060016040528060408152602001612bcc6040913981565b60115460ff16806109c35750601154610100900460ff165b610a145760405162461bcd60e51b815260206004820152601b60248201527f484f544d2e6d696e743a204d696e74206973206e6f74206c697665000000000060448201526064015b60405180910390fd5b600c546040516370a0823160e01b8152336004820152600091600160401b90046001600160a01b0316906370a082319060240160206040518083038186803b158015610a5f57600080fd5b505afa158015610a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9791906127c0565b90506000808211610aa9576002610ab4565b610ab4600a83612a91565b9050610ac3816000841161198f565b610acd3382611b07565b5050565b600154600054036000190190565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610b595760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610a0b565b610acd8282611b21565b61098a838383611bc2565b6008546001600160a01b03163314610b985760405162461bcd60e51b8152600401610a0b906129c9565b817f00000000000000000000000000000000000000000000000000000000000019c881610bc3610ad1565b610bcd9190612a65565b1115610beb5760405162461bcd60e51b8152600401610a0b906129fe565b610c157f000000000000000000000000000000000000000000000000000000000000003284612b49565b15610c885760405162461bcd60e51b815260206004820152603a60248201527f484f544d2e6465764d696e743a2043616e206f6e6c79206d696e742061206d7560448201527f6c7469706c65206f6620746865206d6178426174636853697a650000000000006064820152608401610a0b565b6000610cb47f000000000000000000000000000000000000000000000000000000000000003285612a7d565b905060005b81811015610cfd57610ceb847f0000000000000000000000000000000000000000000000000000000000000032611b07565b80610cf581612b2e565b915050610cb9565b5050505050565b6008546001600160a01b03163314610d2e5760405162461bcd60e51b8152600401610a0b906129c9565b6011546001600160a01b03828116640100000000909204161415610da45760405162461bcd60e51b815260206004820152602760248201527f484f544d2e736574526567656e743a204e6f20726567656e742072756c6573206044820152663337b932bb32b960c91b6064820152608401610a0b565b601180546001600160a01b0390921664010000000002640100000000600160c01b0319909216919091179055565b60085460115464010000000090046001600160a01b03908116911614610e4a5760115464010000000090046001600160a01b03166108fc6064610e16476001612a91565b610e209190612a7d565b6040518115909202916000818181858888f19350505050158015610e48573d6000803e3d6000fd5b505b6008546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610e83573d6000803e3d6000fd5b50565b61098a8383836040518060200160405280600081525061157a565b601254601354610eb19042612ab0565b1115610ec35742601355610ec3610dd2565b601454601554610ed39042612ab0565b1115610acd5742601555610acd6104e86008546001600160a01b031690565b6008546001600160a01b03163314610f1c5760405162461bcd60e51b8152600401610a0b906129c9565b61098a600f8383612355565b6008546001600160a01b03163314610f525760405162461bcd60e51b8152600401610a0b906129c9565b60037f00000000000000000000000000000000000000000000000000000000000019c881610f7e610ad1565b610f889190612a65565b1115610fa65760405162461bcd60e51b8152600401610a0b906129fe565b6001600160a01b03821660009081526016602052604090205460ff161561100f5760405162461bcd60e51b815260206004820152601a60248201527f484f544d2e6d696e743a20416c726561647920636c61696d65640000000000006044820152606401610a0b565b61101a826003611b07565b506001600160a01b03166000908152601660205260409020805460ff19166001179055565b600061104a82611dad565b5192915050565b600f805461105e90612af3565b80601f016020809104026020016040519081016040528092919081815260200182805461108a90612af3565b80156110d75780601f106110ac576101008083540402835291602001916110d7565b820191906000526020600020905b8154815290600101906020018083116110ba57829003601f168201915b505050505081565b60006060601254601354426110f49190612ab0565b118061110d575060145460155461110b9042612ab0565b115b91509250929050565b60006001600160a01b03821661113f576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b0316331461118e5760405162461bcd60e51b8152600401610a0b906129c9565b6111986000611ed4565b565b6008546001600160a01b031633146111c45760405162461bcd60e51b8152600401610a0b906129c9565b60118054911515620100000262ff000019909216919091179055565b6008546001600160a01b0316331461120a5760405162461bcd60e51b8152600401610a0b906129c9565b6011546301000000900460ff16156112645760405162461bcd60e51b815260206004820152601d60248201527f484f544d2e52657665616c3a20416c72656164792052657665616c65640000006044820152606401610a0b565b805161127790600f9060208401906123d9565b50600954600b54600c546040516305d3b1d360e41b815260048101929092526001600160401b0316602482015261ffff600160c01b830416604482015263ffffffff600160a01b830481166064830152600160d01b83041660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133b91906127c0565b600a5550565b600061134b610ad1565b600e546113589084612a65565b6108259190612b49565b60606003805461083a90612af3565b60115462010000900460ff166113dc5760405162461bcd60e51b815260206004820152602a60248201527f484f544d2e746f67676c6547656e6465723a2047656e6465722073776170206960448201526973206e6f74206c69766560b01b6064820152608401610a0b565b336113e68261103f565b6001600160a01b03161461144d5760405162461bcd60e51b815260206004820152602860248201527f484f544d2e746f67676c6547656e6465723a20596f7520617265206e6f74207460448201526734329037bbb732b960c11b6064820152608401610a0b565b61147b6114598261170b565b604051806040016040528060048152602001636d616c6560e01b815250611f26565b6114a157604051806040016040528060048152602001636d616c6560e01b8152506114c1565b6040518060400160405280600681526020016566656d616c6560d01b8152505b6000828152600d602090815260409091208251610acd93919291909101906123d9565b6001600160a01b03821633141561150e5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611585848484611bc2565b6001600160a01b0383163b151580156115a757506115a584848484611f7f565b155b156115c5576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606115d6826118fa565b6115f357604051630a14c4b560e41b815260040160405180910390fd5b6011546301000000900460ff16611696576010805461161190612af3565b80601f016020809104026020016040519081016040528092919081815260200182805461163d90612af3565b801561168a5780601f1061165f5761010080835404028352916020019161168a565b820191906000526020600020905b81548152906001019060200180831161166d57829003601f168201915b50505050509050919050565b60006116a0612076565b905060006116ad84611341565b90508151600014156116ce5760405180602001604052806000815250611703565b816116d88561170b565b6116e183612085565b6040516020016116f3939291906128fc565b6040516020818303038152906040525b949350505050565b6060611716826118fa565b61173357604051630a14c4b560e41b815260040160405180910390fd5b6000828152600d60205260409020805461174c90612af3565b1515905061177657604051806040016040528060048152602001636d616c6560e01b815250610825565b6000828152600d60205260409020805461161190612af3565b6008546001600160a01b031633146117b95760405162461bcd60e51b8152600401610a0b906129c9565b6011805460ff1916911515919091179055565b6008546001600160a01b031633146117f65760405162461bcd60e51b8152600401610a0b906129c9565b601180549115156101000261ff0019909216919091179055565b6008546001600160a01b0316331461183a5760405162461bcd60e51b8152600401610a0b906129c9565b6001600160a01b03811661189f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a0b565b610e8381611ed4565b6008546001600160a01b031633146118d25760405162461bcd60e51b8152600401610a0b906129c9565b600b91909155600c805467ffffffffffffffff19166001600160401b03909216919091179055565b60008160011115801561190e575060005482105b8015610825575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b817f00000000000000000000000000000000000000000000000000000000000019c8816119ba610ad1565b6119c49190612a65565b11156119e25760405162461bcd60e51b8152600401610a0b906129fe565b60115460ff16806119f05750815b611a485760405162461bcd60e51b815260206004820152602360248201527f484f544d2e6d696e743a204f70656e206f6e6c7920666f72204f4720686f6c6460448201526265727360e81b6064820152608401610a0b565b33600090815260056020526040902054600160401b90046001600160401b0316801590818015611a8857503360009081526016602052604090205460ff16155b80611abb5750838015611a9b5750600381145b8015611abb57503360009081526016602052604090205460ff1615156001145b610cfd5760405162461bcd60e51b815260206004820152601960248201527f484f544d2e6d696e743a20416c7265616479204d696e746564000000000000006044820152606401610a0b565b610acd828260405180602001604052806000815250612182565b6011546301000000900460ff1615611b7b5760405162461bcd60e51b815260206004820152601d60248201527f484f544d2e52657665616c3a20416c72656164792052657665616c65640000006044820152606401610a0b565b6011805463ff00000019166301000000179055611b96610ad1565b81600081518110611ba957611ba9612b89565b6020026020010151611bbb9190612b49565b600e555050565b6000611bcd82611dad565b9050836001600160a01b031681600001516001600160a01b031614611c045760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611c225750611c228533610756565b80611c3d575033611c32846108bd565b6001600160a01b0316145b905080611c5d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611c8457604051633a954ecd60e21b815260040160405180910390fd5b611c9060008487611933565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611d64576000548214611d6457805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610cfd565b60408051606081018252600080825260208201819052918101919091528180600111158015611ddd575060005481105b15611ebb57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611eb95780516001600160a01b031615611e50579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611eb4579392505050565b611e50565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600081604051602001611f3991906128e0565b6040516020818303038152906040528051906020012083604051602001611f6091906128e0565b6040516020818303038152906040528051906020012014905092915050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611fb490339089908890889060040161295e565b602060405180830381600087803b158015611fce57600080fd5b505af1925050508015611ffe575060408051601f3d908101601f19168201909252611ffb91810190612701565b60015b612059573d80801561202c576040519150601f19603f3d011682016040523d82523d6000602084013e612031565b606091505b508051612051576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060600f805461083a90612af3565b6060816120a95750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120d357806120bd81612b2e565b91506120cc9050600a83612a7d565b91506120ad565b6000816001600160401b038111156120ed576120ed612b9f565b6040519080825280601f01601f191660200182016040528015612117576020820181803683370190505b5090505b84156117035761212c600183612ab0565b9150612139600a86612b49565b612144906030612a65565b60f81b81838151811061215957612159612b89565b60200101906001600160f81b031916908160001a90535061217b600a86612a7d565b945061211b565b61098a83838360016000546001600160a01b0385166121b357604051622e076360e81b815260040160405180910390fd5b836121d15760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561227d57506001600160a01b0387163b15155b15612306575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46122ce6000888480600101955088611f7f565b6122eb576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561228357826000541461230157600080fd5b61234c565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612307575b50600055610cfd565b82805461236190612af3565b90600052602060002090601f01602090048101928261238357600085556123c9565b82601f1061239c5782800160ff198235161785556123c9565b828001600101855582156123c9579182015b828111156123c95782358255916020019190600101906123ae565b506123d592915061244d565b5090565b8280546123e590612af3565b90600052602060002090601f01602090048101928261240757600085556123c9565b82601f1061242057805160ff19168380011785556123c9565b828001600101855582156123c9579182015b828111156123c9578251825591602001919060010190612432565b5b808211156123d5576000815560010161244e565b60006001600160401b0383111561247b5761247b612b9f565b61248e601f8401601f1916602001612a35565b90508281528383830111156124a257600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146124d057600080fd5b919050565b803580151581146124d057600080fd5b60008083601f8401126124f757600080fd5b5081356001600160401b0381111561250e57600080fd5b60208301915083602082850101111561252657600080fd5b9250929050565b60006020828403121561253f57600080fd5b612548826124b9565b9392505050565b6000806040838503121561256257600080fd5b61256b836124b9565b9150612579602084016124b9565b90509250929050565b60008060006060848603121561259757600080fd5b6125a0846124b9565b92506125ae602085016124b9565b9150604084013590509250925092565b600080600080608085870312156125d457600080fd5b6125dd856124b9565b93506125eb602086016124b9565b92506040850135915060608501356001600160401b0381111561260d57600080fd5b8501601f8101871361261e57600080fd5b61262d87823560208401612462565b91505092959194509250565b6000806040838503121561264c57600080fd5b612655836124b9565b9150612579602084016124d5565b6000806040838503121561267657600080fd5b61267f836124b9565b946020939093013593505050565b60006020828403121561269f57600080fd5b612548826124d5565b600080604083850312156126bb57600080fd5b8235915060208301356001600160401b03811681146126d957600080fd5b809150509250929050565b6000602082840312156126f657600080fd5b813561254881612bb5565b60006020828403121561271357600080fd5b815161254881612bb5565b6000806020838503121561273157600080fd5b82356001600160401b0381111561274757600080fd5b612753858286016124e5565b90969095509350505050565b60006020828403121561277157600080fd5b81356001600160401b0381111561278757600080fd5b8201601f8101841361279857600080fd5b61170384823560208401612462565b6000602082840312156127b957600080fd5b5035919050565b6000602082840312156127d257600080fd5b5051919050565b600080604083850312156127ec57600080fd5b82359150612579602084016124b9565b6000806040838503121561280f57600080fd5b823591506020808401356001600160401b038082111561282e57600080fd5b818601915086601f83011261284257600080fd5b81358181111561285457612854612b9f565b8060051b9150612865848301612a35565b8181528481019084860184860187018b101561288057600080fd5b600095505b838610156128a3578035835260019590950194918601918601612885565b508096505050505050509250929050565b600081518084526128cc816020860160208601612ac7565b601f01601f19169290920160200192915050565b600082516128f2818460208701612ac7565b9190910192915050565b6000845161290e818460208901612ac7565b845190830190612922818360208901612ac7565b605f60f81b9101908152835161293f816001840160208801612ac7565b64173539b7b760d91b6001929091019182015260060195945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612991908301846128b4565b9695505050505050565b821515815260406020820152600061170360408301846128b4565b60208152600061254860208301846128b4565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f484f544d2e6d696e743a20416c6c206865726f65732072656372756974656400604082015260600190565b604051601f8201601f191681016001600160401b0381118282101715612a5d57612a5d612b9f565b604052919050565b60008219821115612a7857612a78612b5d565b500190565b600082612a8c57612a8c612b73565b500490565b6000816000190483118215151615612aab57612aab612b5d565b500290565b600082821015612ac257612ac2612b5d565b500390565b60005b83811015612ae2578181015183820152602001612aca565b838111156115c55750506000910152565b600181811c90821680612b0757607f821691505b60208210811415612b2857634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612b4257612b42612b5d565b5060010190565b600082612b5857612b58612b73565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610e8357600080fdfe65616166616361313631663335303864646166613237303036383334653039313164316464393332663336353637663462363236636331333864336538623061a2646970667358221220f0a85689db63b0d6e0eea07ec012e63bf3f3e5e5857ac0894d8140980a90d75764736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000019c800000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000000fa000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699090000000000000000000000001ecd6f0624cc9f20b30913bc081f94e1a7004271000000000000000000000000000000000000000000000000000000000000005968747470733a2f2f6261666b7265696833667a7263676a786c646b677a666d35687173746570706a7479616c696e65376275336b376f61676b676834636972676c6f342e697066732e6e667473746f726167652e6c696e6b2f00000000000000
-----Decoded View---------------
Arg [0] : _maxSupply (uint256): 6600
Arg [1] : _amountForDevs (uint256): 750
Arg [2] : _amountForProject (uint256): 250
Arg [3] : _maxBatchSize (uint256): 50
Arg [4] : _preRevealURI (string): https://bafkreih3fzrcgjxldkgzfm5hqsteppjtyaline7bu3k7oagkgh4cirglo4.ipfs.nftstorage.link/
Arg [5] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [6] : _heroesContract (address): 0x1ecD6F0624cc9F20b30913bc081f94E1A7004271
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000019c8
Arg [1] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000fa
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [6] : 0000000000000000000000001ecd6f0624cc9f20b30913bc081f94e1a7004271
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000059
Arg [8] : 68747470733a2f2f6261666b7265696833667a7263676a786c646b677a666d35
Arg [9] : 687173746570706a7479616c696e65376275336b376f61676b67683463697267
Arg [10] : 6c6f342e697066732e6e667473746f726167652e6c696e6b2f00000000000000
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.