Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
DropERC721
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 490 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; // ========== External imports ========== import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/structs/BitMapsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; // ========== Internal imports ========== import { IDropERC721 } from "../interfaces/drop/IDropERC721.sol"; import "../interfaces/IThirdwebContract.sol"; // ========== Features ========== import "../extension/interface/IPlatformFee.sol"; import "../extension/interface/IPrimarySale.sol"; import "../extension/interface/IRoyalty.sol"; import "../extension/interface/IOwnable.sol"; import "../openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol"; import "../lib/CurrencyTransferLib.sol"; import "../lib/FeeType.sol"; import "../lib/MerkleProof.sol"; contract DropERC721 is Initializable, IThirdwebContract, IOwnable, IRoyalty, IPrimarySale, IPlatformFee, ReentrancyGuardUpgradeable, ERC2771ContextUpgradeable, MulticallUpgradeable, AccessControlEnumerableUpgradeable, ERC721EnumerableUpgradeable, IDropERC721 { using BitMapsUpgradeable for BitMapsUpgradeable.BitMap; using StringsUpgradeable for uint256; /*/////////////////////////////////////////////////////////////// State variables //////////////////////////////////////////////////////////////*/ bytes32 private constant MODULE_TYPE = bytes32("DropERC721"); uint256 private constant VERSION = 3; /// @dev Only transfers to or from TRANSFER_ROLE holders are valid, when transfers are restricted. bytes32 private constant TRANSFER_ROLE = keccak256("TRANSFER_ROLE"); /// @dev Only MINTER_ROLE holders can lazy mint NFTs. bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @dev Max bps in the thirdweb system. uint256 private constant MAX_BPS = 10_000; /// @dev Owner of the contract (purpose: OpenSea compatibility) address private _owner; /// @dev The next token ID of the NFT to "lazy mint". uint256 public nextTokenIdToMint; /// @dev The next token ID of the NFT that can be claimed. uint256 public nextTokenIdToClaim; /// @dev The address that receives all primary sales value. address public primarySaleRecipient; /// @dev The max number of NFTs a wallet can claim. uint256 public maxWalletClaimCount; /// @dev Global max total supply of NFTs. uint256 public maxTotalSupply; /// @dev The address that receives all platform fees from all sales. address private platformFeeRecipient; /// @dev The % of primary sales collected as platform fees. uint16 private platformFeeBps; /// @dev The (default) address that receives all royalty value. address private royaltyRecipient; /// @dev The (default) % of a sale to take as royalty (in basis points). uint16 private royaltyBps; /// @dev Contract level metadata. string public contractURI; /// @dev Largest tokenId of each batch of tokens with the same baseURI uint256[] public baseURIIndices; /// @dev The set of all claim conditions, at any given moment. ClaimConditionList public claimCondition; /*/////////////////////////////////////////////////////////////// Mappings //////////////////////////////////////////////////////////////*/ /** * @dev Mapping from 'Largest tokenId of a batch of tokens with the same baseURI' * to base URI for the respective batch of tokens. **/ mapping(uint256 => string) private baseURI; /** * @dev Mapping from 'Largest tokenId of a batch of 'delayed-reveal' tokens with * the same baseURI' to encrypted base URI for the respective batch of tokens. **/ mapping(uint256 => bytes) public encryptedData; /// @dev Mapping from address => total number of NFTs a wallet has claimed. mapping(address => uint256) public walletClaimCount; /// @dev Token ID => royalty recipient and bps for token mapping(uint256 => RoyaltyInfo) private royaltyInfoForToken; /*/////////////////////////////////////////////////////////////// Constructor + initializer logic //////////////////////////////////////////////////////////////*/ constructor() initializer {} /// @dev Initiliazes the contract, like a constructor. function initialize( address _defaultAdmin, string memory _name, string memory _symbol, string memory _contractURI, address[] memory _trustedForwarders, address _saleRecipient, address _royaltyRecipient, uint128 _royaltyBps, uint128 _platformFeeBps, address _platformFeeRecipient ) external initializer { // Initialize inherited contracts, most base-like -> most derived. __ReentrancyGuard_init(); __ERC2771Context_init(_trustedForwarders); __ERC721_init(_name, _symbol); // Initialize this contract's state. royaltyRecipient = _royaltyRecipient; royaltyBps = uint16(_royaltyBps); platformFeeRecipient = _platformFeeRecipient; platformFeeBps = uint16(_platformFeeBps); primarySaleRecipient = _saleRecipient; contractURI = _contractURI; _owner = _defaultAdmin; _setupRole(DEFAULT_ADMIN_ROLE, _defaultAdmin); _setupRole(MINTER_ROLE, _defaultAdmin); _setupRole(TRANSFER_ROLE, _defaultAdmin); _setupRole(TRANSFER_ROLE, address(0)); } /*/////////////////////////////////////////////////////////////// Generic contract logic //////////////////////////////////////////////////////////////*/ /// @dev Returns the type of the contract. function contractType() external pure returns (bytes32) { return MODULE_TYPE; } /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8) { return uint8(VERSION); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return hasRole(DEFAULT_ADMIN_ROLE, _owner) ? _owner : address(0); } /*/////////////////////////////////////////////////////////////// ERC 165 / 721 / 2981 logic //////////////////////////////////////////////////////////////*/ /// @dev Returns the URI for a given tokenId. function tokenURI(uint256 _tokenId) public view override returns (string memory) { for (uint256 i = 0; i < baseURIIndices.length; i += 1) { if (_tokenId < baseURIIndices[i]) { if (encryptedData[baseURIIndices[i]].length != 0) { return string(abi.encodePacked(baseURI[baseURIIndices[i]], "0")); } else { return string(abi.encodePacked(baseURI[baseURIIndices[i]], _tokenId.toString())); } } } return ""; } /// @dev See ERC 165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721EnumerableUpgradeable, AccessControlEnumerableUpgradeable, IERC165Upgradeable, IERC165) returns (bool) { return super.supportsInterface(interfaceId) || type(IERC2981Upgradeable).interfaceId == interfaceId; } /// @dev Returns the royalty recipient and amount, given a tokenId and sale price. function royaltyInfo(uint256 tokenId, uint256 salePrice) external view virtual returns (address receiver, uint256 royaltyAmount) { (address recipient, uint256 bps) = getRoyaltyInfoForToken(tokenId); receiver = recipient; royaltyAmount = (salePrice * bps) / MAX_BPS; } /*/////////////////////////////////////////////////////////////// Minting + delayed-reveal logic //////////////////////////////////////////////////////////////*/ /** * @dev Lets an account with `MINTER_ROLE` lazy mint 'n' NFTs. * The URIs for each token is the provided `_baseURIForTokens` + `{tokenId}`. */ function lazyMint( uint256 _amount, string calldata _baseURIForTokens, bytes calldata _data ) external onlyRole(MINTER_ROLE) { uint256 startId = nextTokenIdToMint; uint256 baseURIIndex = startId + _amount; nextTokenIdToMint = baseURIIndex; baseURI[baseURIIndex] = _baseURIForTokens; baseURIIndices.push(baseURIIndex); if (_data.length > 0) { (bytes memory encryptedURI, bytes32 provenanceHash) = abi.decode(_data, (bytes, bytes32)); if (encryptedURI.length != 0 && provenanceHash != "") { encryptedData[baseURIIndex] = _data; } } emit TokensLazyMinted(startId, startId + _amount - 1, _baseURIForTokens, _data); } /// @dev Lets an account with `MINTER_ROLE` reveal the URI for a batch of 'delayed-reveal' NFTs. function reveal(uint256 index, bytes calldata _key) external onlyRole(MINTER_ROLE) returns (string memory revealedURI) { require(index < baseURIIndices.length, "invalid index."); uint256 _index = baseURIIndices[index]; bytes memory data = encryptedData[_index]; (bytes memory encryptedURI, bytes32 provenanceHash) = abi.decode(data, (bytes, bytes32)); require(encryptedURI.length != 0, "nothing to reveal."); revealedURI = string(encryptDecrypt(encryptedURI, _key)); require(keccak256(abi.encodePacked(revealedURI, _key, block.chainid)) == provenanceHash, "Incorrect key"); baseURI[_index] = revealedURI; delete encryptedData[_index]; emit NFTRevealed(_index, revealedURI); return revealedURI; } /// @dev See: https://ethereum.stackexchange.com/questions/69825/decrypt-message-on-chain function encryptDecrypt(bytes memory data, bytes calldata key) public pure returns (bytes memory result) { // Store data length on stack for later use uint256 length = data.length; // solhint-disable-next-line no-inline-assembly assembly { // Set result to free memory pointer result := mload(0x40) // Increase free memory pointer by lenght + 32 mstore(0x40, add(add(result, length), 32)) // Set result length mstore(result, length) } // Iterate over the data stepping by 32 bytes for (uint256 i = 0; i < length; i += 32) { // Generate hash of the key and offset bytes32 hash = keccak256(abi.encodePacked(key, i)); bytes32 chunk; // solhint-disable-next-line no-inline-assembly assembly { // Read 32-bytes data chunk chunk := mload(add(data, add(i, 32))) } // XOR the chunk with hash chunk ^= hash; // solhint-disable-next-line no-inline-assembly assembly { // Write 32-byte encrypted chunk mstore(add(result, add(i, 32)), chunk) } } } /*/////////////////////////////////////////////////////////////// Claim logic //////////////////////////////////////////////////////////////*/ /// @dev Lets an account claim NFTs. function claim( address _receiver, uint256 _quantity, address _currency, uint256 _pricePerToken, bytes32[] calldata _proofs, uint256 _proofMaxQuantityPerTransaction ) external payable nonReentrant { require(isTrustedForwarder(msg.sender) || _msgSender() == tx.origin, "BOT"); uint256 tokenIdToClaim = nextTokenIdToClaim; // Get the claim conditions. uint256 activeConditionId = getActiveClaimConditionId(); /** * We make allowlist checks (i.e. verifyClaimMerkleProof) before verifying the claim's general * validity (i.e. verifyClaim) because we give precedence to the check of allow list quantity * restriction over the check of the general claim condition's quantityLimitPerTransaction * restriction. */ // Verify inclusion in allowlist. (bool validMerkleProof, ) = verifyClaimMerkleProof( activeConditionId, _msgSender(), _quantity, _proofs, _proofMaxQuantityPerTransaction ); // Verify claim validity. If not valid, revert. // when there's allowlist present --> verifyClaimMerkleProof will verify the _proofMaxQuantityPerTransaction value with hashed leaf in the allowlist // when there's no allowlist, this check is true --> verifyClaim will check for _quantity being less/equal than the limit bool toVerifyMaxQuantityPerTransaction = _proofMaxQuantityPerTransaction == 0 || claimCondition.phases[activeConditionId].merkleRoot == bytes32(0); verifyClaim( activeConditionId, _msgSender(), _quantity, _currency, _pricePerToken, toVerifyMaxQuantityPerTransaction ); if (validMerkleProof && _proofMaxQuantityPerTransaction > 0) { /** * Mark the claimer's use of their position in the allowlist. A spot in an allowlist * can be used only once. */ claimCondition.limitMerkleProofClaim[activeConditionId].set(uint256(uint160(_msgSender()))); } // If there's a price, collect price. collectClaimPrice(_quantity, _currency, _pricePerToken); // Mint the relevant NFTs to claimer. transferClaimedTokens(_receiver, activeConditionId, _quantity); emit TokensClaimed(activeConditionId, _msgSender(), _receiver, tokenIdToClaim, _quantity); } /// @dev Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions. function setClaimConditions(ClaimCondition[] calldata _phases, bool _resetClaimEligibility) external onlyRole(DEFAULT_ADMIN_ROLE) { uint256 existingStartIndex = claimCondition.currentStartId; uint256 existingPhaseCount = claimCondition.count; /** * `limitLastClaimTimestamp` and `limitMerkleProofClaim` are mappings that use a * claim condition's UID as a key. * * If `_resetClaimEligibility == true`, we assign completely new UIDs to the claim * conditions in `_phases`, effectively resetting the restrictions on claims expressed * by `limitLastClaimTimestamp` and `limitMerkleProofClaim`. */ uint256 newStartIndex = existingStartIndex; if (_resetClaimEligibility) { newStartIndex = existingStartIndex + existingPhaseCount; } claimCondition.count = _phases.length; claimCondition.currentStartId = newStartIndex; uint256 lastConditionStartTimestamp; for (uint256 i = 0; i < _phases.length; i++) { require(i == 0 || lastConditionStartTimestamp < _phases[i].startTimestamp, "ST"); uint256 supplyClaimedAlready = claimCondition.phases[newStartIndex + i].supplyClaimed; require(supplyClaimedAlready <= _phases[i].maxClaimableSupply, "max supply claimed already"); claimCondition.phases[newStartIndex + i] = _phases[i]; claimCondition.phases[newStartIndex + i].supplyClaimed = supplyClaimedAlready; lastConditionStartTimestamp = _phases[i].startTimestamp; } /** * Gas refunds (as much as possible) * * If `_resetClaimEligibility == true`, we assign completely new UIDs to the claim * conditions in `_phases`. So, we delete claim conditions with UID < `newStartIndex`. * * If `_resetClaimEligibility == false`, and there are more existing claim conditions * than in `_phases`, we delete the existing claim conditions that don't get replaced * by the conditions in `_phases`. */ if (_resetClaimEligibility) { for (uint256 i = existingStartIndex; i < newStartIndex; i++) { delete claimCondition.phases[i]; delete claimCondition.limitMerkleProofClaim[i]; } } else { if (existingPhaseCount > _phases.length) { for (uint256 i = _phases.length; i < existingPhaseCount; i++) { delete claimCondition.phases[newStartIndex + i]; delete claimCondition.limitMerkleProofClaim[newStartIndex + i]; } } } emit ClaimConditionsUpdated(_phases); } /// @dev Collects and distributes the primary sale value of NFTs being claimed. function collectClaimPrice( uint256 _quantityToClaim, address _currency, uint256 _pricePerToken ) internal { if (_pricePerToken == 0) { return; } uint256 totalPrice = _quantityToClaim * _pricePerToken; uint256 platformFees = (totalPrice * platformFeeBps) / MAX_BPS; if (_currency == CurrencyTransferLib.NATIVE_TOKEN) { require(msg.value == totalPrice, "must send total price."); } CurrencyTransferLib.transferCurrency(_currency, _msgSender(), platformFeeRecipient, platformFees); CurrencyTransferLib.transferCurrency(_currency, _msgSender(), primarySaleRecipient, totalPrice - platformFees); } /// @dev Transfers the NFTs being claimed. function transferClaimedTokens( address _to, uint256 _conditionId, uint256 _quantityBeingClaimed ) internal { // Update the supply minted under mint condition. claimCondition.phases[_conditionId].supplyClaimed += _quantityBeingClaimed; // if transfer claimed tokens is called when `to != msg.sender`, it'd use msg.sender's limits. // behavior would be similar to `msg.sender` mint for itself, then transfer to `_to`. claimCondition.limitLastClaimTimestamp[_conditionId][_msgSender()] = block.timestamp; walletClaimCount[_msgSender()] += _quantityBeingClaimed; uint256 tokenIdToClaim = nextTokenIdToClaim; for (uint256 i = 0; i < _quantityBeingClaimed; i += 1) { _mint(_to, tokenIdToClaim); tokenIdToClaim += 1; } nextTokenIdToClaim = tokenIdToClaim; } /// @dev Checks a request to claim NFTs against the active claim condition's criteria. function verifyClaim( uint256 _conditionId, address _claimer, uint256 _quantity, address _currency, uint256 _pricePerToken, bool verifyMaxQuantityPerTransaction ) public view { ClaimCondition memory currentClaimPhase = claimCondition.phases[_conditionId]; require( _currency == currentClaimPhase.currency && _pricePerToken == currentClaimPhase.pricePerToken, "invalid currency or price." ); // If we're checking for an allowlist quantity restriction, ignore the general quantity restriction. require( _quantity > 0 && (!verifyMaxQuantityPerTransaction || _quantity <= currentClaimPhase.quantityLimitPerTransaction), "invalid quantity." ); require( currentClaimPhase.supplyClaimed + _quantity <= currentClaimPhase.maxClaimableSupply, "exceed max claimable supply." ); require(nextTokenIdToClaim + _quantity <= nextTokenIdToMint, "not enough minted tokens."); require(maxTotalSupply == 0 || nextTokenIdToClaim + _quantity <= maxTotalSupply, "exceed max total supply."); require( maxWalletClaimCount == 0 || walletClaimCount[_claimer] + _quantity <= maxWalletClaimCount, "exceed claim limit" ); (uint256 lastClaimTimestamp, uint256 nextValidClaimTimestamp) = getClaimTimestamp(_conditionId, _claimer); require(lastClaimTimestamp == 0 || block.timestamp >= nextValidClaimTimestamp, "cannot claim."); } /// @dev Checks whether a claimer meets the claim condition's allowlist criteria. function verifyClaimMerkleProof( uint256 _conditionId, address _claimer, uint256 _quantity, bytes32[] calldata _proofs, uint256 _proofMaxQuantityPerTransaction ) public view returns (bool validMerkleProof, uint256 merkleProofIndex) { ClaimCondition memory currentClaimPhase = claimCondition.phases[_conditionId]; if (currentClaimPhase.merkleRoot != bytes32(0)) { (validMerkleProof, merkleProofIndex) = MerkleProof.verify( _proofs, currentClaimPhase.merkleRoot, keccak256(abi.encodePacked(_claimer, _proofMaxQuantityPerTransaction)) ); require(validMerkleProof, "not in whitelist."); require( !claimCondition.limitMerkleProofClaim[_conditionId].get(uint256(uint160(_claimer))), "proof claimed." ); require( _proofMaxQuantityPerTransaction == 0 || _quantity <= _proofMaxQuantityPerTransaction, "invalid quantity proof." ); } } /*/////////////////////////////////////////////////////////////// Getter functions //////////////////////////////////////////////////////////////*/ /// @dev At any given moment, returns the uid for the active claim condition. function getActiveClaimConditionId() public view returns (uint256) { for (uint256 i = claimCondition.currentStartId + claimCondition.count; i > claimCondition.currentStartId; i--) { if (block.timestamp >= claimCondition.phases[i - 1].startTimestamp) { return i - 1; } } revert("!CONDITION."); } /// @dev Returns the royalty recipient and bps for a particular token Id. function getRoyaltyInfoForToken(uint256 _tokenId) public view returns (address, uint16) { RoyaltyInfo memory royaltyForToken = royaltyInfoForToken[_tokenId]; return royaltyForToken.recipient == address(0) ? (royaltyRecipient, uint16(royaltyBps)) : (royaltyForToken.recipient, uint16(royaltyForToken.bps)); } /// @dev Returns the platform fee recipient and bps. function getPlatformFeeInfo() external view returns (address, uint16) { return (platformFeeRecipient, uint16(platformFeeBps)); } /// @dev Returns the default royalty recipient and bps. function getDefaultRoyaltyInfo() external view returns (address, uint16) { return (royaltyRecipient, uint16(royaltyBps)); } /// @dev Returns the timestamp for when a claimer is eligible for claiming NFTs again. function getClaimTimestamp(uint256 _conditionId, address _claimer) public view returns (uint256 lastClaimTimestamp, uint256 nextValidClaimTimestamp) { lastClaimTimestamp = claimCondition.limitLastClaimTimestamp[_conditionId][_claimer]; unchecked { nextValidClaimTimestamp = lastClaimTimestamp + claimCondition.phases[_conditionId].waitTimeInSecondsBetweenClaims; if (nextValidClaimTimestamp < lastClaimTimestamp) { nextValidClaimTimestamp = type(uint256).max; } } } /// @dev Returns the claim condition at the given uid. function getClaimConditionById(uint256 _conditionId) external view returns (ClaimCondition memory condition) { condition = claimCondition.phases[_conditionId]; } /// @dev Returns the amount of stored baseURIs function getBaseURICount() external view returns (uint256) { return baseURIIndices.length; } /*/////////////////////////////////////////////////////////////// Setter functions //////////////////////////////////////////////////////////////*/ /// @dev Lets a contract admin set a claim count for a wallet. function setWalletClaimCount(address _claimer, uint256 _count) external onlyRole(DEFAULT_ADMIN_ROLE) { walletClaimCount[_claimer] = _count; emit WalletClaimCountUpdated(_claimer, _count); } /// @dev Lets a contract admin set a maximum number of NFTs that can be claimed by any wallet. function setMaxWalletClaimCount(uint256 _count) external onlyRole(DEFAULT_ADMIN_ROLE) { maxWalletClaimCount = _count; emit MaxWalletClaimCountUpdated(_count); } /// @dev Lets a contract admin set the global maximum supply for collection's NFTs. function setMaxTotalSupply(uint256 _maxTotalSupply) external onlyRole(DEFAULT_ADMIN_ROLE) { maxTotalSupply = _maxTotalSupply; emit MaxTotalSupplyUpdated(_maxTotalSupply); } /// @dev Lets a contract admin set the recipient for all primary sales. function setPrimarySaleRecipient(address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { primarySaleRecipient = _saleRecipient; emit PrimarySaleRecipientUpdated(_saleRecipient); } /// @dev Lets a contract admin update the default royalty recipient and bps. function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_royaltyBps <= MAX_BPS, "> MAX_BPS"); royaltyRecipient = _royaltyRecipient; royaltyBps = uint16(_royaltyBps); emit DefaultRoyalty(_royaltyRecipient, _royaltyBps); } /// @dev Lets a contract admin set the royalty recipient and bps for a particular token Id. function setRoyaltyInfoForToken( uint256 _tokenId, address _recipient, uint256 _bps ) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_bps <= MAX_BPS, "> MAX_BPS"); royaltyInfoForToken[_tokenId] = RoyaltyInfo({ recipient: _recipient, bps: _bps }); emit RoyaltyForToken(_tokenId, _recipient, _bps); } /// @dev Lets a contract admin update the platform fee recipient and bps function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external onlyRole(DEFAULT_ADMIN_ROLE) { require(_platformFeeBps <= MAX_BPS, "> MAX_BPS."); platformFeeBps = uint16(_platformFeeBps); platformFeeRecipient = _platformFeeRecipient; emit PlatformFeeInfoUpdated(_platformFeeRecipient, _platformFeeBps); } /// @dev Lets a contract admin set a new owner for the contract. The new owner must be a contract admin. function setOwner(address _newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { require(hasRole(DEFAULT_ADMIN_ROLE, _newOwner), "!ADMIN"); address _prevOwner = _owner; _owner = _newOwner; emit OwnerUpdated(_prevOwner, _newOwner); } /// @dev Lets a contract admin set the URI for contract-level metadata. function setContractURI(string calldata _uri) external onlyRole(DEFAULT_ADMIN_ROLE) { contractURI = _uri; } /*/////////////////////////////////////////////////////////////// Miscellaneous //////////////////////////////////////////////////////////////*/ /// @dev Burns `tokenId`. See {ERC721-_burn}. function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "caller not owner nor approved"); _burn(tokenId); } /// @dev See {ERC721-_beforeTokenTransfer}. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721EnumerableUpgradeable) { super._beforeTokenTransfer(from, to, tokenId); // if transfer is restricted on the contract, we still want to allow burning and minting if (!hasRole(TRANSFER_ROLE, address(0)) && from != address(0) && to != address(0)) { require(hasRole(TRANSFER_ROLE, from) || hasRole(TRANSFER_ROLE, to), "!TRANSFER_ROLE"); } } function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address sender) { return ERC2771ContextUpgradeable._msgSender(); } function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) { return ERC2771ContextUpgradeable._msgData(); } }
// 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 * [EIP](https://eips.ethereum.org/EIPS/eip-165). * * 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 * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * 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: Apache-2.0 pragma solidity ^0.8.0; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: Apache 2.0 pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * Thirdweb's `Ownable` is a contract extension to be used with any base contract. It exposes functions for setting and reading * who the 'owner' of the inheriting smart contract is, and lets the inheriting contract perform conditional logic that uses * information about who the contract's owner is. */ interface IOwnable { /// @dev Returns the owner of the contract. function owner() external view returns (address); /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin. function setOwner(address _newOwner) external; /// @dev Emitted when a new Owner is set. event OwnerUpdated(address indexed prevOwner, address indexed newOwner); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * Thirdweb's `PlatformFee` is a contract extension to be used with any base contract. It exposes functions for setting and reading * the recipient of platform fee and the platform fee basis points, and lets the inheriting contract perform conditional logic * that uses information about platform fees, if desired. */ interface IPlatformFee { /// @dev Returns the platform fee bps and recipient. function getPlatformFeeInfo() external view returns (address, uint16); /// @dev Lets a module admin update the fees on primary sales. function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external; /// @dev Emitted when fee on primary sales is updated. event PlatformFeeInfoUpdated(address indexed platformFeeRecipient, uint256 platformFeeBps); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * Thirdweb's `Primary` is a contract extension to be used with any base contract. It exposes functions for setting and reading * the recipient of primary sales, and lets the inheriting contract perform conditional logic that uses information about * primary sales, if desired. */ interface IPrimarySale { /// @dev The adress that receives all primary sales value. function primarySaleRecipient() external view returns (address); /// @dev Lets a module admin set the default recipient of all primary sales. function setPrimarySaleRecipient(address _saleRecipient) external; /// @dev Emitted when a new sale recipient is set. event PrimarySaleRecipientUpdated(address indexed recipient); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import "../../eip/interface/IERC2981.sol"; /** * Thirdweb's `Royalty` is a contract extension to be used with any base contract. It exposes functions for setting and reading * the recipient of royalty fee and the royalty fee basis points, and lets the inheriting contract perform conditional logic * that uses information about royalty fees, if desired. * * The `Royalty` contract is ERC2981 compliant. */ interface IRoyalty is IERC2981 { struct RoyaltyInfo { address recipient; uint256 bps; } /// @dev Returns the royalty recipient and fee bps. function getDefaultRoyaltyInfo() external view returns (address, uint16); /// @dev Lets a module admin update the royalty bps and recipient. function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external; /// @dev Lets a module admin set the royalty recipient for a particular token Id. function setRoyaltyInfoForToken( uint256 tokenId, address recipient, uint256 bps ) external; /// @dev Returns the royalty recipient for a particular token Id. function getRoyaltyInfoForToken(uint256 tokenId) external view returns (address, uint16); /// @dev Emitted when royalty info is updated. event DefaultRoyalty(address indexed newRoyaltyRecipient, uint256 newRoyaltyBps); /// @dev Emitted when royalty recipient for tokenId is set event RoyaltyForToken(uint256 indexed tokenId, address indexed royaltyRecipient, uint256 royaltyBps); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; interface IThirdwebContract { /// @dev Returns the module type of the contract. function contractType() external pure returns (bytes32); /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8); /// @dev Returns the metadata URI of the contract. function contractURI() external view returns (string memory); /** * @dev Sets contract URI for the storefront-level metadata of the contract. * Only module admin can call this function. */ function setContractURI(string calldata _uri) external; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; interface IWETH { function deposit() external payable; function withdraw(uint256 amount) external; function transfer(address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/structs/BitMapsUpgradeable.sol"; /** * Thirdweb's 'Drop' contracts are distribution mechanisms for tokens. * * A contract admin (i.e. a holder of `DEFAULT_ADMIN_ROLE`) can set a series of claim conditions, * ordered by their respective `startTimestamp`. A claim condition defines criteria under which * accounts can mint tokens. Claim conditions can be overwritten or added to by the contract admin. * At any moment, there is only one active claim condition. */ interface IDropClaimCondition { /** * @notice The criteria that make up a claim condition. * * @param startTimestamp The unix timestamp after which the claim condition applies. * The same claim condition applies until the `startTimestamp` * of the next claim condition. * * @param maxClaimableSupply The maximum total number of tokens that can be claimed under * the claim condition. * * @param supplyClaimed At any given point, the number of tokens that have been claimed * under the claim condition. * * @param quantityLimitPerTransaction The maximum number of tokens that can be claimed in a single * transaction. * * @param waitTimeInSecondsBetweenClaims The least number of seconds an account must wait after claiming * tokens, to be able to claim tokens again. * * @param merkleRoot The allowlist of addresses that can claim tokens under the claim * condition. * * @param pricePerToken The price required to pay per token claimed. * * @param currency The currency in which the `pricePerToken` must be paid. */ struct ClaimCondition { uint256 startTimestamp; uint256 maxClaimableSupply; uint256 supplyClaimed; uint256 quantityLimitPerTransaction; uint256 waitTimeInSecondsBetweenClaims; bytes32 merkleRoot; uint256 pricePerToken; address currency; } /** * @notice The set of all claim conditions, at any given moment. * Claim Phase ID = [currentStartId, currentStartId + length - 1]; * * @param currentStartId The uid for the first claim condition amongst the current set of * claim conditions. The uid for each next claim condition is one * more than the previous claim condition's uid. * * @param count The total number of phases / claim conditions in the list * of claim conditions. * * @param phases The claim conditions at a given uid. Claim conditions * are ordered in an ascending order by their `startTimestamp`. * * @param limitLastClaimTimestamp Map from an account and uid for a claim condition, to the last timestamp * at which the account claimed tokens under that claim condition. * * @param limitMerkleProofClaim Map from a claim condition uid to whether an address in an allowlist * has already claimed tokens i.e. used their place in the allowlist. */ struct ClaimConditionList { uint256 currentStartId; uint256 count; mapping(uint256 => ClaimCondition) phases; mapping(uint256 => mapping(address => uint256)) limitLastClaimTimestamp; mapping(uint256 => BitMapsUpgradeable.BitMap) limitMerkleProofClaim; } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "./IDropClaimCondition.sol"; /** * Thirdweb's 'Drop' contracts are distribution mechanisms for tokens. The * `DropERC721` contract is a distribution mechanism for ERC721 tokens. * * A minter wallet (i.e. holder of `MINTER_ROLE`) can (lazy)mint 'n' tokens * at once by providing a single base URI for all tokens being lazy minted. * The URI for each of the 'n' tokens lazy minted is the provided base URI + * `{tokenId}` of the respective token. (e.g. "ipsf://Qmece.../1"). * * A minter can choose to lazy mint 'delayed-reveal' tokens. More on 'delayed-reveal' * tokens in [this article](https://blog.thirdweb.com/delayed-reveal-nfts). * * A contract admin (i.e. holder of `DEFAULT_ADMIN_ROLE`) can create claim conditions * with non-overlapping time windows, and accounts can claim the tokens according to * restrictions defined in the claim condition that is active at the time of the transaction. */ interface IDropERC721 is IERC721Upgradeable, IDropClaimCondition { /// @dev Emitted when tokens are claimed. event TokensClaimed( uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 startTokenId, uint256 quantityClaimed ); /// @dev Emitted when tokens are lazy minted. event TokensLazyMinted(uint256 startTokenId, uint256 endTokenId, string baseURI, bytes encryptedBaseURI); /// @dev Emitted when the URI for a batch of 'delayed-reveal' NFTs is revealed. event NFTRevealed(uint256 endTokenId, string revealedURI); /// @dev Emitted when new claim conditions are set. event ClaimConditionsUpdated(ClaimCondition[] claimConditions); /// @dev Emitted when the global max supply of tokens is updated. event MaxTotalSupplyUpdated(uint256 maxTotalSupply); /// @dev Emitted when the wallet claim count for an address is updated. event WalletClaimCountUpdated(address indexed wallet, uint256 count); /// @dev Emitted when the global max wallet claim count is updated. event MaxWalletClaimCountUpdated(uint256 count); /** * @notice Lets an account with `MINTER_ROLE` lazy mint 'n' NFTs. * The URIs for each token is the provided `_baseURIForTokens` + `{tokenId}`. * * @param amount The amount of NFTs to lazy mint. * @param baseURIForTokens The URI for the NFTs to lazy mint. If lazy minting * 'delayed-reveal' NFTs, the is a URI for NFTs in the * un-revealed state. * @param encryptedBaseURI If lazy minting 'delayed-reveal' NFTs, this is the * result of encrypting the URI of the NFTs in the revealed * state. */ function lazyMint( uint256 amount, string calldata baseURIForTokens, bytes calldata encryptedBaseURI ) external; /** * @notice Lets an account claim a given quantity of NFTs. * * @param receiver The receiver of the NFTs to claim. * @param quantity The quantity of NFTs to claim. * @param currency The currency in which to pay for the claim. * @param pricePerToken The price per token to pay for the claim. * @param proofs The proof of the claimer's inclusion in the merkle root allowlist * of the claim conditions that apply. * @param proofMaxQuantityPerTransaction (Optional) The maximum number of NFTs an address included in an * allowlist can claim. */ function claim( address receiver, uint256 quantity, address currency, uint256 pricePerToken, bytes32[] calldata proofs, uint256 proofMaxQuantityPerTransaction ) external payable; /** * @notice Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions. * * @param phases Claim conditions in ascending order by `startTimestamp`. * @param resetClaimEligibility Whether to reset `limitLastClaimTimestamp` and * `limitMerkleProofClaim` values when setting new * claim conditions. */ function setClaimConditions(ClaimCondition[] calldata phases, bool resetClaimEligibility) external; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; // Helper interfaces import { IWETH } from "../interfaces/IWETH.sol"; import "../openzeppelin-presets/token/ERC20/utils/SafeERC20.sol"; library CurrencyTransferLib { using SafeERC20 for IERC20; /// @dev The address interpreted as native token of the chain. address public constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev Transfers a given amount of currency. function transferCurrency( address _currency, address _from, address _to, uint256 _amount ) internal { if (_amount == 0) { return; } if (_currency == NATIVE_TOKEN) { safeTransferNativeToken(_to, _amount); } else { safeTransferERC20(_currency, _from, _to, _amount); } } /// @dev Transfers a given amount of currency. (With native token wrapping) function transferCurrencyWithWrapper( address _currency, address _from, address _to, uint256 _amount, address _nativeTokenWrapper ) internal { if (_amount == 0) { return; } if (_currency == NATIVE_TOKEN) { if (_from == address(this)) { // withdraw from weth then transfer withdrawn native token to recipient IWETH(_nativeTokenWrapper).withdraw(_amount); safeTransferNativeTokenWithWrapper(_to, _amount, _nativeTokenWrapper); } else if (_to == address(this)) { // store native currency in weth require(_amount == msg.value, "msg.value != amount"); IWETH(_nativeTokenWrapper).deposit{ value: _amount }(); } else { safeTransferNativeTokenWithWrapper(_to, _amount, _nativeTokenWrapper); } } else { safeTransferERC20(_currency, _from, _to, _amount); } } /// @dev Transfer `amount` of ERC20 token from `from` to `to`. function safeTransferERC20( address _currency, address _from, address _to, uint256 _amount ) internal { if (_from == _to) { return; } if (_from == address(this)) { IERC20(_currency).safeTransfer(_to, _amount); } else { IERC20(_currency).safeTransferFrom(_from, _to, _amount); } } /// @dev Transfers `amount` of native token to `to`. function safeTransferNativeToken(address to, uint256 value) internal { // solhint-disable avoid-low-level-calls // slither-disable-next-line low-level-calls (bool success, ) = to.call{ value: value }(""); require(success, "native token transfer failed"); } /// @dev Transfers `amount` of native token to `to`. (With native token wrapping) function safeTransferNativeTokenWithWrapper( address to, uint256 value, address _nativeTokenWrapper ) internal { // solhint-disable avoid-low-level-calls // slither-disable-next-line low-level-calls (bool success, ) = to.call{ value: value }(""); if (!success) { IWETH(_nativeTokenWrapper).deposit{ value: value }(); IERC20(_nativeTokenWrapper).safeTransfer(to, value); } } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; library FeeType { uint256 internal constant PRIMARY_SALE = 0; uint256 internal constant MARKET_SALE = 1; uint256 internal constant SPLIT = 2; }
// SPDX-License-Identifier: MIT // Modified from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.3.0/contracts/utils/cryptography/MerkleProof.sol // Copied from https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * Source: https://github.com/ensdomains/governance/blob/master/contracts/MerkleProof.sol */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool, uint256) { bytes32 computedHash = leaf; uint256 index = 0; for (uint256 i = 0; i < proof.length; i++) { index *= 2; bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); index += 1; } } // Check if the computed hash (root) is equal to the provided root return (computedHash == root, index); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library TWAddress { /** * @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. * * [EIP1884](https://eips.ethereum.org/EIPS/eip-1884) 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.0 (metatx/ERC2771Context.sol) pragma solidity ^0.8.11; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Context variant with ERC2771 support. */ abstract contract ERC2771ContextUpgradeable is Initializable, ContextUpgradeable { mapping(address => bool) private _trustedForwarder; function __ERC2771Context_init(address[] memory trustedForwarder) internal onlyInitializing { __Context_init_unchained(); __ERC2771Context_init_unchained(trustedForwarder); } function __ERC2771Context_init_unchained(address[] memory trustedForwarder) internal onlyInitializing { for (uint256 i = 0; i < trustedForwarder.length; i++) { _trustedForwarder[trustedForwarder[i]] = true; } } function isTrustedForwarder(address forwarder) public view virtual returns (bool) { return _trustedForwarder[forwarder]; } function _msgSender() internal view virtual override returns (address sender) { if (isTrustedForwarder(msg.sender)) { // The assembly code is more direct than the Solidity version using `abi.decode`. assembly { sender := shr(96, calldataload(sub(calldatasize(), 20))) } } else { return super._msgSender(); } } function _msgData() internal view virtual override returns (bytes calldata) { if (isTrustedForwarder(msg.sender)) { return msg.data[:msg.data.length - 20]; } else { return super._msgData(); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../../../../eip/interface/IERC20.sol"; import "../../../../lib/TWAddress.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using TWAddress for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerableUpgradeable.sol"; import "./AccessControlUpgradeable.sol"; import "../utils/structs/EnumerableSetUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable { function __AccessControlEnumerable_init() internal onlyInitializing { } function __AccessControlEnumerable_init_unchained() internal onlyInitializing { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[46] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 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 /// @solidity memory-safe-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; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol) pragma solidity ^0.8.0; import "./AddressUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Provides a function to batch together multiple calls in a single external call. * * _Available since v4.1._ */ abstract contract MulticallUpgradeable is Initializable { function __Multicall_init() internal onlyInitializing { } function __Multicall_init_unchained() internal onlyInitializing { } /** * @dev Receives and executes a batch of function calls on this contract. */ function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) { results = new bytes[](data.length); for (uint256 i = 0; i < data.length; i++) { results[i] = _functionDelegateCall(address(this), data[i]); } return results; } /** * @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) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol) pragma solidity ^0.8.0; /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMapsUpgradeable { struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] &= ~mask; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 490 }, "evmVersion": "london", "remappings": [ ":@chainlink/contracts/src/=node_modules/@chainlink/contracts/src/", ":@ds-test/=lib/ds-test/src/", ":@openzeppelin/=node_modules/@openzeppelin/", ":@std/=lib/forge-std/src/", ":contracts/=contracts/", ":ds-test/=lib/ds-test/src/", ":erc721a-upgradeable/=node_modules/erc721a-upgradeable/", ":erc721a/=node_modules/erc721a/", ":forge-std/=lib/forge-std/src/" ], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerTransaction","type":"uint256"},{"internalType":"uint256","name":"waitTimeInSecondsBetweenClaims","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"indexed":false,"internalType":"struct IDropClaimCondition.ClaimCondition[]","name":"claimConditions","type":"tuple[]"}],"name":"ClaimConditionsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRoyaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"newRoyaltyBps","type":"uint256"}],"name":"DefaultRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"maxTotalSupply","type":"uint256"}],"name":"MaxTotalSupplyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"MaxWalletClaimCountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"endTokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"revealedURI","type":"string"}],"name":"NFTRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"platformFeeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"platformFeeBps","type":"uint256"}],"name":"PlatformFeeInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"PrimarySaleRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"royaltyRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBps","type":"uint256"}],"name":"RoyaltyForToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"claimConditionIndex","type":"uint256"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantityClaimed","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"},{"indexed":false,"internalType":"bytes","name":"encryptedBaseURI","type":"bytes"}],"name":"TokensLazyMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"WalletClaimCountUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"baseURIIndices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"uint256","name":"_proofMaxQuantityPerTransaction","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimCondition","outputs":[{"internalType":"uint256","name":"currentStartId","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractType","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes","name":"key","type":"bytes"}],"name":"encryptDecrypt","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"encryptedData","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getActiveClaimConditionId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseURICount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conditionId","type":"uint256"}],"name":"getClaimConditionById","outputs":[{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerTransaction","type":"uint256"},{"internalType":"uint256","name":"waitTimeInSecondsBetweenClaims","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IDropClaimCondition.ClaimCondition","name":"condition","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conditionId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"}],"name":"getClaimTimestamp","outputs":[{"internalType":"uint256","name":"lastClaimTimestamp","type":"uint256"},{"internalType":"uint256","name":"nextValidClaimTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultRoyaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPlatformFeeInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyaltyInfoForToken","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_defaultAdmin","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"address[]","name":"_trustedForwarders","type":"address[]"},{"internalType":"address","name":"_saleRecipient","type":"address"},{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint128","name":"_royaltyBps","type":"uint128"},{"internalType":"uint128","name":"_platformFeeBps","type":"uint128"},{"internalType":"address","name":"_platformFeeRecipient","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_baseURIForTokens","type":"string"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"lazyMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletClaimCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenIdToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenIdToMint","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":[],"name":"primarySaleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"bytes","name":"_key","type":"bytes"}],"name":"reveal","outputs":[{"internalType":"string","name":"revealedURI","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"maxClaimableSupply","type":"uint256"},{"internalType":"uint256","name":"supplyClaimed","type":"uint256"},{"internalType":"uint256","name":"quantityLimitPerTransaction","type":"uint256"},{"internalType":"uint256","name":"waitTimeInSecondsBetweenClaims","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"address","name":"currency","type":"address"}],"internalType":"struct IDropClaimCondition.ClaimCondition[]","name":"_phases","type":"tuple[]"},{"internalType":"bool","name":"_resetClaimEligibility","type":"bool"}],"name":"setClaimConditions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint256","name":"_royaltyBps","type":"uint256"}],"name":"setDefaultRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTotalSupply","type":"uint256"}],"name":"setMaxTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setMaxWalletClaimCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_platformFeeRecipient","type":"address"},{"internalType":"uint256","name":"_platformFeeBps","type":"uint256"}],"name":"setPlatformFeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_saleRecipient","type":"address"}],"name":"setPrimarySaleRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_bps","type":"uint256"}],"name":"setRoyaltyInfoForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setWalletClaimCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conditionId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_currency","type":"address"},{"internalType":"uint256","name":"_pricePerToken","type":"uint256"},{"internalType":"bool","name":"verifyMaxQuantityPerTransaction","type":"bool"}],"name":"verifyClaim","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_conditionId","type":"uint256"},{"internalType":"address","name":"_claimer","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_proofs","type":"bytes32[]"},{"internalType":"uint256","name":"_proofMaxQuantityPerTransaction","type":"uint256"}],"name":"verifyClaimMerkleProof","outputs":[{"internalType":"bool","name":"validMerkleProof","type":"bool"},{"internalType":"uint256","name":"merkleProofIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletClaimCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50600054610100900460ff1615808015620000335750600054600160ff909116105b8062000063575062000050306200013d60201b62002f681760201c565b15801562000063575060005460ff166001145b620000cb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805460ff191660011790558015620000ef576000805461ff0019166101001790555b801562000136576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b506200014c565b6001600160a01b03163b151590565b615ce2806200015c6000396000f3fe6080604052600436106103ce5760003560e01c80637a5a8e7e116101fd578063b24f2d3911610118578063d45573f6116100ab578063e15916341161007a578063e159163414610c74578063e23b816414610c94578063e715032214610cb4578063e8a3d48514610cd4578063e985e9c514610ce957600080fd5b8063d45573f614610beb578063d547741f14610c17578063d637ed5914610c37578063d860483f14610c5457600080fd5b8063ca15c873116100e7578063ca15c87314610b6b578063cb2ef6f714610b8b578063ce80564214610bab578063d37c353b14610bcb57600080fd5b8063b24f2d3914610aea578063b88d4fde14610b16578063c68907de14610b36578063c87b56dd14610b4b57600080fd5b8063a05112fc11610190578063ac9650d81161015f578063ac9650d814610a4f578063acd083f814610a7c578063af3be89014610a93578063afb8291614610aca57600080fd5b8063a05112fc146109de578063a0a8e460146109fe578063a217fddf14610a1a578063a22cb46514610a2f57600080fd5b806391d14854116101cc57806391d1485414610943578063938e3d7b1461098957806395d89b41146109a95780639bcf7a15146109be57600080fd5b80637a5a8e7e146108c657806386ee745d146108d95780638da5cb5b1461090e5780639010d07c1461092357600080fd5b80633b1475a7116102ed578063508679571161028057806363b45e2d1161024f57806363b45e2d146107e65780636f4f2837146107fc5780636f8934f41461081c57806370a08231146108a657600080fd5b8063508679571461074d578063572b6c051461076d578063600dd5ea146107a65780636352211e146107c657600080fd5b806342966c68116102bc57806342966c681461069d5780634352ab41146106bd5780634cc157df146106eb5780634f6ccce71461072d57600080fd5b80633b1475a7146106265780633ea33f291461063d5780633f3e4c111461065d57806342842e0e1461067d57600080fd5b80631e7ac488116103655780632ab4d052116103345780632ab4d052146105af5780632f2ff15d146105c65780632f745c59146105e657806336568abe1461060657600080fd5b80631e7ac4881461050057806323b872dd14610520578063248a9ca3146105405780632a55205a1461057057600080fd5b8063081812fc116103a1578063081812fc14610488578063095ea7b3146104a857806313af4035146104ca57806318160ddd146104ea57600080fd5b806301ffc9a7146103d3578063059817691461040857806306fdde031461042d578063079fe40e1461044f575b600080fd5b3480156103df57600080fd5b506103f36103ee366004614cc2565b610d33565b60405190151581526020015b60405180910390f35b34801561041457600080fd5b5061041f6101c75481565b6040519081526020016103ff565b34801561043957600080fd5b50610442610d5f565b6040516103ff9190614d37565b34801561045b57600080fd5b506101c654610470906001600160a01b031681565b6040516001600160a01b0390911681526020016103ff565b34801561049457600080fd5b506104706104a3366004614d4a565b610df2565b3480156104b457600080fd5b506104c86104c3366004614d88565b610e1a565b005b3480156104d657600080fd5b506104c86104e5366004614db4565b610f47565b3480156104f657600080fd5b506101935461041f565b34801561050c57600080fd5b506104c861051b366004614d88565b611016565b34801561052c57600080fd5b506104c861053b366004614dd1565b6110ce565b34801561054c57600080fd5b5061041f61055b366004614d4a565b600090815260fb602052604090206001015490565b34801561057c57600080fd5b5061059061058b366004614e12565b61114d565b604080516001600160a01b0390931683526020830191909152016103ff565b3480156105bb57600080fd5b5061041f6101c85481565b3480156105d257600080fd5b506104c86105e1366004614e34565b61118a565b3480156105f257600080fd5b5061041f610601366004614d88565b6111af565b34801561061257600080fd5b506104c8610621366004614e34565b611246565b34801561063257600080fd5b5061041f6101c45481565b34801561064957600080fd5b506104c8610658366004614d88565b6112e2565b34801561066957600080fd5b506104c8610678366004614d4a565b61133b565b34801561068957600080fd5b506104c8610698366004614dd1565b611384565b3480156106a957600080fd5b506104c86106b8366004614d4a565b61139f565b3480156106c957600080fd5b5061041f6106d8366004614db4565b6101d46020526000908152604090205481565b3480156106f757600080fd5b5061070b610706366004614d4a565b611402565b604080516001600160a01b03909316835261ffff9091166020830152016103ff565b34801561073957600080fd5b5061041f610748366004614d4a565b61146f565b34801561075957600080fd5b506104c8610768366004614d4a565b611504565b34801561077957600080fd5b506103f3610788366004614db4565b6001600160a01b031660009081526065602052604090205460ff1690565b3480156107b257600080fd5b506104c86107c1366004614d88565b611545565b3480156107d257600080fd5b506104706107e1366004614d4a565b6115ea565b3480156107f257600080fd5b506101cc5461041f565b34801561080857600080fd5b506104c8610817366004614db4565b611650565b34801561082857600080fd5b5061083c610837366004614d4a565b6116a7565b6040516103ff9190600061010082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c08301526001600160a01b0360e08401511660e083015292915050565b3480156108b257600080fd5b5061041f6108c1366004614db4565b611773565b6104c86108d4366004614ea9565b6117fa565b3480156108e557600080fd5b506108f96108f4366004614e34565b6119fa565b604080519283526020830191909152016103ff565b34801561091a57600080fd5b50610470611a44565b34801561092f57600080fd5b5061047061093e366004614e12565b611a9f565b34801561094f57600080fd5b506103f361095e366004614e34565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561099557600080fd5b506104c86109a4366004614f70565b611abf565b3480156109b557600080fd5b50610442611add565b3480156109ca57600080fd5b506104c86109d9366004614fb2565b611aed565b3480156109ea57600080fd5b506104426109f9366004614d4a565b611bbd565b348015610a0a57600080fd5b50604051600381526020016103ff565b348015610a2657600080fd5b5061041f600081565b348015610a3b57600080fd5b506104c8610a4a366004614fe7565b611c58565b348015610a5b57600080fd5b50610a6f610a6a366004615015565b611c6a565b6040516103ff919061504b565b348015610a8857600080fd5b5061041f6101c55481565b348015610a9f57600080fd5b50610ab3610aae3660046150ad565b611d5f565b6040805192151583526020830191909152016103ff565b348015610ad657600080fd5b506104c8610ae536600461511f565b611f89565b348015610af657600080fd5b506101ca546001600160a01b03811690600160a01b900461ffff1661070b565b348015610b2257600080fd5b506104c8610b3136600461524b565b6122e3565b348015610b4257600080fd5b5061041f612363565b348015610b5757600080fd5b50610442610b66366004614d4a565b61240a565b348015610b7757600080fd5b5061041f610b86366004614d4a565b612551565b348015610b9757600080fd5b506944726f7045524337323160b01b61041f565b348015610bb757600080fd5b50610442610bc63660046152b7565b612569565b348015610bd757600080fd5b506104c8610be6366004615303565b6127ff565b348015610bf757600080fd5b506101c9546001600160a01b03811690600160a01b900461ffff1661070b565b348015610c2357600080fd5b506104c8610c32366004614e34565b612941565b348015610c4357600080fd5b506101cd546101ce546108f9919082565b348015610c6057600080fd5b5061041f610c6f366004614d4a565b612966565b348015610c8057600080fd5b506104c8610c8f36600461541b565b612988565b348015610ca057600080fd5b506104c8610caf36600461552e565b612bd4565b348015610cc057600080fd5b50610442610ccf3660046155b4565b612ee5565b348015610ce057600080fd5b50610442612f5a565b348015610cf557600080fd5b506103f3610d04366004615610565b6001600160a01b0391821660009081526101646020908152604080832093909416825291909152205460ff1690565b6000610d3e82612f77565b80610d59575063152a902d60e11b6001600160e01b03198316145b92915050565b606061015f8054610d6f9061563e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9b9061563e565b8015610de85780601f10610dbd57610100808354040283529160200191610de8565b820191906000526020600020905b815481529060010190602001808311610dcb57829003601f168201915b5050505050905090565b6000610dfd82612f9c565b50600090815261016360205260409020546001600160a01b031690565b6000610e25826115ea565b9050806001600160a01b0316836001600160a01b03161415610e985760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b0316610eaa613001565b6001600160a01b03161480610ec65750610ec681610d04613001565b610f385760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610e8f565b610f42838361300b565b505050565b6000610f528161307a565b6001600160a01b03821660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604090205460ff16610fc25760405162461bcd60e51b815260206004820152600660248201526510a0a226a4a760d11b6044820152606401610e8f565b6101c380546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a3505050565b60006110218161307a565b6127108211156110605760405162461bcd60e51b815260206004820152600a6024820152691f1026a0ac2fa128299760b11b6044820152606401610e8f565b6101c980546001600160b01b031916600160a01b61ffff8516026001600160a01b031916176001600160a01b0385169081179091556040518381527fe2497bd806ec41a6e0dd992c29a72efc0ef8fec9092d1978fd4a1e00b2f18304906020015b60405180910390a2505050565b6110df6110d9613001565b8261308b565b6111425760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610e8f565b610f4283838361310b565b60008060008061115c86611402565b90945084925061ffff169050612710611175828761568f565b61117f91906156c4565b925050509250929050565b600082815260fb60205260409020600101546111a58161307a565b610f4283836132b5565b60006111ba83611773565b821061121c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e8f565b506001600160a01b0391909116600090815261019160209081526040808320938352929052205490565b61124e613001565b6001600160a01b0316816001600160a01b0316146112d45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610e8f565b6112de82826132d8565b5050565b60006112ed8161307a565b6001600160a01b03831660008181526101d4602052604090819020849055517f8973b95d42472e89416ea69404f8038c041db700af9ec294e7b4cd4e1ff2801c906110c19085815260200190565b60006113468161307a565b6101c88290556040518281527ff2672935fc79f5237559e2e2999dbe743bf65430894ac2b37666890e7c69e1af906020015b60405180910390a15050565b610f42838383604051806020016040528060008152506122e3565b6113aa6110d9613001565b6113f65760405162461bcd60e51b815260206004820152601d60248201527f63616c6c6572206e6f74206f776e6572206e6f7220617070726f7665640000006044820152606401610e8f565b6113ff816132fb565b50565b60008181526101d560209081526040808320815180830190925280546001600160a01b03168083526001909101549282019290925282911561144a5780516020820151611465565b6101ca546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b600061147b6101935490565b82106114de5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610e8f565b61019382815481106114f2576114f26156d8565b90600052602060002001549050919050565b600061150f8161307a565b6101c78290556040518281527ff9d383c69b6255cbd431ca23734f43bdf15e694c7494956c917498469bcbce7390602001611378565b60006115508161307a565b61271082111561158e5760405162461bcd60e51b81526020600482015260096024820152683e204d41585f42505360b81b6044820152606401610e8f565b6101ca80546001600160a01b0385166001600160b01b03199091168117600160a01b61ffff861602179091556040518381527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb906020016110c1565b600081815261016160205260408120546001600160a01b031680610d595760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610e8f565b600061165b8161307a565b6101c680546001600160a01b0319166001600160a01b0384169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a25050565b6116fb6040518061010001604052806000815260200160008152602001600081526020016000815260200160008152602001600080191681526020016000815260200160006001600160a01b031681525090565b5060009081526101cf6020908152604091829020825161010081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c08201526007909101546001600160a01b031660e082015290565b60006001600160a01b0382166117dd5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610e8f565b506001600160a01b03166000908152610162602052604090205490565b6002600154141561184d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e8f565b60026001553360009081526065602052604090205460ff168061187f575032611874613001565b6001600160a01b0316145b6118b15760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610e8f565b6101c55460006118bf612363565b905060006118d8826118cf613001565b8b898989611d5f565b50905060008415806118fa575060008381526101cf6020526040902060050154155b905061191183611908613001565b8c8c8c86611f89565b81801561191e5750600085115b156119755761197561192e613001565b60008581526101d16020908152604080832072ffffffffffffffffffffffffffffffffffffff600886901c16845290915290208054600160ff9093169290921b9091179055565b6119808a8a8a6133a4565b61198b8b848c6134ab565b8a6001600160a01b031661199d613001565b6001600160a01b0316847ffa76a4010d9533e3e964f2930a65fb6042a12fa6ff5b08281837a10b0be7321e878e6040516119e1929190918252602082015260400190565b60405180910390a4505060018055505050505050505050565b60008281526101d0602090815260408083206001600160a01b03851684528252808320548584526101cf90925290912060040154810181811015611a3d57506000195b9250929050565b6101c3546001600160a01b031660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604081205460ff16611a8c5750600090565b6101c3546001600160a01b03165b905090565b600082815261012d60205260408120611ab89083613593565b9392505050565b6000611aca8161307a565b611ad76101cb8484614b69565b50505050565b60606101608054610d6f9061563e565b6000611af88161307a565b612710821115611b365760405162461bcd60e51b81526020600482015260096024820152683e204d41585f42505360b81b6044820152606401610e8f565b6040805180820182526001600160a01b03858116808352602080840187815260008a81526101d58352869020945185546001600160a01b031916941693909317845591516001909301929092559151848152909186917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d910160405180910390a350505050565b6101d36020526000908152604090208054611bd79061563e565b80601f0160208091040260200160405190810160405280929190818152602001828054611c039061563e565b8015611c505780601f10611c2557610100808354040283529160200191611c50565b820191906000526020600020905b815481529060010190602001808311611c3357829003601f168201915b505050505081565b6112de611c63613001565b838361359f565b60608167ffffffffffffffff811115611c8557611c85615186565b604051908082528060200260200182016040528015611cb857816020015b6060815260200190600190039081611ca35790505b50905060005b82811015611d5857611d2830858584818110611cdc57611cdc6156d8565b9050602002810190611cee91906156ee565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061366f92505050565b828281518110611d3a57611d3a6156d8565b60200260200101819052508080611d5090615735565b915050611cbe565b5092915050565b60008681526101cf60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a08301819052600682015460c08401526007909101546001600160a01b031660e083015282919015611f7d57611e5886868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060a08301516040516bffffffffffffffffffffffff1960608d901b1660208201526034810188905260540160405160208183030381529060405280519060200120613763565b909350915082611eaa5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420696e2077686974656c6973742e0000000000000000000000000000006044820152606401610e8f565b60008981526101d16020908152604080832072ffffffffffffffffffffffffffffffffffffff60088d901c168452909152902054600160ff8a161b1615611f245760405162461bcd60e51b815260206004820152600e60248201526d383937b7b31031b630b4b6b2b21760911b6044820152606401610e8f565b831580611f315750838711155b611f7d5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964207175616e746974792070726f6f662e0000000000000000006044820152606401610e8f565b50965096945050505050565b60008681526101cf6020908152604091829020825161010081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c08201526007909101546001600160a01b0390811660e0830181905290851614801561201457508060c0015183145b6120605760405162461bcd60e51b815260206004820152601a60248201527f696e76616c69642063757272656e6379206f722070726963652e0000000000006044820152606401610e8f565b60008511801561207c575081158061207c575080606001518511155b6120c85760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207175616e746974792e0000000000000000000000000000006044820152606401610e8f565b80602001518582604001516120dd9190615750565b111561212b5760405162461bcd60e51b815260206004820152601c60248201527f657863656564206d617820636c61696d61626c6520737570706c792e000000006044820152606401610e8f565b6101c454856101c55461213e9190615750565b111561218c5760405162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f756768206d696e74656420746f6b656e732e000000000000006044820152606401610e8f565b6101c85415806121ad57506101c854856101c5546121aa9190615750565b11155b6121f95760405162461bcd60e51b815260206004820152601860248201527f657863656564206d617820746f74616c20737570706c792e00000000000000006044820152606401610e8f565b6101c754158061223057506101c7546001600160a01b03871660009081526101d4602052604090205461222d908790615750565b11155b61227c5760405162461bcd60e51b815260206004820152601260248201527f65786365656420636c61696d206c696d697400000000000000000000000000006044820152606401610e8f565b60008061228989896119fa565b91509150816000148061229c5750804210155b6122d85760405162461bcd60e51b815260206004820152600d60248201526c31b0b73737ba1031b630b4b69760991b6044820152606401610e8f565b505050505050505050565b6122f46122ee613001565b8361308b565b6123575760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610e8f565b611ad784848484613831565b6101ce546101cd54600091829161237a9190615750565b90505b6101cd548111156123d3576101cf6000612398600184615768565b81526020019081526020016000206000015442106123c1576123bb600182615768565b91505090565b806123cb8161577f565b91505061237d565b5060405162461bcd60e51b815260206004820152600b60248201526a10a1a7a72224aa24a7a71760a91b6044820152606401610e8f565b606060005b6101cc5481101561253b576101cc818154811061242e5761242e6156d8565b9060005260206000200154831015612529576101d360006101cc8381548110612459576124596156d8565b90600052602060002001548152602001908152602001600020805461247d9061563e565b1590506124dd576101d260006101cc838154811061249d5761249d6156d8565b906000526020600020015481526020019081526020016000206040516020016124c69190615830565b604051602081830303815290604052915050919050565b6101d260006101cc83815481106124f6576124f66156d8565b90600052602060002001548152602001908152602001600020612518846138af565b6040516020016124c692919061584d565b612534600182615750565b905061240f565b5050604080516020810190915260008152919050565b600081815261012d60205260408120610d59906139ad565b60607f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66125958161307a565b6101cc5485106125d85760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21034b73232bc1760911b6044820152606401610e8f565b60006101cc86815481106125ee576125ee6156d8565b9060005260206000200154905060006101d36000838152602001908152602001600020805461261c9061563e565b80601f01602080910402602001604051908101604052809291908181526020018280546126489061563e565b80156126955780601f1061266a57610100808354040283529160200191612695565b820191906000526020600020905b81548152906001019060200180831161267857829003601f168201915b50505050509050600080828060200190518101906126b39190615872565b915091508151600014156127095760405162461bcd60e51b815260206004820152601260248201527f6e6f7468696e6720746f2072657665616c2e00000000000000000000000000006044820152606401610e8f565b612714828989612ee5565b9550808689894660405160200161272e94939291906158f3565b60405160208183030381529060405280519060200120146127815760405162461bcd60e51b815260206004820152600d60248201526c496e636f7272656374206b657960981b6044820152606401610e8f565b60008481526101d26020908152604090912087516127a192890190614bed565b5060008481526101d3602052604081206127ba91614c61565b7f09b52c0c3a3e08761cd3917c8e49275ed1e0982477b54047add8b4d70513bc8684876040516127eb92919061591c565b60405180910390a150505050509392505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66128298161307a565b6101c45460006128398883615750565b6101c481905560008181526101d26020526040902090915061285c908888614b69565b506101cc80546001810182556000919091527f9a37fbd5e796e9046c2f5f7e29046a230a4ba9ada48a80535ed93a51fec5cfbc0181905583156128e1576000806128a886880188615935565b9150915081516000141580156128bd57508015155b156128de5760008381526101d3602052604090206128dc908888614b69565b505b50505b7f2a0365091ef1a40953c670dce28177e37520648a6fdc91506bffac0ab045570d82600161290f8b83615750565b6129199190615768565b8989898960405161292f969594939291906159a3565b60405180910390a15050505050505050565b600082815260fb602052604090206001015461295c8161307a565b610f4283836132d8565b6101cc818154811061297757600080fd5b600091825260209091200154905081565b600054610100900460ff16158080156129a85750600054600160ff909116105b806129c25750303b1580156129c2575060005460ff166001145b612a255760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e8f565b6000805460ff191660011790558015612a48576000805461ff0019166101001790555b612a506139b7565b612a59876139e8565b612a638a8a613a20565b6101ca80546001600160a01b038781166001600160b01b031992831617600160a01b61ffff8981168202929092179094556101c980548784169416939093179087169093029290921790556101c680546001600160a01b0319169188169190911790558751612ada906101cb9060208b0190614bed565b506101c380546001600160a01b0319166001600160a01b038d16179055612b0260008c613a51565b612b2c7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68c613a51565b612b567f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c8c613a51565b612b817f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c6000613a51565b8015612bc7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000612bdf8161307a565b6101cd546101ce54818415612bfb57612bf88284615750565b90505b6101ce8690556101cd8190556000805b87811015612d9b57801580612c3b5750888882818110612c2d57612c2d6156d8565b905061010002016000013582105b612c6c5760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401610e8f565b60006101cf81612c7c8487615750565b8152602001908152602001600020600201549050898983818110612ca257612ca26156d8565b9050610100020160200135811115612cfc5760405162461bcd60e51b815260206004820152601a60248201527f6d617820737570706c7920636c61696d656420616c72656164790000000000006044820152606401610e8f565b898983818110612d0e57612d0e6156d8565b610100029190910190506101cf6000612d278588615750565b81526020019081526020016000208181612d4191906159e3565b508190506101cf6000612d548588615750565b8152602081019190915260400160002060020155898983818110612d7a57612d7a6156d8565b90506101000201600001359250508080612d9390615735565b915050612c0b565b508515612e1b57835b82811015612e155760008181526101cf60209081526040822082815560018101839055600281018390556003810183905560048101839055600581018390556006810192909255600790910180546001600160a01b03191690556101d1905280612e0d81615735565b915050612da4565b50612eb4565b86831115612eb457865b83811015612eb2576101cf6000612e3c8386615750565b81526020810191909152604001600090812081815560018101829055600281018290556003810182905560048101829055600581018290556006810182905560070180546001600160a01b03191690556101d190612e9a8386615750565b81526020015280612eaa81615735565b915050612e25565b505b7f22ddd1bcb3816651679299dbffccb94973edec10c32e88dc2f4735c7699a02ca888860405161292f929190615a54565b8251604080518083016020019091528181529060005b81811015612f51576000858583604051602001612f1a93929190615aeb565b60408051601f19818403018152919052805160209182012088840182015118858401820152612f4a915082615750565b9050612efb565b50509392505050565b6101cb8054611bd79061563e565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b1480610d595750610d5982613a5b565b600081815261016160205260409020546001600160a01b03166113ff5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610e8f565b6000611a9a613a9b565b60008181526101636020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613041826115ea565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6113ff81613086613001565b613ac5565b600080613097836115ea565b9050806001600160a01b0316846001600160a01b031614806130df57506001600160a01b038082166000908152610164602090815260408083209388168352929052205460ff165b806131035750836001600160a01b03166130f884610df2565b6001600160a01b0316145b949350505050565b826001600160a01b031661311e826115ea565b6001600160a01b0316146131825760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610e8f565b6001600160a01b0382166131e45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610e8f565b6131ef838383613b45565b6131fa60008261300b565b6001600160a01b038316600090815261016260205260408120805460019290613224908490615768565b90915550506001600160a01b038216600090815261016260205260408120805460019290613253908490615750565b90915550506000818152610161602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6132bf8282613c85565b600082815261012d60205260409020610f429082613d28565b6132e28282613d3d565b600082815261012d60205260409020610f429082613dde565b6000613306826115ea565b905061331481600084613b45565b61331f60008361300b565b6001600160a01b038116600090815261016260205260408120805460019290613349908490615768565b90915550506000828152610161602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b806133ae57505050565b60006133ba828561568f565b6101c954909150600090612710906133dd90600160a01b900461ffff168461568f565b6133e791906156c4565b90506001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561345d5781341461345d5760405162461bcd60e51b815260206004820152601660248201527f6d7573742073656e6420746f74616c2070726963652e000000000000000000006044820152606401610e8f565b61347c84613469613001565b6101c9546001600160a01b031684613df3565b6134a484613488613001565b6101c6546001600160a01b031661349f8587615768565b613df3565b5050505050565b60008281526101cf6020526040812060020180548392906134cd908490615750565b909155505060008281526101d06020526040812042916134eb613001565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550806101d4600061351d613001565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461354c9190615750565b90915550506101c55460005b828110156135895761356a8583613e3d565b613575600183615750565b9150613582600182615750565b9050613558565b506101c555505050565b6000611ab88383613f8e565b816001600160a01b0316836001600160a01b031614156136015760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e8f565b6001600160a01b0383811660008181526101646020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606001600160a01b0383163b6136d75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610e8f565b600080846001600160a01b0316846040516136f29190615afd565b600060405180830381855af49150503d806000811461372d576040519150601f19603f3d011682016040523d82523d6000602084013e613732565b606091505b509150915061375a8282604051806060016040528060278152602001615c8660279139613fb8565b95945050505050565b6000808281805b87518110156138255761377e60028361568f565b91506000888281518110613794576137946156d8565b602002602001015190508084116137d6576040805160208101869052908101829052606001604051602081830303815290604052805190602001209350613812565b604080516020810183905290810185905260600160405160208183030381529060405280519060200120935060018361380f9190615750565b92505b508061381d81615735565b91505061376a565b50941495939450505050565b61383c84848461310b565b61384884848484613ff1565b611ad75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610e8f565b6060816138d35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156138fd57806138e781615735565b91506138f69050600a836156c4565b91506138d7565b60008167ffffffffffffffff81111561391857613918615186565b6040519080825280601f01601f191660200182016040528015613942576020820181803683370190505b5090505b841561310357613957600183615768565b9150613964600a86615b19565b61396f906030615750565b60f81b818381518110613984576139846156d8565b60200101906001600160f81b031916908160001a9053506139a6600a866156c4565b9450613946565b6000610d59825490565b600054610100900460ff166139de5760405162461bcd60e51b8152600401610e8f90615b2d565b6139e6614141565b565b600054610100900460ff16613a0f5760405162461bcd60e51b8152600401610e8f90615b2d565b613a1761416e565b6113ff81614195565b600054610100900460ff16613a475760405162461bcd60e51b8152600401610e8f90615b2d565b6112de8282614224565b6112de82826132b5565b60006001600160e01b031982166380ac58cd60e01b1480613a8c57506001600160e01b03198216635b5e139f60e01b145b80610d595750610d5982614274565b3360009081526065602052604081205460ff1615613ac0575060131936013560601c90565b503390565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff166112de57613b03816001600160a01b03166014614299565b613b0e836020614299565b604051602001613b1f929190615b78565b60408051601f198184030181529082905262461bcd60e51b8252610e8f91600401614d37565b613b50838383614442565b600080527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a13126020527f70e64e82d0337f3fa9071fdb3266f859725ed1fc29697b2e6e986b76cffbfb085460ff16158015613bb257506001600160a01b03831615155b8015613bc657506001600160a01b03821615155b15610f42576001600160a01b03831660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff1680613c4857506001600160a01b03821660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff165b610f425760405162461bcd60e51b815260206004820152600e60248201526d215452414e534645525f524f4c4560901b6044820152606401610e8f565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff166112de57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613ce4613001565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611ab8836001600160a01b0384166144fc565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff16156112de57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19169055613d9a613001565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611ab8836001600160a01b03841661454b565b80613dfd57611ad7565b6001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415613e3157613e2c828261463e565b611ad7565b611ad7848484846146e1565b6001600160a01b038216613e935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e8f565b600081815261016160205260409020546001600160a01b031615613ef95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e8f565b613f0560008383613b45565b6001600160a01b038216600090815261016260205260408120805460019290613f2f908490615750565b90915550506000818152610161602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000826000018281548110613fa557613fa56156d8565b9060005260206000200154905092915050565b60608315613fc7575081611ab8565b825115613fd75782518084602001fd5b8160405162461bcd60e51b8152600401610e8f9190614d37565b60006001600160a01b0384163b1561413657836001600160a01b031663150b7a0261401a613001565b8786866040518563ffffffff1660e01b815260040161403c9493929190615bf9565b6020604051808303816000875af1925050508015614077575060408051601f3d908101601f1916820190925261407491810190615c35565b60015b61411c573d8080156140a5576040519150601f19603f3d011682016040523d82523d6000602084013e6140aa565b606091505b5080516141145760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610e8f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613103565b506001949350505050565b600054610100900460ff166141685760405162461bcd60e51b8152600401610e8f90615b2d565b60018055565b600054610100900460ff166139e65760405162461bcd60e51b8152600401610e8f90615b2d565b600054610100900460ff166141bc5760405162461bcd60e51b8152600401610e8f90615b2d565b60005b81518110156112de576001606560008484815181106141e0576141e06156d8565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061421c81615735565b9150506141bf565b600054610100900460ff1661424b5760405162461bcd60e51b8152600401610e8f90615b2d565b815161425f9061015f906020850190614bed565b508051610f4290610160906020840190614bed565b60006001600160e01b03198216635a05180f60e01b1480610d595750610d598261473a565b606060006142a883600261568f565b6142b3906002615750565b67ffffffffffffffff8111156142cb576142cb615186565b6040519080825280601f01601f1916602001820160405280156142f5576020820181803683370190505b509050600360fc1b81600081518110614310576143106156d8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061433f5761433f6156d8565b60200101906001600160f81b031916908160001a905350600061436384600261568f565b61436e906001615750565b90505b60018111156143f3577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106143af576143af6156d8565b1a60f81b8282815181106143c5576143c56156d8565b60200101906001600160f81b031916908160001a90535060049490941c936143ec8161577f565b9050614371565b508315611ab85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e8f565b6001600160a01b03831661449f5761449a816101938054600083815261019460205260408120829055600182018355919091527ffc8af01f449989052b52093a58fc9f42d0b11f0c6dd5dca0463dab62346ccc680155565b6144c2565b816001600160a01b0316836001600160a01b0316146144c2576144c2838261476f565b6001600160a01b0382166144d957610f4281614811565b826001600160a01b0316826001600160a01b031614610f4257610f4282826148c6565b600081815260018301602052604081205461454357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d59565b506000610d59565b6000818152600183016020526040812054801561463457600061456f600183615768565b855490915060009061458390600190615768565b90508181146145e85760008660000182815481106145a3576145a36156d8565b90600052602060002001549050808760000184815481106145c6576145c66156d8565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806145f9576145f9615c52565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d59565b6000915050610d59565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461468b576040519150601f19603f3d011682016040523d82523d6000602084013e614690565b606091505b5050905080610f425760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606401610e8f565b816001600160a01b0316836001600160a01b0316141561470057611ad7565b6001600160a01b03831630141561472557613e2c6001600160a01b038516838361490c565b611ad76001600160a01b038516848484614984565b60006001600160e01b03198216637965db0b60e01b1480610d5957506301ffc9a760e01b6001600160e01b0319831614610d59565b6000600161477c84611773565b6147869190615768565b600083815261019260205260409020549091508082146147dc576001600160a01b038416600090815261019160209081526040808320858452825280832054848452818420819055835261019290915290208190555b506000918252610192602090815260408084208490556001600160a01b03909416835261019181528383209183525290812055565b6101935460009061482490600190615768565b60008381526101946020526040812054610193805493945090928490811061484e5761484e6156d8565b90600052602060002001549050806101938381548110614870576148706156d8565b600091825260208083209091019290925582815261019490915260408082208490558582528120556101938054806148aa576148aa615c52565b6001900381819060005260206000200160009055905550505050565b60006148d183611773565b6001600160a01b0390931660009081526101916020908152604080832086845282528083208590559382526101929052919091209190915550565b6040516001600160a01b038316602482015260448101829052610f4290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526149bc565b6040516001600160a01b0380851660248301528316604482015260648101829052611ad79085906323b872dd60e01b90608401614938565b6000614a11826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a8e9092919063ffffffff16565b805190915015610f425780806020019051810190614a2f9190615c68565b610f425760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610e8f565b60606131038484600085856001600160a01b0385163b614af05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e8f565b600080866001600160a01b03168587604051614b0c9190615afd565b60006040518083038185875af1925050503d8060008114614b49576040519150601f19603f3d011682016040523d82523d6000602084013e614b4e565b606091505b5091509150614b5e828286613fb8565b979650505050505050565b828054614b759061563e565b90600052602060002090601f016020900481019282614b975760008555614bdd565b82601f10614bb05782800160ff19823516178555614bdd565b82800160010185558215614bdd579182015b82811115614bdd578235825591602001919060010190614bc2565b50614be9929150614c97565b5090565b828054614bf99061563e565b90600052602060002090601f016020900481019282614c1b5760008555614bdd565b82601f10614c3457805160ff1916838001178555614bdd565b82800160010185558215614bdd579182015b82811115614bdd578251825591602001919060010190614c46565b508054614c6d9061563e565b6000825580601f10614c7d575050565b601f0160209004906000526020600020908101906113ff91905b5b80821115614be95760008155600101614c98565b6001600160e01b0319811681146113ff57600080fd5b600060208284031215614cd457600080fd5b8135611ab881614cac565b60005b83811015614cfa578181015183820152602001614ce2565b83811115611ad75750506000910152565b60008151808452614d23816020860160208601614cdf565b601f01601f19169290920160200192915050565b602081526000611ab86020830184614d0b565b600060208284031215614d5c57600080fd5b5035919050565b6001600160a01b03811681146113ff57600080fd5b8035614d8381614d63565b919050565b60008060408385031215614d9b57600080fd5b8235614da681614d63565b946020939093013593505050565b600060208284031215614dc657600080fd5b8135611ab881614d63565b600080600060608486031215614de657600080fd5b8335614df181614d63565b92506020840135614e0181614d63565b929592945050506040919091013590565b60008060408385031215614e2557600080fd5b50508035926020909101359150565b60008060408385031215614e4757600080fd5b823591506020830135614e5981614d63565b809150509250929050565b60008083601f840112614e7657600080fd5b50813567ffffffffffffffff811115614e8e57600080fd5b6020830191508360208260051b8501011115611a3d57600080fd5b600080600080600080600060c0888a031215614ec457600080fd5b8735614ecf81614d63565b9650602088013595506040880135614ee681614d63565b945060608801359350608088013567ffffffffffffffff811115614f0957600080fd5b614f158a828b01614e64565b989b979a5095989497959660a090950135949350505050565b60008083601f840112614f4057600080fd5b50813567ffffffffffffffff811115614f5857600080fd5b602083019150836020828501011115611a3d57600080fd5b60008060208385031215614f8357600080fd5b823567ffffffffffffffff811115614f9a57600080fd5b614fa685828601614f2e565b90969095509350505050565b600080600060608486031215614fc757600080fd5b833592506020840135614e0181614d63565b80151581146113ff57600080fd5b60008060408385031215614ffa57600080fd5b823561500581614d63565b91506020830135614e5981614fd9565b6000806020838503121561502857600080fd5b823567ffffffffffffffff81111561503f57600080fd5b614fa685828601614e64565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156150a057603f1988860301845261508e858351614d0b565b94509285019290850190600101615072565b5092979650505050505050565b60008060008060008060a087890312156150c657600080fd5b8635955060208701356150d881614d63565b945060408701359350606087013567ffffffffffffffff8111156150fb57600080fd5b61510789828a01614e64565b979a9699509497949695608090950135949350505050565b60008060008060008060c0878903121561513857600080fd5b86359550602087013561514a81614d63565b945060408701359350606087013561516181614d63565b92506080870135915060a087013561517881614fd9565b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156151c5576151c5615186565b604052919050565b600067ffffffffffffffff8211156151e7576151e7615186565b50601f01601f191660200190565b600082601f83011261520657600080fd5b8135615219615214826151cd565b61519c565b81815284602083860101111561522e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561526157600080fd5b843561526c81614d63565b9350602085013561527c81614d63565b925060408501359150606085013567ffffffffffffffff81111561529f57600080fd5b6152ab878288016151f5565b91505092959194509250565b6000806000604084860312156152cc57600080fd5b83359250602084013567ffffffffffffffff8111156152ea57600080fd5b6152f686828701614f2e565b9497909650939450505050565b60008060008060006060868803121561531b57600080fd5b85359450602086013567ffffffffffffffff8082111561533a57600080fd5b61534689838a01614f2e565b9096509450604088013591508082111561535f57600080fd5b5061536c88828901614f2e565b969995985093965092949392505050565b600082601f83011261538e57600080fd5b8135602067ffffffffffffffff8211156153aa576153aa615186565b8160051b6153b982820161519c565b92835284810182019282810190878511156153d357600080fd5b83870192505b84831015614b5e5782356153ec81614d63565b825291830191908301906153d9565b80356fffffffffffffffffffffffffffffffff81168114614d8357600080fd5b6000806000806000806000806000806101408b8d03121561543b57600080fd5b6154448b614d78565b995060208b013567ffffffffffffffff8082111561546157600080fd5b61546d8e838f016151f5565b9a5060408d013591508082111561548357600080fd5b61548f8e838f016151f5565b995060608d01359150808211156154a557600080fd5b6154b18e838f016151f5565b985060808d01359150808211156154c757600080fd5b506154d48d828e0161537d565b9650506154e360a08c01614d78565b94506154f160c08c01614d78565b93506154ff60e08c016153fb565b925061550e6101008c016153fb565b915061551d6101208c01614d78565b90509295989b9194979a5092959850565b60008060006040848603121561554357600080fd5b833567ffffffffffffffff8082111561555b57600080fd5b818601915086601f83011261556f57600080fd5b81358181111561557e57600080fd5b8760208260081b850101111561559357600080fd5b602092830195509350508401356155a981614fd9565b809150509250925092565b6000806000604084860312156155c957600080fd5b833567ffffffffffffffff808211156155e157600080fd5b6155ed878388016151f5565b9450602086013591508082111561560357600080fd5b506152f686828701614f2e565b6000806040838503121561562357600080fd5b823561562e81614d63565b91506020830135614e5981614d63565b600181811c9082168061565257607f821691505b6020821081141561567357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156156a9576156a9615679565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826156d3576156d36156ae565b500490565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261570557600080fd5b83018035915067ffffffffffffffff82111561572057600080fd5b602001915036819003821315611a3d57600080fd5b600060001982141561574957615749615679565b5060010190565b6000821982111561576357615763615679565b500190565b60008282101561577a5761577a615679565b500390565b60008161578e5761578e615679565b506000190190565b8054600090600181811c90808316806157b057607f831692505b60208084108214156157d257634e487b7160e01b600052602260045260246000fd5b8180156157e657600181146157f757615824565b60ff19861689528489019650615824565b60008881526020902060005b8681101561581c5781548b820152908501908301615803565b505084890196505b50505050505092915050565b600061583c8284615796565b600360fc1b81526001019392505050565b60006158598285615796565b8351615869818360208801614cdf565b01949350505050565b6000806040838503121561588557600080fd5b825167ffffffffffffffff81111561589c57600080fd5b8301601f810185136158ad57600080fd5b80516158bb615214826151cd565b8181528660208385010111156158d057600080fd5b6158e1826020830160208601614cdf565b60209590950151949694955050505050565b60008551615905818460208a01614cdf565b820184868237909301918252506020019392505050565b8281526040602082015260006131036040830184614d0b565b6000806040838503121561594857600080fd5b823567ffffffffffffffff81111561595f57600080fd5b61596b858286016151f5565b95602094909401359450505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8681528560208201526080604082015260006159c360808301868861597a565b82810360608401526159d681858761597a565b9998505050505050505050565b813581556020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c082013560068201556007810160e0830135615a3581614d63565b81546001600160a01b0319166001600160a01b03919091161790555050565b6020808252818101839052600090604080840186845b87811015615ade578135835284820135858401528382013584840152606080830135908401526080808301359084015260a0808301359084015260c0808301359084015260e080830135615abd81614d63565b6001600160a01b031690840152610100928301929190910190600101615a6a565b5090979650505050505050565b82848237909101908152602001919050565b60008251615b0f818460208701614cdf565b9190910192915050565b600082615b2857615b286156ae565b500690565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615bb0816017850160208801614cdf565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615bed816028840160208801614cdf565b01602801949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152615c2b6080830184614d0b565b9695505050505050565b600060208284031215615c4757600080fd5b8151611ab881614cac565b634e487b7160e01b600052603160045260246000fd5b600060208284031215615c7a57600080fd5b8151611ab881614fd956fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209df1c6860da1f04f461464c478f4a40a5eceeccde930b146209ed2524873835764736f6c634300080c0033
Deployed Bytecode
0x6080604052600436106103ce5760003560e01c80637a5a8e7e116101fd578063b24f2d3911610118578063d45573f6116100ab578063e15916341161007a578063e159163414610c74578063e23b816414610c94578063e715032214610cb4578063e8a3d48514610cd4578063e985e9c514610ce957600080fd5b8063d45573f614610beb578063d547741f14610c17578063d637ed5914610c37578063d860483f14610c5457600080fd5b8063ca15c873116100e7578063ca15c87314610b6b578063cb2ef6f714610b8b578063ce80564214610bab578063d37c353b14610bcb57600080fd5b8063b24f2d3914610aea578063b88d4fde14610b16578063c68907de14610b36578063c87b56dd14610b4b57600080fd5b8063a05112fc11610190578063ac9650d81161015f578063ac9650d814610a4f578063acd083f814610a7c578063af3be89014610a93578063afb8291614610aca57600080fd5b8063a05112fc146109de578063a0a8e460146109fe578063a217fddf14610a1a578063a22cb46514610a2f57600080fd5b806391d14854116101cc57806391d1485414610943578063938e3d7b1461098957806395d89b41146109a95780639bcf7a15146109be57600080fd5b80637a5a8e7e146108c657806386ee745d146108d95780638da5cb5b1461090e5780639010d07c1461092357600080fd5b80633b1475a7116102ed578063508679571161028057806363b45e2d1161024f57806363b45e2d146107e65780636f4f2837146107fc5780636f8934f41461081c57806370a08231146108a657600080fd5b8063508679571461074d578063572b6c051461076d578063600dd5ea146107a65780636352211e146107c657600080fd5b806342966c68116102bc57806342966c681461069d5780634352ab41146106bd5780634cc157df146106eb5780634f6ccce71461072d57600080fd5b80633b1475a7146106265780633ea33f291461063d5780633f3e4c111461065d57806342842e0e1461067d57600080fd5b80631e7ac488116103655780632ab4d052116103345780632ab4d052146105af5780632f2ff15d146105c65780632f745c59146105e657806336568abe1461060657600080fd5b80631e7ac4881461050057806323b872dd14610520578063248a9ca3146105405780632a55205a1461057057600080fd5b8063081812fc116103a1578063081812fc14610488578063095ea7b3146104a857806313af4035146104ca57806318160ddd146104ea57600080fd5b806301ffc9a7146103d3578063059817691461040857806306fdde031461042d578063079fe40e1461044f575b600080fd5b3480156103df57600080fd5b506103f36103ee366004614cc2565b610d33565b60405190151581526020015b60405180910390f35b34801561041457600080fd5b5061041f6101c75481565b6040519081526020016103ff565b34801561043957600080fd5b50610442610d5f565b6040516103ff9190614d37565b34801561045b57600080fd5b506101c654610470906001600160a01b031681565b6040516001600160a01b0390911681526020016103ff565b34801561049457600080fd5b506104706104a3366004614d4a565b610df2565b3480156104b457600080fd5b506104c86104c3366004614d88565b610e1a565b005b3480156104d657600080fd5b506104c86104e5366004614db4565b610f47565b3480156104f657600080fd5b506101935461041f565b34801561050c57600080fd5b506104c861051b366004614d88565b611016565b34801561052c57600080fd5b506104c861053b366004614dd1565b6110ce565b34801561054c57600080fd5b5061041f61055b366004614d4a565b600090815260fb602052604090206001015490565b34801561057c57600080fd5b5061059061058b366004614e12565b61114d565b604080516001600160a01b0390931683526020830191909152016103ff565b3480156105bb57600080fd5b5061041f6101c85481565b3480156105d257600080fd5b506104c86105e1366004614e34565b61118a565b3480156105f257600080fd5b5061041f610601366004614d88565b6111af565b34801561061257600080fd5b506104c8610621366004614e34565b611246565b34801561063257600080fd5b5061041f6101c45481565b34801561064957600080fd5b506104c8610658366004614d88565b6112e2565b34801561066957600080fd5b506104c8610678366004614d4a565b61133b565b34801561068957600080fd5b506104c8610698366004614dd1565b611384565b3480156106a957600080fd5b506104c86106b8366004614d4a565b61139f565b3480156106c957600080fd5b5061041f6106d8366004614db4565b6101d46020526000908152604090205481565b3480156106f757600080fd5b5061070b610706366004614d4a565b611402565b604080516001600160a01b03909316835261ffff9091166020830152016103ff565b34801561073957600080fd5b5061041f610748366004614d4a565b61146f565b34801561075957600080fd5b506104c8610768366004614d4a565b611504565b34801561077957600080fd5b506103f3610788366004614db4565b6001600160a01b031660009081526065602052604090205460ff1690565b3480156107b257600080fd5b506104c86107c1366004614d88565b611545565b3480156107d257600080fd5b506104706107e1366004614d4a565b6115ea565b3480156107f257600080fd5b506101cc5461041f565b34801561080857600080fd5b506104c8610817366004614db4565b611650565b34801561082857600080fd5b5061083c610837366004614d4a565b6116a7565b6040516103ff9190600061010082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015260c083015160c08301526001600160a01b0360e08401511660e083015292915050565b3480156108b257600080fd5b5061041f6108c1366004614db4565b611773565b6104c86108d4366004614ea9565b6117fa565b3480156108e557600080fd5b506108f96108f4366004614e34565b6119fa565b604080519283526020830191909152016103ff565b34801561091a57600080fd5b50610470611a44565b34801561092f57600080fd5b5061047061093e366004614e12565b611a9f565b34801561094f57600080fd5b506103f361095e366004614e34565b600091825260fb602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561099557600080fd5b506104c86109a4366004614f70565b611abf565b3480156109b557600080fd5b50610442611add565b3480156109ca57600080fd5b506104c86109d9366004614fb2565b611aed565b3480156109ea57600080fd5b506104426109f9366004614d4a565b611bbd565b348015610a0a57600080fd5b50604051600381526020016103ff565b348015610a2657600080fd5b5061041f600081565b348015610a3b57600080fd5b506104c8610a4a366004614fe7565b611c58565b348015610a5b57600080fd5b50610a6f610a6a366004615015565b611c6a565b6040516103ff919061504b565b348015610a8857600080fd5b5061041f6101c55481565b348015610a9f57600080fd5b50610ab3610aae3660046150ad565b611d5f565b6040805192151583526020830191909152016103ff565b348015610ad657600080fd5b506104c8610ae536600461511f565b611f89565b348015610af657600080fd5b506101ca546001600160a01b03811690600160a01b900461ffff1661070b565b348015610b2257600080fd5b506104c8610b3136600461524b565b6122e3565b348015610b4257600080fd5b5061041f612363565b348015610b5757600080fd5b50610442610b66366004614d4a565b61240a565b348015610b7757600080fd5b5061041f610b86366004614d4a565b612551565b348015610b9757600080fd5b506944726f7045524337323160b01b61041f565b348015610bb757600080fd5b50610442610bc63660046152b7565b612569565b348015610bd757600080fd5b506104c8610be6366004615303565b6127ff565b348015610bf757600080fd5b506101c9546001600160a01b03811690600160a01b900461ffff1661070b565b348015610c2357600080fd5b506104c8610c32366004614e34565b612941565b348015610c4357600080fd5b506101cd546101ce546108f9919082565b348015610c6057600080fd5b5061041f610c6f366004614d4a565b612966565b348015610c8057600080fd5b506104c8610c8f36600461541b565b612988565b348015610ca057600080fd5b506104c8610caf36600461552e565b612bd4565b348015610cc057600080fd5b50610442610ccf3660046155b4565b612ee5565b348015610ce057600080fd5b50610442612f5a565b348015610cf557600080fd5b506103f3610d04366004615610565b6001600160a01b0391821660009081526101646020908152604080832093909416825291909152205460ff1690565b6000610d3e82612f77565b80610d59575063152a902d60e11b6001600160e01b03198316145b92915050565b606061015f8054610d6f9061563e565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9b9061563e565b8015610de85780601f10610dbd57610100808354040283529160200191610de8565b820191906000526020600020905b815481529060010190602001808311610dcb57829003601f168201915b5050505050905090565b6000610dfd82612f9c565b50600090815261016360205260409020546001600160a01b031690565b6000610e25826115ea565b9050806001600160a01b0316836001600160a01b03161415610e985760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b806001600160a01b0316610eaa613001565b6001600160a01b03161480610ec65750610ec681610d04613001565b610f385760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610e8f565b610f42838361300b565b505050565b6000610f528161307a565b6001600160a01b03821660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604090205460ff16610fc25760405162461bcd60e51b815260206004820152600660248201526510a0a226a4a760d11b6044820152606401610e8f565b6101c380546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a3505050565b60006110218161307a565b6127108211156110605760405162461bcd60e51b815260206004820152600a6024820152691f1026a0ac2fa128299760b11b6044820152606401610e8f565b6101c980546001600160b01b031916600160a01b61ffff8516026001600160a01b031916176001600160a01b0385169081179091556040518381527fe2497bd806ec41a6e0dd992c29a72efc0ef8fec9092d1978fd4a1e00b2f18304906020015b60405180910390a2505050565b6110df6110d9613001565b8261308b565b6111425760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610e8f565b610f4283838361310b565b60008060008061115c86611402565b90945084925061ffff169050612710611175828761568f565b61117f91906156c4565b925050509250929050565b600082815260fb60205260409020600101546111a58161307a565b610f4283836132b5565b60006111ba83611773565b821061121c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610e8f565b506001600160a01b0391909116600090815261019160209081526040808320938352929052205490565b61124e613001565b6001600160a01b0316816001600160a01b0316146112d45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610e8f565b6112de82826132d8565b5050565b60006112ed8161307a565b6001600160a01b03831660008181526101d4602052604090819020849055517f8973b95d42472e89416ea69404f8038c041db700af9ec294e7b4cd4e1ff2801c906110c19085815260200190565b60006113468161307a565b6101c88290556040518281527ff2672935fc79f5237559e2e2999dbe743bf65430894ac2b37666890e7c69e1af906020015b60405180910390a15050565b610f42838383604051806020016040528060008152506122e3565b6113aa6110d9613001565b6113f65760405162461bcd60e51b815260206004820152601d60248201527f63616c6c6572206e6f74206f776e6572206e6f7220617070726f7665640000006044820152606401610e8f565b6113ff816132fb565b50565b60008181526101d560209081526040808320815180830190925280546001600160a01b03168083526001909101549282019290925282911561144a5780516020820151611465565b6101ca546001600160a01b03811690600160a01b900461ffff165b9250925050915091565b600061147b6101935490565b82106114de5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610e8f565b61019382815481106114f2576114f26156d8565b90600052602060002001549050919050565b600061150f8161307a565b6101c78290556040518281527ff9d383c69b6255cbd431ca23734f43bdf15e694c7494956c917498469bcbce7390602001611378565b60006115508161307a565b61271082111561158e5760405162461bcd60e51b81526020600482015260096024820152683e204d41585f42505360b81b6044820152606401610e8f565b6101ca80546001600160a01b0385166001600160b01b03199091168117600160a01b61ffff861602179091556040518381527f90d7ec04bcb8978719414f82e52e4cb651db41d0e6f8cea6118c2191e6183adb906020016110c1565b600081815261016160205260408120546001600160a01b031680610d595760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610e8f565b600061165b8161307a565b6101c680546001600160a01b0319166001600160a01b0384169081179091556040517f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33390600090a25050565b6116fb6040518061010001604052806000815260200160008152602001600081526020016000815260200160008152602001600080191681526020016000815260200160006001600160a01b031681525090565b5060009081526101cf6020908152604091829020825161010081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c08201526007909101546001600160a01b031660e082015290565b60006001600160a01b0382166117dd5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610e8f565b506001600160a01b03166000908152610162602052604090205490565b6002600154141561184d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e8f565b60026001553360009081526065602052604090205460ff168061187f575032611874613001565b6001600160a01b0316145b6118b15760405162461bcd60e51b81526020600482015260036024820152621093d560ea1b6044820152606401610e8f565b6101c55460006118bf612363565b905060006118d8826118cf613001565b8b898989611d5f565b50905060008415806118fa575060008381526101cf6020526040902060050154155b905061191183611908613001565b8c8c8c86611f89565b81801561191e5750600085115b156119755761197561192e613001565b60008581526101d16020908152604080832072ffffffffffffffffffffffffffffffffffffff600886901c16845290915290208054600160ff9093169290921b9091179055565b6119808a8a8a6133a4565b61198b8b848c6134ab565b8a6001600160a01b031661199d613001565b6001600160a01b0316847ffa76a4010d9533e3e964f2930a65fb6042a12fa6ff5b08281837a10b0be7321e878e6040516119e1929190918252602082015260400190565b60405180910390a4505060018055505050505050505050565b60008281526101d0602090815260408083206001600160a01b03851684528252808320548584526101cf90925290912060040154810181811015611a3d57506000195b9250929050565b6101c3546001600160a01b031660009081527fc88390e7e62175be0932452175b6a7222b6b094ab0ef984a5153c620345d8975602052604081205460ff16611a8c5750600090565b6101c3546001600160a01b03165b905090565b600082815261012d60205260408120611ab89083613593565b9392505050565b6000611aca8161307a565b611ad76101cb8484614b69565b50505050565b60606101608054610d6f9061563e565b6000611af88161307a565b612710821115611b365760405162461bcd60e51b81526020600482015260096024820152683e204d41585f42505360b81b6044820152606401610e8f565b6040805180820182526001600160a01b03858116808352602080840187815260008a81526101d58352869020945185546001600160a01b031916941693909317845591516001909301929092559151848152909186917f7365cf4122f072a3365c20d54eff9b38d73c096c28e1892ec8f5b0e403a0f12d910160405180910390a350505050565b6101d36020526000908152604090208054611bd79061563e565b80601f0160208091040260200160405190810160405280929190818152602001828054611c039061563e565b8015611c505780601f10611c2557610100808354040283529160200191611c50565b820191906000526020600020905b815481529060010190602001808311611c3357829003601f168201915b505050505081565b6112de611c63613001565b838361359f565b60608167ffffffffffffffff811115611c8557611c85615186565b604051908082528060200260200182016040528015611cb857816020015b6060815260200190600190039081611ca35790505b50905060005b82811015611d5857611d2830858584818110611cdc57611cdc6156d8565b9050602002810190611cee91906156ee565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061366f92505050565b828281518110611d3a57611d3a6156d8565b60200260200101819052508080611d5090615735565b915050611cbe565b5092915050565b60008681526101cf60209081526040808320815161010081018352815481526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a08301819052600682015460c08401526007909101546001600160a01b031660e083015282919015611f7d57611e5886868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060a08301516040516bffffffffffffffffffffffff1960608d901b1660208201526034810188905260540160405160208183030381529060405280519060200120613763565b909350915082611eaa5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420696e2077686974656c6973742e0000000000000000000000000000006044820152606401610e8f565b60008981526101d16020908152604080832072ffffffffffffffffffffffffffffffffffffff60088d901c168452909152902054600160ff8a161b1615611f245760405162461bcd60e51b815260206004820152600e60248201526d383937b7b31031b630b4b6b2b21760911b6044820152606401610e8f565b831580611f315750838711155b611f7d5760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964207175616e746974792070726f6f662e0000000000000000006044820152606401610e8f565b50965096945050505050565b60008681526101cf6020908152604091829020825161010081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c08201526007909101546001600160a01b0390811660e0830181905290851614801561201457508060c0015183145b6120605760405162461bcd60e51b815260206004820152601a60248201527f696e76616c69642063757272656e6379206f722070726963652e0000000000006044820152606401610e8f565b60008511801561207c575081158061207c575080606001518511155b6120c85760405162461bcd60e51b815260206004820152601160248201527f696e76616c6964207175616e746974792e0000000000000000000000000000006044820152606401610e8f565b80602001518582604001516120dd9190615750565b111561212b5760405162461bcd60e51b815260206004820152601c60248201527f657863656564206d617820636c61696d61626c6520737570706c792e000000006044820152606401610e8f565b6101c454856101c55461213e9190615750565b111561218c5760405162461bcd60e51b815260206004820152601960248201527f6e6f7420656e6f756768206d696e74656420746f6b656e732e000000000000006044820152606401610e8f565b6101c85415806121ad57506101c854856101c5546121aa9190615750565b11155b6121f95760405162461bcd60e51b815260206004820152601860248201527f657863656564206d617820746f74616c20737570706c792e00000000000000006044820152606401610e8f565b6101c754158061223057506101c7546001600160a01b03871660009081526101d4602052604090205461222d908790615750565b11155b61227c5760405162461bcd60e51b815260206004820152601260248201527f65786365656420636c61696d206c696d697400000000000000000000000000006044820152606401610e8f565b60008061228989896119fa565b91509150816000148061229c5750804210155b6122d85760405162461bcd60e51b815260206004820152600d60248201526c31b0b73737ba1031b630b4b69760991b6044820152606401610e8f565b505050505050505050565b6122f46122ee613001565b8361308b565b6123575760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610e8f565b611ad784848484613831565b6101ce546101cd54600091829161237a9190615750565b90505b6101cd548111156123d3576101cf6000612398600184615768565b81526020019081526020016000206000015442106123c1576123bb600182615768565b91505090565b806123cb8161577f565b91505061237d565b5060405162461bcd60e51b815260206004820152600b60248201526a10a1a7a72224aa24a7a71760a91b6044820152606401610e8f565b606060005b6101cc5481101561253b576101cc818154811061242e5761242e6156d8565b9060005260206000200154831015612529576101d360006101cc8381548110612459576124596156d8565b90600052602060002001548152602001908152602001600020805461247d9061563e565b1590506124dd576101d260006101cc838154811061249d5761249d6156d8565b906000526020600020015481526020019081526020016000206040516020016124c69190615830565b604051602081830303815290604052915050919050565b6101d260006101cc83815481106124f6576124f66156d8565b90600052602060002001548152602001908152602001600020612518846138af565b6040516020016124c692919061584d565b612534600182615750565b905061240f565b5050604080516020810190915260008152919050565b600081815261012d60205260408120610d59906139ad565b60607f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66125958161307a565b6101cc5485106125d85760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21034b73232bc1760911b6044820152606401610e8f565b60006101cc86815481106125ee576125ee6156d8565b9060005260206000200154905060006101d36000838152602001908152602001600020805461261c9061563e565b80601f01602080910402602001604051908101604052809291908181526020018280546126489061563e565b80156126955780601f1061266a57610100808354040283529160200191612695565b820191906000526020600020905b81548152906001019060200180831161267857829003601f168201915b50505050509050600080828060200190518101906126b39190615872565b915091508151600014156127095760405162461bcd60e51b815260206004820152601260248201527f6e6f7468696e6720746f2072657665616c2e00000000000000000000000000006044820152606401610e8f565b612714828989612ee5565b9550808689894660405160200161272e94939291906158f3565b60405160208183030381529060405280519060200120146127815760405162461bcd60e51b815260206004820152600d60248201526c496e636f7272656374206b657960981b6044820152606401610e8f565b60008481526101d26020908152604090912087516127a192890190614bed565b5060008481526101d3602052604081206127ba91614c61565b7f09b52c0c3a3e08761cd3917c8e49275ed1e0982477b54047add8b4d70513bc8684876040516127eb92919061591c565b60405180910390a150505050509392505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66128298161307a565b6101c45460006128398883615750565b6101c481905560008181526101d26020526040902090915061285c908888614b69565b506101cc80546001810182556000919091527f9a37fbd5e796e9046c2f5f7e29046a230a4ba9ada48a80535ed93a51fec5cfbc0181905583156128e1576000806128a886880188615935565b9150915081516000141580156128bd57508015155b156128de5760008381526101d3602052604090206128dc908888614b69565b505b50505b7f2a0365091ef1a40953c670dce28177e37520648a6fdc91506bffac0ab045570d82600161290f8b83615750565b6129199190615768565b8989898960405161292f969594939291906159a3565b60405180910390a15050505050505050565b600082815260fb602052604090206001015461295c8161307a565b610f4283836132d8565b6101cc818154811061297757600080fd5b600091825260209091200154905081565b600054610100900460ff16158080156129a85750600054600160ff909116105b806129c25750303b1580156129c2575060005460ff166001145b612a255760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610e8f565b6000805460ff191660011790558015612a48576000805461ff0019166101001790555b612a506139b7565b612a59876139e8565b612a638a8a613a20565b6101ca80546001600160a01b038781166001600160b01b031992831617600160a01b61ffff8981168202929092179094556101c980548784169416939093179087169093029290921790556101c680546001600160a01b0319169188169190911790558751612ada906101cb9060208b0190614bed565b506101c380546001600160a01b0319166001600160a01b038d16179055612b0260008c613a51565b612b2c7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68c613a51565b612b567f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c8c613a51565b612b817f8502233096d909befbda0999bb8ea2f3a6be3c138b9fbf003752a4c8bce86f6c6000613a51565b8015612bc7576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b6000612bdf8161307a565b6101cd546101ce54818415612bfb57612bf88284615750565b90505b6101ce8690556101cd8190556000805b87811015612d9b57801580612c3b5750888882818110612c2d57612c2d6156d8565b905061010002016000013582105b612c6c5760405162461bcd60e51b815260206004820152600260248201526114d560f21b6044820152606401610e8f565b60006101cf81612c7c8487615750565b8152602001908152602001600020600201549050898983818110612ca257612ca26156d8565b9050610100020160200135811115612cfc5760405162461bcd60e51b815260206004820152601a60248201527f6d617820737570706c7920636c61696d656420616c72656164790000000000006044820152606401610e8f565b898983818110612d0e57612d0e6156d8565b610100029190910190506101cf6000612d278588615750565b81526020019081526020016000208181612d4191906159e3565b508190506101cf6000612d548588615750565b8152602081019190915260400160002060020155898983818110612d7a57612d7a6156d8565b90506101000201600001359250508080612d9390615735565b915050612c0b565b508515612e1b57835b82811015612e155760008181526101cf60209081526040822082815560018101839055600281018390556003810183905560048101839055600581018390556006810192909255600790910180546001600160a01b03191690556101d1905280612e0d81615735565b915050612da4565b50612eb4565b86831115612eb457865b83811015612eb2576101cf6000612e3c8386615750565b81526020810191909152604001600090812081815560018101829055600281018290556003810182905560048101829055600581018290556006810182905560070180546001600160a01b03191690556101d190612e9a8386615750565b81526020015280612eaa81615735565b915050612e25565b505b7f22ddd1bcb3816651679299dbffccb94973edec10c32e88dc2f4735c7699a02ca888860405161292f929190615a54565b8251604080518083016020019091528181529060005b81811015612f51576000858583604051602001612f1a93929190615aeb565b60408051601f19818403018152919052805160209182012088840182015118858401820152612f4a915082615750565b9050612efb565b50509392505050565b6101cb8054611bd79061563e565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b1480610d595750610d5982613a5b565b600081815261016160205260409020546001600160a01b03166113ff5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610e8f565b6000611a9a613a9b565b60008181526101636020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613041826115ea565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6113ff81613086613001565b613ac5565b600080613097836115ea565b9050806001600160a01b0316846001600160a01b031614806130df57506001600160a01b038082166000908152610164602090815260408083209388168352929052205460ff165b806131035750836001600160a01b03166130f884610df2565b6001600160a01b0316145b949350505050565b826001600160a01b031661311e826115ea565b6001600160a01b0316146131825760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610e8f565b6001600160a01b0382166131e45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610e8f565b6131ef838383613b45565b6131fa60008261300b565b6001600160a01b038316600090815261016260205260408120805460019290613224908490615768565b90915550506001600160a01b038216600090815261016260205260408120805460019290613253908490615750565b90915550506000818152610161602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6132bf8282613c85565b600082815261012d60205260409020610f429082613d28565b6132e28282613d3d565b600082815261012d60205260409020610f429082613dde565b6000613306826115ea565b905061331481600084613b45565b61331f60008361300b565b6001600160a01b038116600090815261016260205260408120805460019290613349908490615768565b90915550506000828152610161602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b806133ae57505050565b60006133ba828561568f565b6101c954909150600090612710906133dd90600160a01b900461ffff168461568f565b6133e791906156c4565b90506001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee141561345d5781341461345d5760405162461bcd60e51b815260206004820152601660248201527f6d7573742073656e6420746f74616c2070726963652e000000000000000000006044820152606401610e8f565b61347c84613469613001565b6101c9546001600160a01b031684613df3565b6134a484613488613001565b6101c6546001600160a01b031661349f8587615768565b613df3565b5050505050565b60008281526101cf6020526040812060020180548392906134cd908490615750565b909155505060008281526101d06020526040812042916134eb613001565b6001600160a01b03166001600160a01b0316815260200190815260200160002081905550806101d4600061351d613001565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461354c9190615750565b90915550506101c55460005b828110156135895761356a8583613e3d565b613575600183615750565b9150613582600182615750565b9050613558565b506101c555505050565b6000611ab88383613f8e565b816001600160a01b0316836001600160a01b031614156136015760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610e8f565b6001600160a01b0383811660008181526101646020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60606001600160a01b0383163b6136d75760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610e8f565b600080846001600160a01b0316846040516136f29190615afd565b600060405180830381855af49150503d806000811461372d576040519150601f19603f3d011682016040523d82523d6000602084013e613732565b606091505b509150915061375a8282604051806060016040528060278152602001615c8660279139613fb8565b95945050505050565b6000808281805b87518110156138255761377e60028361568f565b91506000888281518110613794576137946156d8565b602002602001015190508084116137d6576040805160208101869052908101829052606001604051602081830303815290604052805190602001209350613812565b604080516020810183905290810185905260600160405160208183030381529060405280519060200120935060018361380f9190615750565b92505b508061381d81615735565b91505061376a565b50941495939450505050565b61383c84848461310b565b61384884848484613ff1565b611ad75760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610e8f565b6060816138d35750506040805180820190915260018152600360fc1b602082015290565b8160005b81156138fd57806138e781615735565b91506138f69050600a836156c4565b91506138d7565b60008167ffffffffffffffff81111561391857613918615186565b6040519080825280601f01601f191660200182016040528015613942576020820181803683370190505b5090505b841561310357613957600183615768565b9150613964600a86615b19565b61396f906030615750565b60f81b818381518110613984576139846156d8565b60200101906001600160f81b031916908160001a9053506139a6600a866156c4565b9450613946565b6000610d59825490565b600054610100900460ff166139de5760405162461bcd60e51b8152600401610e8f90615b2d565b6139e6614141565b565b600054610100900460ff16613a0f5760405162461bcd60e51b8152600401610e8f90615b2d565b613a1761416e565b6113ff81614195565b600054610100900460ff16613a475760405162461bcd60e51b8152600401610e8f90615b2d565b6112de8282614224565b6112de82826132b5565b60006001600160e01b031982166380ac58cd60e01b1480613a8c57506001600160e01b03198216635b5e139f60e01b145b80610d595750610d5982614274565b3360009081526065602052604081205460ff1615613ac0575060131936013560601c90565b503390565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff166112de57613b03816001600160a01b03166014614299565b613b0e836020614299565b604051602001613b1f929190615b78565b60408051601f198184030181529082905262461bcd60e51b8252610e8f91600401614d37565b613b50838383614442565b600080527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a13126020527f70e64e82d0337f3fa9071fdb3266f859725ed1fc29697b2e6e986b76cffbfb085460ff16158015613bb257506001600160a01b03831615155b8015613bc657506001600160a01b03821615155b15610f42576001600160a01b03831660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff1680613c4857506001600160a01b03821660009081527fde23fa6c6392e300b5ced791de0faa0b28226983a4ab1c05a1ba79ef4d0a1312602052604090205460ff165b610f425760405162461bcd60e51b815260206004820152600e60248201526d215452414e534645525f524f4c4560901b6044820152606401610e8f565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff166112de57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19166001179055613ce4613001565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611ab8836001600160a01b0384166144fc565b600082815260fb602090815260408083206001600160a01b038516845290915290205460ff16156112de57600082815260fb602090815260408083206001600160a01b03851684529091529020805460ff19169055613d9a613001565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000611ab8836001600160a01b03841661454b565b80613dfd57611ad7565b6001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415613e3157613e2c828261463e565b611ad7565b611ad7848484846146e1565b6001600160a01b038216613e935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610e8f565b600081815261016160205260409020546001600160a01b031615613ef95760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610e8f565b613f0560008383613b45565b6001600160a01b038216600090815261016260205260408120805460019290613f2f908490615750565b90915550506000818152610161602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000826000018281548110613fa557613fa56156d8565b9060005260206000200154905092915050565b60608315613fc7575081611ab8565b825115613fd75782518084602001fd5b8160405162461bcd60e51b8152600401610e8f9190614d37565b60006001600160a01b0384163b1561413657836001600160a01b031663150b7a0261401a613001565b8786866040518563ffffffff1660e01b815260040161403c9493929190615bf9565b6020604051808303816000875af1925050508015614077575060408051601f3d908101601f1916820190925261407491810190615c35565b60015b61411c573d8080156140a5576040519150601f19603f3d011682016040523d82523d6000602084013e6140aa565b606091505b5080516141145760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610e8f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613103565b506001949350505050565b600054610100900460ff166141685760405162461bcd60e51b8152600401610e8f90615b2d565b60018055565b600054610100900460ff166139e65760405162461bcd60e51b8152600401610e8f90615b2d565b600054610100900460ff166141bc5760405162461bcd60e51b8152600401610e8f90615b2d565b60005b81518110156112de576001606560008484815181106141e0576141e06156d8565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061421c81615735565b9150506141bf565b600054610100900460ff1661424b5760405162461bcd60e51b8152600401610e8f90615b2d565b815161425f9061015f906020850190614bed565b508051610f4290610160906020840190614bed565b60006001600160e01b03198216635a05180f60e01b1480610d595750610d598261473a565b606060006142a883600261568f565b6142b3906002615750565b67ffffffffffffffff8111156142cb576142cb615186565b6040519080825280601f01601f1916602001820160405280156142f5576020820181803683370190505b509050600360fc1b81600081518110614310576143106156d8565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061433f5761433f6156d8565b60200101906001600160f81b031916908160001a905350600061436384600261568f565b61436e906001615750565b90505b60018111156143f3577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106143af576143af6156d8565b1a60f81b8282815181106143c5576143c56156d8565b60200101906001600160f81b031916908160001a90535060049490941c936143ec8161577f565b9050614371565b508315611ab85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610e8f565b6001600160a01b03831661449f5761449a816101938054600083815261019460205260408120829055600182018355919091527ffc8af01f449989052b52093a58fc9f42d0b11f0c6dd5dca0463dab62346ccc680155565b6144c2565b816001600160a01b0316836001600160a01b0316146144c2576144c2838261476f565b6001600160a01b0382166144d957610f4281614811565b826001600160a01b0316826001600160a01b031614610f4257610f4282826148c6565b600081815260018301602052604081205461454357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d59565b506000610d59565b6000818152600183016020526040812054801561463457600061456f600183615768565b855490915060009061458390600190615768565b90508181146145e85760008660000182815481106145a3576145a36156d8565b90600052602060002001549050808760000184815481106145c6576145c66156d8565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806145f9576145f9615c52565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d59565b6000915050610d59565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461468b576040519150601f19603f3d011682016040523d82523d6000602084013e614690565b606091505b5050905080610f425760405162461bcd60e51b815260206004820152601c60248201527f6e617469766520746f6b656e207472616e73666572206661696c6564000000006044820152606401610e8f565b816001600160a01b0316836001600160a01b0316141561470057611ad7565b6001600160a01b03831630141561472557613e2c6001600160a01b038516838361490c565b611ad76001600160a01b038516848484614984565b60006001600160e01b03198216637965db0b60e01b1480610d5957506301ffc9a760e01b6001600160e01b0319831614610d59565b6000600161477c84611773565b6147869190615768565b600083815261019260205260409020549091508082146147dc576001600160a01b038416600090815261019160209081526040808320858452825280832054848452818420819055835261019290915290208190555b506000918252610192602090815260408084208490556001600160a01b03909416835261019181528383209183525290812055565b6101935460009061482490600190615768565b60008381526101946020526040812054610193805493945090928490811061484e5761484e6156d8565b90600052602060002001549050806101938381548110614870576148706156d8565b600091825260208083209091019290925582815261019490915260408082208490558582528120556101938054806148aa576148aa615c52565b6001900381819060005260206000200160009055905550505050565b60006148d183611773565b6001600160a01b0390931660009081526101916020908152604080832086845282528083208590559382526101929052919091209190915550565b6040516001600160a01b038316602482015260448101829052610f4290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909316929092179091526149bc565b6040516001600160a01b0380851660248301528316604482015260648101829052611ad79085906323b872dd60e01b90608401614938565b6000614a11826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614a8e9092919063ffffffff16565b805190915015610f425780806020019051810190614a2f9190615c68565b610f425760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610e8f565b60606131038484600085856001600160a01b0385163b614af05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610e8f565b600080866001600160a01b03168587604051614b0c9190615afd565b60006040518083038185875af1925050503d8060008114614b49576040519150601f19603f3d011682016040523d82523d6000602084013e614b4e565b606091505b5091509150614b5e828286613fb8565b979650505050505050565b828054614b759061563e565b90600052602060002090601f016020900481019282614b975760008555614bdd565b82601f10614bb05782800160ff19823516178555614bdd565b82800160010185558215614bdd579182015b82811115614bdd578235825591602001919060010190614bc2565b50614be9929150614c97565b5090565b828054614bf99061563e565b90600052602060002090601f016020900481019282614c1b5760008555614bdd565b82601f10614c3457805160ff1916838001178555614bdd565b82800160010185558215614bdd579182015b82811115614bdd578251825591602001919060010190614c46565b508054614c6d9061563e565b6000825580601f10614c7d575050565b601f0160209004906000526020600020908101906113ff91905b5b80821115614be95760008155600101614c98565b6001600160e01b0319811681146113ff57600080fd5b600060208284031215614cd457600080fd5b8135611ab881614cac565b60005b83811015614cfa578181015183820152602001614ce2565b83811115611ad75750506000910152565b60008151808452614d23816020860160208601614cdf565b601f01601f19169290920160200192915050565b602081526000611ab86020830184614d0b565b600060208284031215614d5c57600080fd5b5035919050565b6001600160a01b03811681146113ff57600080fd5b8035614d8381614d63565b919050565b60008060408385031215614d9b57600080fd5b8235614da681614d63565b946020939093013593505050565b600060208284031215614dc657600080fd5b8135611ab881614d63565b600080600060608486031215614de657600080fd5b8335614df181614d63565b92506020840135614e0181614d63565b929592945050506040919091013590565b60008060408385031215614e2557600080fd5b50508035926020909101359150565b60008060408385031215614e4757600080fd5b823591506020830135614e5981614d63565b809150509250929050565b60008083601f840112614e7657600080fd5b50813567ffffffffffffffff811115614e8e57600080fd5b6020830191508360208260051b8501011115611a3d57600080fd5b600080600080600080600060c0888a031215614ec457600080fd5b8735614ecf81614d63565b9650602088013595506040880135614ee681614d63565b945060608801359350608088013567ffffffffffffffff811115614f0957600080fd5b614f158a828b01614e64565b989b979a5095989497959660a090950135949350505050565b60008083601f840112614f4057600080fd5b50813567ffffffffffffffff811115614f5857600080fd5b602083019150836020828501011115611a3d57600080fd5b60008060208385031215614f8357600080fd5b823567ffffffffffffffff811115614f9a57600080fd5b614fa685828601614f2e565b90969095509350505050565b600080600060608486031215614fc757600080fd5b833592506020840135614e0181614d63565b80151581146113ff57600080fd5b60008060408385031215614ffa57600080fd5b823561500581614d63565b91506020830135614e5981614fd9565b6000806020838503121561502857600080fd5b823567ffffffffffffffff81111561503f57600080fd5b614fa685828601614e64565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156150a057603f1988860301845261508e858351614d0b565b94509285019290850190600101615072565b5092979650505050505050565b60008060008060008060a087890312156150c657600080fd5b8635955060208701356150d881614d63565b945060408701359350606087013567ffffffffffffffff8111156150fb57600080fd5b61510789828a01614e64565b979a9699509497949695608090950135949350505050565b60008060008060008060c0878903121561513857600080fd5b86359550602087013561514a81614d63565b945060408701359350606087013561516181614d63565b92506080870135915060a087013561517881614fd9565b809150509295509295509295565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156151c5576151c5615186565b604052919050565b600067ffffffffffffffff8211156151e7576151e7615186565b50601f01601f191660200190565b600082601f83011261520657600080fd5b8135615219615214826151cd565b61519c565b81815284602083860101111561522e57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561526157600080fd5b843561526c81614d63565b9350602085013561527c81614d63565b925060408501359150606085013567ffffffffffffffff81111561529f57600080fd5b6152ab878288016151f5565b91505092959194509250565b6000806000604084860312156152cc57600080fd5b83359250602084013567ffffffffffffffff8111156152ea57600080fd5b6152f686828701614f2e565b9497909650939450505050565b60008060008060006060868803121561531b57600080fd5b85359450602086013567ffffffffffffffff8082111561533a57600080fd5b61534689838a01614f2e565b9096509450604088013591508082111561535f57600080fd5b5061536c88828901614f2e565b969995985093965092949392505050565b600082601f83011261538e57600080fd5b8135602067ffffffffffffffff8211156153aa576153aa615186565b8160051b6153b982820161519c565b92835284810182019282810190878511156153d357600080fd5b83870192505b84831015614b5e5782356153ec81614d63565b825291830191908301906153d9565b80356fffffffffffffffffffffffffffffffff81168114614d8357600080fd5b6000806000806000806000806000806101408b8d03121561543b57600080fd5b6154448b614d78565b995060208b013567ffffffffffffffff8082111561546157600080fd5b61546d8e838f016151f5565b9a5060408d013591508082111561548357600080fd5b61548f8e838f016151f5565b995060608d01359150808211156154a557600080fd5b6154b18e838f016151f5565b985060808d01359150808211156154c757600080fd5b506154d48d828e0161537d565b9650506154e360a08c01614d78565b94506154f160c08c01614d78565b93506154ff60e08c016153fb565b925061550e6101008c016153fb565b915061551d6101208c01614d78565b90509295989b9194979a5092959850565b60008060006040848603121561554357600080fd5b833567ffffffffffffffff8082111561555b57600080fd5b818601915086601f83011261556f57600080fd5b81358181111561557e57600080fd5b8760208260081b850101111561559357600080fd5b602092830195509350508401356155a981614fd9565b809150509250925092565b6000806000604084860312156155c957600080fd5b833567ffffffffffffffff808211156155e157600080fd5b6155ed878388016151f5565b9450602086013591508082111561560357600080fd5b506152f686828701614f2e565b6000806040838503121561562357600080fd5b823561562e81614d63565b91506020830135614e5981614d63565b600181811c9082168061565257607f821691505b6020821081141561567357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156156a9576156a9615679565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826156d3576156d36156ae565b500490565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261570557600080fd5b83018035915067ffffffffffffffff82111561572057600080fd5b602001915036819003821315611a3d57600080fd5b600060001982141561574957615749615679565b5060010190565b6000821982111561576357615763615679565b500190565b60008282101561577a5761577a615679565b500390565b60008161578e5761578e615679565b506000190190565b8054600090600181811c90808316806157b057607f831692505b60208084108214156157d257634e487b7160e01b600052602260045260246000fd5b8180156157e657600181146157f757615824565b60ff19861689528489019650615824565b60008881526020902060005b8681101561581c5781548b820152908501908301615803565b505084890196505b50505050505092915050565b600061583c8284615796565b600360fc1b81526001019392505050565b60006158598285615796565b8351615869818360208801614cdf565b01949350505050565b6000806040838503121561588557600080fd5b825167ffffffffffffffff81111561589c57600080fd5b8301601f810185136158ad57600080fd5b80516158bb615214826151cd565b8181528660208385010111156158d057600080fd5b6158e1826020830160208601614cdf565b60209590950151949694955050505050565b60008551615905818460208a01614cdf565b820184868237909301918252506020019392505050565b8281526040602082015260006131036040830184614d0b565b6000806040838503121561594857600080fd5b823567ffffffffffffffff81111561595f57600080fd5b61596b858286016151f5565b95602094909401359450505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8681528560208201526080604082015260006159c360808301868861597a565b82810360608401526159d681858761597a565b9998505050505050505050565b813581556020820135600182015560408201356002820155606082013560038201556080820135600482015560a0820135600582015560c082013560068201556007810160e0830135615a3581614d63565b81546001600160a01b0319166001600160a01b03919091161790555050565b6020808252818101839052600090604080840186845b87811015615ade578135835284820135858401528382013584840152606080830135908401526080808301359084015260a0808301359084015260c0808301359084015260e080830135615abd81614d63565b6001600160a01b031690840152610100928301929190910190600101615a6a565b5090979650505050505050565b82848237909101908152602001919050565b60008251615b0f818460208701614cdf565b9190910192915050565b600082615b2857615b286156ae565b500690565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351615bb0816017850160208801614cdf565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351615bed816028840160208801614cdf565b01602801949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152615c2b6080830184614d0b565b9695505050505050565b600060208284031215615c4757600080fd5b8151611ab881614cac565b634e487b7160e01b600052603160045260246000fd5b600060208284031215615c7a57600080fd5b8151611ab881614fd956fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212209df1c6860da1f04f461464c478f4a40a5eceeccde930b146209ed2524873835764736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.