Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
0x60806040 | 15115869 | 991 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
NFT
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // @author Eggshill.me pragma solidity ^0.8.4; import "./ERC721AUpgradeable.sol"; import "./interfaces/IMerkleDistributor.sol"; import "./utils/VRFConsumerBaseV2Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; error ExceedCollectionSize(); error CallerIsContract(); error MintTooMuch(); error ReachMaxDevMintReserve(); error InvalidProof(); error InvalidSignature(); error PreSaleNotBegin(); error PublicSaleNotBegin(); error AuctionNotBegin(); error ReachAuctionReserve(); error PriceLengthError(); error EtherNotEnough(); error TooMuchForAuction(); error ArrayLengthNotMatch(); error AlreadyRevealed(); error AlreadySetStartingIndex(); error NonexistentToken(); error RandomnessRequestNotFinalized(); error SendEtherFailed(); error TransferFailed(); error OnlyCrossmint(); contract NFT is VRFConsumerBaseV2Upgradeable, OwnableUpgradeable, ERC721AUpgradeable, ReentrancyGuardUpgradeable, IMerkleDistributor { using StringsUpgradeable for uint256; using ECDSAUpgradeable for bytes32; VRFCoordinatorV2Interface public constant VRF_COORDINATOR = VRFCoordinatorV2Interface(0x271682DEB8C4E0901D1a1550aD2e64D568E69909); bytes32 public constant KEY_HASH = 0x9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded86805; uint256 public MAX_SUPPLY; uint256 public s_requestId; uint256 public maxPerAddressDuringMint; uint256 public amountForDevsAndPlatform; uint256 public amountForAuction; uint256 public initialRandomIndex; bool public revealed; address public signer; bytes32 public override balanceTreeRoot; address public platform; uint256 public platformRate; uint256 public publicSaleStartTime; struct ChainLinkConfig { bytes32 keyhash; uint64 s_subscriptionId; uint32 callbackGasLimit; uint16 requestConfirmations; uint32 numWords; } struct AuctionConfig { uint128 auctionStartPrice; uint128 auctionEndPrice; uint64 auctionPriceCurveLength; uint64 auctionDropInterval; uint128 auctionDropPerStep; uint32 auctionSaleStartTime; } ChainLinkConfig public chainLinkConfig; AuctionConfig public auctionConfig; mapping(uint256 => uint256) public preSalePriceOfNum; mapping(uint256 => uint256) public publicSalePriceOfNum; // metadata URI string private _baseTokenURI; uint256 private totalDevMint; event PreSalesMint(uint256 indexed index, address indexed account, uint256 amount, uint256 maxMint); event PublicSaleMint(address indexed user, uint256 number, uint256 totalCost); event Crossmint(address indexed user, uint256 number, uint256 totalCost); event AuctionMint(address indexed user, uint256 number, uint256 totalCost); event Revealed(uint256 requestId, uint256 randomWord, string baseURI, bool revealed); function initialize( string memory name_, string memory symbol_, string memory notRevealedURI_, uint256 maxPerAddressDuringMint_, uint256 collectionSize_, uint256 amountForDevsAndPlatform_, uint64 subscriptionId_, uint256 platformRate_, address platformAddress_, address signer_ ) public initializer { __Ownable_init_unchained(); __VRFConsumerBaseV2_init(address(VRF_COORDINATOR)); __ERC721A_init(name_, symbol_, notRevealedURI_); if (amountForDevsAndPlatform_ > collectionSize_) revert ExceedCollectionSize(); maxPerAddressDuringMint = maxPerAddressDuringMint_; amountForDevsAndPlatform = amountForDevsAndPlatform_; MAX_SUPPLY = collectionSize_; chainLinkConfig = ChainLinkConfig( KEY_HASH, subscriptionId_, 100000, //callbackGasLimit 3, //requestConfirmations 1 //numWords ); platform = platformAddress_; platformRate = platformRate_; signer = signer_; } modifier callerIsUser() { if (tx.origin != msg.sender) revert CallerIsContract(); _; } function preSalesMint( uint256 index, uint256 thisTimeMint, uint256 maxMint, bytes32[] calldata merkleProof ) external payable override callerIsUser { uint256 totalPrice = preSalePriceOfNum[thisTimeMint]; if (totalPrice == 0) revert PreSaleNotBegin(); uint256 userTotalMinted = numberMinted(msg.sender) + thisTimeMint; if (userTotalMinted > maxPerAddressDuringMint || userTotalMinted > maxMint) revert MintTooMuch(); if (totalSupply() + thisTimeMint > MAX_SUPPLY) revert ExceedCollectionSize(); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, msg.sender, maxMint)); if (!MerkleProofUpgradeable.verify(merkleProof, balanceTreeRoot, node)) revert InvalidProof(); refundIfOver(totalPrice); _safeMint(msg.sender, thisTimeMint); emit PreSalesMint(index, msg.sender, thisTimeMint, maxMint); } function publicSaleMint( uint256 quantity, string calldata salt, bytes calldata signature ) external payable callerIsUser { if (!verifySignature(salt, msg.sender, quantity, signature)) revert InvalidSignature(); uint256 totalPrice = publicSalePriceOfNum[quantity]; if (!isPublicSaleOn(totalPrice)) revert PublicSaleNotBegin(); if (numberMinted(msg.sender) + quantity > maxPerAddressDuringMint) revert MintTooMuch(); if (totalSupply() + quantity > MAX_SUPPLY) revert ExceedCollectionSize(); refundIfOver(totalPrice); _safeMint(msg.sender, quantity); emit PublicSaleMint(msg.sender, quantity, totalPrice); } function crossmint(uint256 quantity, address _to) external payable { if (msg.sender != 0xdAb1a1854214684acE522439684a145E62505233) revert OnlyCrossmint(); uint256 totalPrice = publicSalePriceOfNum[quantity]; if (!isPublicSaleOn(totalPrice)) revert PublicSaleNotBegin(); if (totalSupply() + quantity > MAX_SUPPLY) revert ExceedCollectionSize(); refundIfOver(totalPrice); _safeMint(_to, quantity); emit Crossmint(_to, quantity, totalPrice); } function auctionMint( uint256 quantity, string calldata salt, bytes calldata signature ) external payable callerIsUser { if (!verifySignature(salt, msg.sender, quantity, signature)) revert InvalidSignature(); uint256 _saleStartTime = uint256(auctionConfig.auctionSaleStartTime); if (_saleStartTime == 0 || block.timestamp < _saleStartTime) revert AuctionNotBegin(); if (totalSupply() + quantity > amountForAuction) revert ReachAuctionReserve(); if (numberMinted(msg.sender) + quantity > maxPerAddressDuringMint) revert MintTooMuch(); uint256 totalCost = getAuctionPrice(_saleStartTime) * quantity; refundIfOver(totalCost); _safeMint(msg.sender, quantity); emit AuctionMint(msg.sender, quantity, totalCost); } function refundIfOver(uint256 price) private { if (msg.value < price) revert EtherNotEnough(); if (msg.value > price) { (bool success, ) = payable(msg.sender).call{value: msg.value - price}(""); if (!success) revert SendEtherFailed(); } } function isPublicSaleOn(uint256 publicPriceWei) public view returns (bool) { return publicPriceWei != 0 && block.timestamp >= publicSaleStartTime; } function getAuctionPrice(uint256 saleStartTime_) public view returns (uint256) { AuctionConfig memory config = auctionConfig; if (block.timestamp < saleStartTime_) { return config.auctionStartPrice; } if (block.timestamp - saleStartTime_ >= config.auctionPriceCurveLength) { return config.auctionEndPrice; } else { uint256 steps = (block.timestamp - saleStartTime_) / config.auctionDropInterval; return config.auctionStartPrice - (steps * config.auctionDropPerStep); } } // function getPreSalePrice(uint256 quantity) public view returns (uint256) { // PriceConfig memory config = priceConfig; // return config.preSalePriceA * quantity + config.preSalePriceB; // } // function getPublicSalePrice(uint256 quantity) public view returns (uint256) { // PriceConfig memory config = priceConfig; // return config.publicSalePriceA * quantity + config.publicSalePriceB; // } function setMaxPerAddressDuringMint(uint32 quantity) external onlyOwner { maxPerAddressDuringMint = quantity; } function updatePresaleInfo(bytes32 newBalanceTreeRoot_, uint256[] calldata price_) external onlyOwner { balanceTreeRoot = newBalanceTreeRoot_; if (price_.length < maxPerAddressDuringMint) revert PriceLengthError(); for (uint256 i = 1; i <= price_.length; i++) { preSalePriceOfNum[i] = price_[i - 1]; } } function endAuctionAndSetupPublicSaleInfo(uint32 publicSaleStartTime_, uint256[] calldata price_) external onlyOwner { if (auctionConfig.auctionSaleStartTime != 0) delete auctionConfig; publicSaleStartTime = publicSaleStartTime_; if (price_.length < maxPerAddressDuringMint) revert PriceLengthError(); for (uint256 i = 1; i <= price_.length; i++) { publicSalePriceOfNum[i] = price_[i - 1]; } } function endPublicSalesAndSetupAuctionSaleInfo( uint32 auctionSaleStartTime_, uint128 auctionStartPrice_, uint128 auctionEndPrice_, uint64 auctionPriceCurveLength_, uint64 auctionDropInterval_, uint256 amountForAuction_ ) external onlyOwner { if (publicSaleStartTime != 0) delete publicSaleStartTime; if (amountForAuction_ > MAX_SUPPLY - totalSupply()) revert TooMuchForAuction(); amountForAuction = amountForAuction_; uint128 auctionDropPerStep = (auctionStartPrice_ - auctionEndPrice_) / (auctionPriceCurveLength_ / auctionDropInterval_); auctionConfig = AuctionConfig( auctionStartPrice_, auctionEndPrice_, auctionPriceCurveLength_, auctionDropInterval_, auctionDropPerStep, auctionSaleStartTime_ ); } function setSigner(address signer_) external onlyOwner { signer = signer_; } // For marketing etc. function devMint(address[] calldata addresses, uint256[] calldata quantity) external onlyOwner { if (addresses.length != quantity.length) revert ArrayLengthNotMatch(); uint256 totalQuantity; for (uint256 i = 0; i < addresses.length; i++) { totalQuantity += quantity[i]; } totalDevMint += totalQuantity; if (totalSupply() + totalQuantity > MAX_SUPPLY) revert ExceedCollectionSize(); if (totalDevMint > amountForDevsAndPlatform) revert ReachMaxDevMintReserve(); for (uint256 i = 0; i < addresses.length; i++) { _safeMint(addresses[i], quantity[i]); } } function setBaseURI(string calldata baseURI) public onlyOwner { _baseTokenURI = baseURI; } function setNotRevealedURI(string calldata notRevealedURI) external onlyOwner { _contractURI = notRevealedURI; } function reveal(string calldata baseURI) external onlyOwner { if (revealed) revert AlreadyRevealed(); ChainLinkConfig memory config = chainLinkConfig; s_requestId = VRF_COORDINATOR.requestRandomWords( config.keyhash, config.s_subscriptionId, config.requestConfirmations, config.callbackGasLimit, config.numWords ); setBaseURI(baseURI); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert NonexistentToken(); if (revealed == false) { return _contractURI; } uint256 _initialRandomIndex = initialRandomIndex; string memory baseURI = _baseTokenURI; uint256 tailIndex = MAX_SUPPLY - 1; uint256[] memory tempID = new uint256[](MAX_SUPPLY); //Adapt Knuth-Durstenfeld shuffle algorithm to fully randomize ID for (tailIndex; tailIndex > tokenId - 1; tailIndex--) { //only loop the ID to the tail tempID[_initialRandomIndex] = (tempID[tailIndex] == 0 ? tailIndex + 1 : tempID[tailIndex]); //No tail data is stored since they don't affect final ID anymore _initialRandomIndex = (5 * _initialRandomIndex + 1) % tailIndex; } uint256 revealedID = (tempID[_initialRandomIndex] == 0 ? _initialRandomIndex + 1 : tempID[_initialRandomIndex]); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, revealedID.toString(), ".json")) : "baseuri not set correctly"; } function withdrawMoney() external nonReentrant { uint256 balance = address(this).balance; bool success; if (platform != address(0)) { (success, ) = platform.call{value: (balance * (platformRate)) / 100}(""); if (!success) revert SendEtherFailed(); } balance = address(this).balance; (success, ) = owner().call{value: balance}(""); if (!success) revert TransferFailed(); } function numberMinted(address owner) public view returns (uint256) { return _numberMinted(owner); } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { return ownershipOf(tokenId); } function verifySignature( string calldata _salt, address _userAddress, uint256 quantity, bytes memory signature ) public view returns (bool) { bytes32 rawMessageHash = _getMessageHash(_salt, _userAddress, quantity); return _recover(rawMessageHash, signature) == signer; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function baseURI() public view returns (string memory) { return _baseTokenURI; } function _getMessageHash( string calldata _salt, address _userAddress, uint256 quantity ) internal view returns (bytes32) { return keccak256(abi.encode(_salt, address(this), _userAddress, quantity)); } function _recover(bytes32 _rawMessageHash, bytes memory signature) internal pure returns (address) { return _rawMessageHash.toEthSignedMessageHash().recover(signature); } /** * Callback function used by VRF Coordinator */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual override { initialRandomIndex = randomWords[0] % MAX_SUPPLY; revealed = true; emit Revealed(requestId, randomWords[0], _baseTokenURI, true); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error AuxQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AUpgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Contract-level metadata string internal _contractURI; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721A_init( string memory name_, string memory symbol_, string memory contractURI_ ) internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721A_init_unchained(name_, symbol_, contractURI_); } function __ERC721A_init_unchained( string memory name_, string memory symbol_, string memory contractURI_ ) internal onlyInitializing { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); _contractURI = contractURI_; } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev See {IERC721Enumerable-totalSupply}. * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { if (owner == address(0)) revert AuxQueryForZeroAddress(); return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { if (owner == address(0)) revert AuxQueryForZeroAddress(); _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Contract-level metadata for opensea */ function contractURI() public view virtual returns (string memory) { return _contractURI; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721AUpgradeable.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} uint256[41] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IMerkleDistributor { // Returns the merkle root of the merkle tree containing account balances available to claim. function balanceTreeRoot() external view returns (bytes32); // Claim the given amount of the token to the given address. Reverts if the inputs are invalid. function preSalesMint( uint256 index, uint256 thisTimeMint, uint256 maxMint, bytes32[] calldata merkleProof ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2Upgradeable is Initializable { error OnlyCoordinatorCanFulfill(address have, address want); address private vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ function __VRFConsumerBaseV2_init(address _vrfCoordinator) internal onlyInitializing { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @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 (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 v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProofUpgradeable { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface 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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../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.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 (last updated v4.5.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 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 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 (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; 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. * * 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 initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"AlreadyRevealed","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"ArrayLengthNotMatch","type":"error"},{"inputs":[],"name":"AuctionNotBegin","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CallerIsContract","type":"error"},{"inputs":[],"name":"EtherNotEnough","type":"error"},{"inputs":[],"name":"ExceedCollectionSize","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintTooMuch","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"MintedQueryForZeroAddress","type":"error"},{"inputs":[],"name":"NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"OnlyCrossmint","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PreSaleNotBegin","type":"error"},{"inputs":[],"name":"PriceLengthError","type":"error"},{"inputs":[],"name":"PublicSaleNotBegin","type":"error"},{"inputs":[],"name":"ReachAuctionReserve","type":"error"},{"inputs":[],"name":"ReachMaxDevMintReserve","type":"error"},{"inputs":[],"name":"SendEtherFailed","type":"error"},{"inputs":[],"name":"TooMuchForAuction","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"number","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalCost","type":"uint256"}],"name":"AuctionMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"number","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalCost","type":"uint256"}],"name":"Crossmint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxMint","type":"uint256"}],"name":"PreSalesMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"number","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalCost","type":"uint256"}],"name":"PublicSaleMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomWord","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"},{"indexed":false,"internalType":"bool","name":"revealed","type":"bool"}],"name":"Revealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"KEY_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VRF_COORDINATOR","outputs":[{"internalType":"contract VRFCoordinatorV2Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amountForAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"amountForDevsAndPlatform","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"auctionConfig","outputs":[{"internalType":"uint128","name":"auctionStartPrice","type":"uint128"},{"internalType":"uint128","name":"auctionEndPrice","type":"uint128"},{"internalType":"uint64","name":"auctionPriceCurveLength","type":"uint64"},{"internalType":"uint64","name":"auctionDropInterval","type":"uint64"},{"internalType":"uint128","name":"auctionDropPerStep","type":"uint128"},{"internalType":"uint32","name":"auctionSaleStartTime","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"string","name":"salt","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"auctionMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceTreeRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainLinkConfig","outputs":[{"internalType":"bytes32","name":"keyhash","type":"bytes32"},{"internalType":"uint64","name":"s_subscriptionId","type":"uint64"},{"internalType":"uint32","name":"callbackGasLimit","type":"uint32"},{"internalType":"uint16","name":"requestConfirmations","type":"uint16"},{"internalType":"uint32","name":"numWords","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"crossmint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"quantity","type":"uint256[]"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"publicSaleStartTime_","type":"uint32"},{"internalType":"uint256[]","name":"price_","type":"uint256[]"}],"name":"endAuctionAndSetupPublicSaleInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"auctionSaleStartTime_","type":"uint32"},{"internalType":"uint128","name":"auctionStartPrice_","type":"uint128"},{"internalType":"uint128","name":"auctionEndPrice_","type":"uint128"},{"internalType":"uint64","name":"auctionPriceCurveLength_","type":"uint64"},{"internalType":"uint64","name":"auctionDropInterval_","type":"uint64"},{"internalType":"uint256","name":"amountForAuction_","type":"uint256"}],"name":"endPublicSalesAndSetupAuctionSaleInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"saleStartTime_","type":"uint256"}],"name":"getAuctionPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOwnershipData","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721AUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialRandomIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"notRevealedURI_","type":"string"},{"internalType":"uint256","name":"maxPerAddressDuringMint_","type":"uint256"},{"internalType":"uint256","name":"collectionSize_","type":"uint256"},{"internalType":"uint256","name":"amountForDevsAndPlatform_","type":"uint256"},{"internalType":"uint64","name":"subscriptionId_","type":"uint64"},{"internalType":"uint256","name":"platformRate_","type":"uint256"},{"internalType":"address","name":"platformAddress_","type":"address"},{"internalType":"address","name":"signer_","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":"uint256","name":"publicPriceWei","type":"uint256"}],"name":"isPublicSaleOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerAddressDuringMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberMinted","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":"platform","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"preSalePriceOfNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"thisTimeMint","type":"uint256"},{"internalType":"uint256","name":"maxMint","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"preSalesMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"string","name":"salt","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"publicSalePriceOfNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_requestId","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"quantity","type":"uint32"}],"name":"setMaxPerAddressDuringMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newBalanceTreeRoot_","type":"bytes32"},{"internalType":"uint256[]","name":"price_","type":"uint256[]"}],"name":"updatePresaleInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_salt","type":"string"},{"internalType":"address","name":"_userAddress","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawMoney","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506142b2806100206000396000f3fe6080604052600436106103815760003560e01c80637818a7c2116101d1578063b4e7dddd11610102578063e523a2dc116100a0578063f2c4ce1e1161006f578063f2c4ce1e14610b58578063f2fde38b14610b78578063f38983a614610b98578063f7df4c5a14610bab57600080fd5b8063e523a2dc14610ac4578063e89e106a14610ae4578063e8a3d48514610afa578063e985e9c514610b0f57600080fd5b8063c87b56dd116100dc578063c87b56dd14610a36578063d124728d14610a56578063d625e22614610a76578063dc33e68114610aa457600080fd5b8063b4e7dddd14610957578063b88d4fde1461096e578063bb4061351461098e57600080fd5b80639231ab2a1161016f578063a8b6938411610149578063a8b6938414610882578063ac010bb8146108a2578063ac446002146108b9578063b11065be146108ce57600080fd5b80639231ab2a146107f757806395d89b411461084d578063a22cb4651461086257600080fd5b80638087e4f1116101ab5780638087e4f1146107755780638bc35c2f146107a35780638da5cb5b146107b9578063917d009e146107d757600080fd5b80637818a7c21461072f5780637a7e6c94146107425780637b2e64d81461076257600080fd5b806342842e0e116102b657806355f804b3116102545780636c0360eb116102235780636c0360eb146106c55780636c19e783146106da57806370a08231146106fa578063715018a61461071a57600080fd5b806355f804b31461064e5780635ec085191461066e5780636352211e1461068e5780636bb7b1d9146106ae57600080fd5b80634c261247116102905780634c261247146105bf5780634d4e9578146105df57806351830227146105ff57806351dc86a51461061a57600080fd5b806342842e0e1461055e57806347b08a1d1461057e5780634bde38c81461059e57600080fd5b8063238ac9331161032357806326ee1b5f116102fd57806326ee1b5f14610508578063299c89891461051e57806332cb6b0c1461053157806336e0cac61461054757600080fd5b8063238ac933146104a257806323b872dd146104c85780632446548f146104e857600080fd5b8063081812fc1161035f578063081812fc1461041d578063095ea7b31461043d57806318160ddd1461045f5780631fe543e31461048257600080fd5b806301ffc9a71461038657806305f6a924146103bb57806306fdde03146103fb575b600080fd5b34801561039257600080fd5b506103a66103a13660046139e2565b610bc1565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103e373271682deb8c4e0901d1a1550ad2e64d568e6990981565b6040516001600160a01b0390911681526020016103b2565b34801561040757600080fd5b50610410610c13565b6040516103b29190613f33565b34801561042957600080fd5b506103e3610438366004613bba565b610ca5565b34801561044957600080fd5b5061045d610458366004613908565b610ce9565b005b34801561046b57600080fd5b50610474610d77565b6040519081526020016103b2565b34801561048e57600080fd5b5061045d61049d366004613c0c565b610d85565b3480156104ae57600080fd5b50610101546103e39061010090046001600160a01b031681565b3480156104d457600080fd5b5061045d6104e336600461382e565b610de3565b3480156104f457600080fd5b5061045d610503366004613931565b610dee565b34801561051457600080fd5b5061047460fe5481565b61045d61052c366004613cbf565b610f87565b34801561053d57600080fd5b5061047460fb5481565b34801561055357600080fd5b506104746101045481565b34801561056a57600080fd5b5061045d61057936600461382e565b6110fe565b34801561058a57600080fd5b506103a6610599366004613a59565b611119565b3480156105aa57600080fd5b50610103546103e3906001600160a01b031681565b3480156105cb57600080fd5b5061045d6105da366004613a1a565b61115e565b3480156105eb57600080fd5b5061045d6105fa366004613999565b6112bb565b34801561060b57600080fd5b50610101546103a69060ff1681565b34801561062657600080fd5b506104747f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded8680581565b34801561065a57600080fd5b5061045d610669366004613a1a565b611377565b34801561067a57600080fd5b506103a6610689366004613bba565b6113ae565b34801561069a57600080fd5b506103e36106a9366004613bba565b6113c7565b3480156106ba57600080fd5b506104746101055481565b3480156106d157600080fd5b506104106113d9565b3480156106e657600080fd5b5061045d6106f53660046137e2565b6113e9565b34801561070657600080fd5b506104746107153660046137e2565b61143c565b34801561072657600080fd5b5061045d61148a565b61045d61073d366004613d35565b6114c0565b34801561074e57600080fd5b5061045d61075d366004613d9c565b61168b565b61045d610770366004613bea565b611770565b34801561078157600080fd5b50610474610790366004613bba565b61010b6020526000908152604090205481565b3480156107af57600080fd5b5061047460fd5481565b3480156107c557600080fd5b506033546001600160a01b03166103e3565b3480156107e357600080fd5b506104746107f2366004613bba565b61186b565b34801561080357600080fd5b50610817610812366004613bba565b611982565b6040805182516001600160a01b031681526020808401516001600160401b031690820152918101511515908201526060016103b2565b34801561085957600080fd5b506104106119a8565b34801561086e57600080fd5b5061045d61087d3660046138ce565b6119b7565b34801561088e57600080fd5b5061045d61089d366004613dd3565b611a4d565b3480156108ae57600080fd5b506104746101005481565b3480156108c557600080fd5b5061045d611b8d565b3480156108da57600080fd5b50610106546101075461091a91906001600160401b0381169063ffffffff600160401b820481169161ffff600160601b82041691600160701b9091041685565b604080519586526001600160401b03909416602086015263ffffffff9283169385019390935261ffff16606084015216608082015260a0016103b2565b34801561096357600080fd5b506104746101025481565b34801561097a57600080fd5b5061045d610989366004613869565b611d0e565b34801561099a57600080fd5b50610108546101095461010a546109e9926001600160801b0380821693600160801b928390048216936001600160401b0380831694600160401b84049091169392049091169063ffffffff1686565b604080516001600160801b03978816815295871660208701526001600160401b03948516908601529190921660608401529216608082015263ffffffff90911660a082015260c0016103b2565b348015610a4257600080fd5b50610410610a51366004613bba565b611d59565b348015610a6257600080fd5b5061045d610a71366004613adc565b6120dd565b348015610a8257600080fd5b50610474610a91366004613bba565b61010c6020526000908152604090205481565b348015610ab057600080fd5b50610474610abf3660046137e2565b6122e1565b348015610ad057600080fd5b5061045d610adf366004613d82565b6122ec565b348015610af057600080fd5b5061047460fc5481565b348015610b0657600080fd5b50610410612321565b348015610b1b57600080fd5b506103a6610b2a3660046137fc565b6001600160a01b039182166000908152609f6020908152604080832093909416825291909152205460ff1690565b348015610b6457600080fd5b5061045d610b73366004613a1a565b612330565b348015610b8457600080fd5b5061045d610b933660046137e2565b612366565b61045d610ba6366004613cbf565b612401565b348015610bb757600080fd5b5061047460ff5481565b60006001600160e01b031982166380ac58cd60e01b1480610bf257506001600160e01b03198216635b5e139f60e01b145b80610c0d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060998054610c22906141c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4e906141c0565b8015610c9b5780601f10610c7057610100808354040283529160200191610c9b565b820191906000526020600020905b815481529060010190602001808311610c7e57829003601f168201915b5050505050905090565b6000610cb08261258f565b610ccd576040516333d1c03960e21b815260040160405180910390fd5b506000908152609e60205260409020546001600160a01b031690565b6000610cf4826113c7565b9050806001600160a01b0316836001600160a01b03161415610d295760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610d495750610d478133610b2a565b155b15610d67576040516367d9dca160e11b815260040160405180910390fd5b610d728383836125c8565b505050565b609854609754036000190190565b6000546201000090046001600160a01b03163314610dd55760005460405163073e64fd60e21b8152336004820152620100009091046001600160a01b031660248201526044015b60405180910390fd5b610ddf8282612624565b5050565b610d728383836126da565b6033546001600160a01b03163314610e185760405162461bcd60e51b8152600401610dcc90613f46565b828114610e385760405163ed882f7160e01b815260040160405180910390fd5b6000805b84811015610e8a57838382818110610e6457634e487b7160e01b600052603260045260246000fd5b9050602002013582610e7691906140b3565b915080610e82816141f5565b915050610e3c565b508061010e6000828254610e9e91906140b3565b909155505060fb5481610eaf610d77565b610eb991906140b3565b1115610ed8576040516323e3df8960e11b815260040160405180910390fd5b60fe5461010e541115610efe5760405163022e28e560e61b815260040160405180910390fd5b60005b84811015610f7f57610f6d868683818110610f2c57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610f4191906137e2565b858584818110610f6157634e487b7160e01b600052603260045260246000fd5b905060200201356128ee565b80610f77816141f5565b915050610f01565b505050505050565b323314610fa757604051637df1f81760e01b815260040160405180910390fd5b610fea8484338886868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061111992505050565b61100757604051638baa579f60e01b815260040160405180910390fd5b600085815261010c6020526040902054611020816113ae565b61103d57604051631515407360e31b815260040160405180910390fd5b60fd548661104a336122e1565b61105491906140b3565b111561107357604051632569daf960e11b815260040160405180910390fd5b60fb548661107f610d77565b61108991906140b3565b11156110a8576040516323e3df8960e11b815260040160405180910390fd5b6110b181612908565b6110bb33876128ee565b604080518781526020810183905233917f2c7d174a64b49c17bcea3a44c1ba1547c9a3f4997b68952c5dd3fcc1f17f7d6d910160405180910390a2505050505050565b610d7283838360405180602001604052806000815250611d0e565b600080611128878787876129a1565b6101015490915061010090046001600160a01b031661114782856129dc565b6001600160a01b0316149150505b95945050505050565b6033546001600160a01b031633146111885760405162461bcd60e51b8152600401610dcc90613f46565b6101015460ff16156111ad5760405163a89ac15160e01b815260040160405180910390fd5b6040805160a08101825261010654808252610107546001600160401b0381166020840181905263ffffffff600160401b8304811685870181905261ffff600160601b85041660608701819052600160701b9094049091166080860181905295516305d3b1d360e41b8152600481019490945260248401919091526044830191909152606482015260848101929092529073271682deb8c4e0901d1a1550ad2e64d568e6990990635d3b1d309060a401602060405180830381600087803b15801561127657600080fd5b505af115801561128a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ae9190613bd2565b60fc55610d728383611377565b6033546001600160a01b031633146112e55760405162461bcd60e51b8152600401610dcc90613f46565b61010283905560fd5481101561130e5760405163e39e546360e01b815260040160405180910390fd5b60015b818111611371578282611325600184614166565b81811061134257634e487b7160e01b600052603260045260246000fd5b600084815261010b60209081526040909120910292909201359091555080611369816141f5565b915050611311565b50505050565b6033546001600160a01b031633146113a15760405162461bcd60e51b8152600401610dcc90613f46565b610d7261010d838361358c565b60008115801590610c0d57506101055442101592915050565b60006113d282612a46565b5192915050565b606061010d8054610c22906141c0565b6033546001600160a01b031633146114135760405162461bcd60e51b8152600401610dcc90613f46565b61010180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160a01b038216611465576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152609d60205260409020546001600160401b031690565b6033546001600160a01b031633146114b45760405162461bcd60e51b8152600401610dcc90613f46565b6114be6000612b6d565b565b3233146114e057604051637df1f81760e01b815260040160405180910390fd5b600084815261010b60205260409020548061150e57604051630497435360e31b815260040160405180910390fd5b60008561151a336122e1565b61152491906140b3565b905060fd5481118061153557508481115b1561155357604051632569daf960e11b815260040160405180910390fd5b60fb548661155f610d77565b61156991906140b3565b1115611588576040516323e3df8960e11b815260040160405180910390fd5b60408051602081018990526bffffffffffffffffffffffff193360601b16918101919091526054810186905260009060740160405160208183030381529060405280519060200120905061161485858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610102549150849050612bbf565b611631576040516309bde33960e01b815260040160405180910390fd5b61163a83612908565b61164433886128ee565b604080518881526020810188905233918a917f595aaede9de4a7851636cd278316b0c860b678208bab75fdfbb651d01c0b19d5910160405180910390a35050505050505050565b6033546001600160a01b031633146116b55760405162461bcd60e51b8152600401610dcc90613f46565b61010a5463ffffffff16156116df5760006101088190556101095561010a805463ffffffff191690555b63ffffffff83166101055560fd5481101561170d5760405163e39e546360e01b815260040160405180910390fd5b60015b818111611371578282611724600184614166565b81811061174157634e487b7160e01b600052603260045260246000fd5b600084815261010c60209081526040909120910292909201359091555080611768816141f5565b915050611710565b73dab1a1854214684ace522439684a145e6250523333146117a45760405163327247c560e01b815260040160405180910390fd5b600082815261010c60205260409020546117bd816113ae565b6117da57604051631515407360e31b815260040160405180910390fd5b60fb54836117e6610d77565b6117f091906140b3565b111561180f576040516323e3df8960e11b815260040160405180910390fd5b61181881612908565b61182282846128ee565b60408051848152602081018390526001600160a01b038416917fbb4e705ab024d593d85132abfc80ec7f77e853ee64d9c327e347c4fa7bbda10f910160405180910390a2505050565b6040805160c081018252610108546001600160801b038082168352600160801b9182900481166020840152610109546001600160401b0380821695850195909552600160401b810490941660608401529204909116608082015261010a5463ffffffff1660a0820152600090428311156118ef57516001600160801b031692915050565b60408101516001600160401b03166119078442614166565b1061191f57602001516001600160801b031692915050565b60608101516000906001600160401b031661193a8542614166565b61194491906140f1565b905081608001516001600160801b03168161195f919061411f565b825161197491906001600160801b0316614166565b949350505050565b50919050565b6040805160608101825260008082526020820181905291810191909152610c0d82612a46565b6060609a8054610c22906141c0565b6001600160a01b0382163314156119e15760405163b06307db60e01b815260040160405180910390fd5b336000818152609f602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6033546001600160a01b03163314611a775760405162461bcd60e51b8152600401610dcc90613f46565b6101055415611a87576000610105555b611a8f610d77565b60fb54611a9c9190614166565b811115611abc57604051630a5af6b160e31b815260040160405180910390fd5b60ff8190556000611acd8385614105565b6001600160401b0316611ae0868861413e565b611aea91906140cb565b6040805160c0810182526001600160801b03988916808252978916602082018190526001600160401b0397881692820183905295909616606087018190529188166080870181905263ffffffff9990991660a0909601869052600160801b9485029096176101085561010980546001600160801b031916909617600160401b90910217909516919095021790915561010a805463ffffffff191690911790555050565b600260c9541415611be05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dcc565b600260c9556101035447906000906001600160a01b031615611c8c5761010354610104546001600160a01b0390911690606490611c1d908561411f565b611c2791906140f1565b604051600081818185875af1925050503d8060008114611c63576040519150601f19603f3d011682016040523d82523d6000602084013e611c68565b606091505b50508091505080611c8c57604051639c72c84d60e01b815260040160405180910390fd5b6033546040514793506001600160a01b03909116908390600081818185875af1925050503d8060008114611cdc576040519150601f19603f3d011682016040523d82523d6000602084013e611ce1565b606091505b50508091505080611d05576040516312171d8360e31b815260040160405180910390fd5b5050600160c955565b611d198484846126da565b6001600160a01b0383163b15158015611d3b5750611d3984848484612bd5565b155b15611371576040516368d2bf6b60e11b815260040160405180910390fd5b6060611d648261258f565b611d815760405163163a09e160e31b815260040160405180910390fd5b6101015460ff16611e1e57609b8054611d99906141c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611dc5906141c0565b8015611e125780601f10611de757610100808354040283529160200191611e12565b820191906000526020600020905b815481529060010190602001808311611df557829003601f168201915b50505050509050919050565b6101005461010d805460009190611e34906141c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611e60906141c0565b8015611ead5780601f10611e8257610100808354040283529160200191611ead565b820191906000526020600020905b815481529060010190602001808311611e9057829003601f168201915b505050505090506000600160fb54611ec59190614166565b9050600060fb546001600160401b03811115611ef157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b5090505b611f29600187614166565b821115611ff757808281518110611f5057634e487b7160e01b600052603260045260246000fd5b6020026020010151600014611f8c57808281518110611f7f57634e487b7160e01b600052603260045260246000fd5b6020026020010151611f97565b611f978260016140b3565b818581518110611fb757634e487b7160e01b600052603260045260246000fd5b602090810291909101015281611fce85600561411f565b611fd99060016140b3565b611fe39190614210565b935081611fef816141a9565b925050611f1e565b600081858151811061201957634e487b7160e01b600052603260045260246000fd5b60200260200101516000146120555781858151811061204857634e487b7160e01b600052603260045260246000fd5b6020026020010151612060565b6120608560016140b3565b90508351600014156120a7576040518060400160405280601981526020017f62617365757269206e6f742073657420636f72726563746c79000000000000008152506120d2565b836120b182612cc9565b6040516020016120c2929190613e6b565b6040516020818303038152906040525b979650505050505050565b600054610100900460ff166120f85760005460ff16156120fc565b303b155b61215f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610dcc565b600054610100900460ff16158015612181576000805461ffff19166101011790555b612189612de2565b6121a673271682deb8c4e0901d1a1550ad2e64d568e69909612e12565b6121b18b8b8b612e63565b868611156121d2576040516323e3df8960e11b815260040160405180910390fd5b60fd88905560fe86905560fb8790556040805160a0810182527f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded868058082526001600160401b03881660208301819052620186a0938301939093526003606083015260016080909201919091526101065561010780546bffffffffffffffffffffffff19169091176a0186a000000000000000001765ffffffffffff60601b19166201000360601b17905561010380546001600160a01b0319166001600160a01b03858116919091179091556101048590556101018054610100600160a81b0319166101009285169290920291909117905580156122d4576000805461ff00191690555b5050505050505050505050565b6000610c0d82612ea5565b6033546001600160a01b031633146123165760405162461bcd60e51b8152600401610dcc90613f46565b63ffffffff1660fd55565b6060609b8054610c22906141c0565b6033546001600160a01b0316331461235a5760405162461bcd60e51b8152600401610dcc90613f46565b610d72609b838361358c565b6033546001600160a01b031633146123905760405162461bcd60e51b8152600401610dcc90613f46565b6001600160a01b0381166123f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dcc565b6123fe81612b6d565b50565b32331461242157604051637df1f81760e01b815260040160405180910390fd5b6124648484338886868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061111992505050565b61248157604051638baa579f60e01b815260040160405180910390fd5b61010a5463ffffffff1680158061249757508042105b156124b557604051636e5bb0c960e11b815260040160405180910390fd5b60ff54866124c1610d77565b6124cb91906140b3565b11156124ea576040516309f0198d60e31b815260040160405180910390fd5b60fd54866124f7336122e1565b61250191906140b3565b111561252057604051632569daf960e11b815260040160405180910390fd5b60008661252c8361186b565b612536919061411f565b905061254181612908565b61254b33886128ee565b604080518881526020810183905233917fb351322093bbf28e3a61b00d67d6e9b269825af3fa800de2731ba0df8dab00ad910160405180910390a250505050505050565b6000816001111580156125a3575060975482105b8015610c0d5750506000908152609c6020526040902054600160e01b900460ff161590565b6000828152609e602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60fb548160008151811061264857634e487b7160e01b600052603260045260246000fd5b602002602001015161265a9190614210565b61010055610101805460ff1916600117905580517f87bc7ac3558ecd9fc4042e000d2f0632cfc75cae031d98a5b795eb1c5aac900390839083906000906126b157634e487b7160e01b600052603260045260246000fd5b602002602001015161010d60016040516126ce9493929190613fc6565b60405180910390a15050565b60006126e582612a46565b80519091506000906001600160a01b0316336001600160a01b03161480612713575081516127139033610b2a565b8061272e57503361272384610ca5565b6001600160a01b0316145b90508061274e57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146127835760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166127aa57604051633a954ecd60e21b815260040160405180910390fd5b6127ba60008484600001516125c8565b6001600160a01b038581166000908152609d60209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652609c90945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166128a4576097548110156128a45782516000828152609c602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610ddf828260405180602001604052806000815250612efa565b803410156129295760405163401c98e360e01b815260040160405180910390fd5b803411156123fe5760003361293e8334614166565b604051600081818185875af1925050503d806000811461297a576040519150601f19603f3d011682016040523d82523d6000602084013e61297f565b606091505b5050905080610ddf57604051639c72c84d60e01b815260040160405180910390fd5b600084843085856040516020016129bc959493929190613ee7565b604051602081830303815290604052805190602001209050949350505050565b6000612a3f82612a39856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90612f07565b9392505050565b60408051606081018252600080825260208201819052918101919091528180600111158015612a76575060975481105b15612b54576000818152609c6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290612b525780516001600160a01b031615612ae9579392505050565b50600019016000818152609c6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612b4d579392505050565b612ae9565b505b604051636f96cda160e11b815260040160405180910390fd5b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082612bcc8584612f2b565b14949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612c0a903390899088908890600401613eaa565b602060405180830381600087803b158015612c2457600080fd5b505af1925050508015612c54575060408051601f3d908101601f19168201909252612c51918101906139fe565b60015b612caf573d808015612c82576040519150601f19603f3d011682016040523d82523d6000602084013e612c87565b606091505b508051612ca7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611974565b606081612ced5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d175780612d01816141f5565b9150612d109050600a836140f1565b9150612cf1565b6000816001600160401b03811115612d3f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d69576020820181803683370190505b5090505b841561197457612d7e600183614166565b9150612d8b600a86614210565b612d969060306140b3565b60f81b818381518110612db957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612ddb600a866140f1565b9450612d6d565b600054610100900460ff16612e095760405162461bcd60e51b8152600401610dcc90613f7b565b6114be33612b6d565b600054610100900460ff16612e395760405162461bcd60e51b8152600401610dcc90613f7b565b600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b600054610100900460ff16612e8a5760405162461bcd60e51b8152600401610dcc90613f7b565b612e92612fa5565b612e9a612fa5565b610d72838383612fcc565b60006001600160a01b038216612ece576040516335ebb31960e01b815260040160405180910390fd5b506001600160a01b03166000908152609d6020526040902054600160401b90046001600160401b031690565b610d728383836001613033565b6000806000612f1685856131f5565b91509150612f2381613265565b509392505050565b600081815b8451811015612f23576000858281518110612f5b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311612f815760008381526020829052604090209250612f92565b600081815260208490526040902092505b5080612f9d816141f5565b915050612f30565b600054610100900460ff166114be5760405162461bcd60e51b8152600401610dcc90613f7b565b600054610100900460ff16612ff35760405162461bcd60e51b8152600401610dcc90613f7b565b8251613006906099906020860190613610565b50815161301a90609a906020850190613610565b506001609755805161137190609b906020840190613610565b6097546001600160a01b03851661305c57604051622e076360e81b815260040160405180910390fd5b8361307a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0385166000818152609d6020908152604080832080546001600160801b031981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452609c90925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561311d57506001600160a01b0387163b15155b156131a6575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461316e6000888480600101955088612bd5565b61318b576040516368d2bf6b60e11b815260040160405180910390fd5b808214156131235782609754146131a157600080fd5b6131ec565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156131a7575b506097556128e7565b60008082516041141561322c5760208301516040840151606085015160001a61322087828585613466565b9450945050505061325e565b825160401415613256576020830151604084015161324b868383613553565b93509350505061325e565b506000905060025b9250929050565b600081600481111561328757634e487b7160e01b600052602160045260246000fd5b14156132905750565b60018160048111156132b257634e487b7160e01b600052602160045260246000fd5b14156133005760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610dcc565b600281600481111561332257634e487b7160e01b600052602160045260246000fd5b14156133705760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610dcc565b600381600481111561339257634e487b7160e01b600052602160045260246000fd5b14156133eb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610dcc565b600481600481111561340d57634e487b7160e01b600052602160045260246000fd5b14156123fe5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610dcc565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561349d575060009050600361354a565b8460ff16601b141580156134b557508460ff16601c14155b156134c6575060009050600461354a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561351a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166135435760006001925092505061354a565b9150600090505b94509492505050565b6000806001600160ff1b0383168161357060ff86901c601b6140b3565b905061357e87828885613466565b935093505050935093915050565b828054613598906141c0565b90600052602060002090601f0160209004810192826135ba5760008555613600565b82601f106135d35782800160ff19823516178555613600565b82800160010185558215613600579182015b828111156136005782358255916020019190600101906135e5565b5061360c929150613684565b5090565b82805461361c906141c0565b90600052602060002090601f01602090048101928261363e5760008555613600565b82601f1061365757805160ff1916838001178555613600565b82800160010185558215613600579182015b82811115613600578251825591602001919060010190613669565b5b8082111561360c5760008155600101613685565b80356001600160a01b03811681146136b057600080fd5b919050565b60008083601f8401126136c6578182fd5b5081356001600160401b038111156136dc578182fd5b6020830191508360208260051b850101111561325e57600080fd5b60008083601f840112613708578182fd5b5081356001600160401b0381111561371e578182fd5b60208301915083602082850101111561325e57600080fd5b600082601f830112613746578081fd5b81356001600160401b0381111561375f5761375f614250565b613772601f8201601f1916602001614083565b818152846020838601011115613786578283fd5b816020850160208301379081016020019190915292915050565b80356001600160801b03811681146136b057600080fd5b803563ffffffff811681146136b057600080fd5b80356001600160401b03811681146136b057600080fd5b6000602082840312156137f3578081fd5b612a3f82613699565b6000806040838503121561380e578081fd5b61381783613699565b915061382560208401613699565b90509250929050565b600080600060608486031215613842578081fd5b61384b84613699565b925061385960208501613699565b9150604084013590509250925092565b6000806000806080858703121561387e578081fd5b61388785613699565b935061389560208601613699565b92506040850135915060608501356001600160401b038111156138b6578182fd5b6138c287828801613736565b91505092959194509250565b600080604083850312156138e0578182fd5b6138e983613699565b9150602083013580151581146138fd578182fd5b809150509250929050565b6000806040838503121561391a578182fd5b61392383613699565b946020939093013593505050565b60008060008060408587031215613946578182fd5b84356001600160401b038082111561395c578384fd5b613968888389016136b5565b90965094506020870135915080821115613980578384fd5b5061398d878288016136b5565b95989497509550505050565b6000806000604084860312156139ad578081fd5b8335925060208401356001600160401b038111156139c9578182fd5b6139d5868287016136b5565b9497909650939450505050565b6000602082840312156139f3578081fd5b8135612a3f81614266565b600060208284031215613a0f578081fd5b8151612a3f81614266565b60008060208385031215613a2c578182fd5b82356001600160401b03811115613a41578283fd5b613a4d858286016136f7565b90969095509350505050565b600080600080600060808688031215613a70578283fd5b85356001600160401b0380821115613a86578485fd5b613a9289838a016136f7565b9097509550859150613aa660208901613699565b9450604088013593506060880135915080821115613ac2578283fd5b50613acf88828901613736565b9150509295509295909350565b6000806000806000806000806000806101408b8d031215613afb578788fd5b8a356001600160401b0380821115613b1157898afd5b613b1d8e838f01613736565b9b5060208d0135915080821115613b3257898afd5b613b3e8e838f01613736565b9a5060408d0135915080821115613b5357898afd5b50613b608d828e01613736565b98505060608b0135965060808b0135955060a08b01359450613b8460c08c016137cb565b935060e08b01359250613b9a6101008c01613699565b9150613ba96101208c01613699565b90509295989b9194979a5092959850565b600060208284031215613bcb578081fd5b5035919050565b600060208284031215613be3578081fd5b5051919050565b60008060408385031215613bfc578182fd5b8235915061382560208401613699565b60008060408385031215613c1e578182fd5b823591506020808401356001600160401b0380821115613c3c578384fd5b818601915086601f830112613c4f578384fd5b813581811115613c6157613c61614250565b8060051b9150613c72848301614083565b8181528481019084860184860187018b1015613c8c578788fd5b8795505b83861015613cae578035835260019590950194918601918601613c90565b508096505050505050509250929050565b600080600080600060608688031215613cd6578283fd5b8535945060208601356001600160401b0380821115613cf3578485fd5b613cff89838a016136f7565b90965094506040880135915080821115613d17578283fd5b50613d24888289016136f7565b969995985093965092949392505050565b600080600080600060808688031215613d4c578283fd5b85359450602086013593506040860135925060608601356001600160401b03811115613d76578182fd5b613d24888289016136b5565b600060208284031215613d93578081fd5b612a3f826137b7565b600080600060408486031215613db0578081fd5b613db9846137b7565b925060208401356001600160401b038111156139c9578182fd5b60008060008060008060c08789031215613deb578384fd5b613df4876137b7565b9550613e02602088016137a0565b9450613e10604088016137a0565b9350613e1e606088016137cb565b9250613e2c608088016137cb565b915060a087013590509295509295509295565b60008151808452613e5781602086016020860161417d565b601f01601f19169290920160200192915050565b60008351613e7d81846020880161417d565b835190830190613e9181836020880161417d565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613edd90830184613e3f565b9695505050505050565b60808152846080820152848660a0830137600060a08683018101919091526001600160a01b0394851660208301529290931660408401526060830152601f909201601f19160101919050565b602081526000612a3f6020830184613e3f565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b8481526000602085818401526080604084015281855483600182811c915080831680613ff357607f831692505b85831081141561401157634e487b7160e01b87526022600452602487fd5b6080880183905260a0880181801561403057600181146140415761406b565b60ff1986168252878201965061406b565b60008c815260209020895b868110156140655781548482015290850190890161404c565b83019750505b50505050861515606087015250909250611155915050565b604051601f8201601f191681016001600160401b03811182821017156140ab576140ab614250565b604052919050565b600082198211156140c6576140c6614224565b500190565b60006001600160801b03808416806140e5576140e561423a565b92169190910492915050565b6000826141005761410061423a565b500490565b60006001600160401b03808416806140e5576140e561423a565b600081600019048311821515161561413957614139614224565b500290565b60006001600160801b038381169083168181101561415e5761415e614224565b039392505050565b60008282101561417857614178614224565b500390565b60005b83811015614198578181015183820152602001614180565b838111156113715750506000910152565b6000816141b8576141b8614224565b506000190190565b600181811c908216806141d457607f821691505b6020821081141561197c57634e487b7160e01b600052602260045260246000fd5b600060001982141561420957614209614224565b5060010190565b60008261421f5761421f61423a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146123fe57600080fdfea26469706673582212206a0cfed42674a7a28ab1fb5178239e37d044582bd15103505e58f2fd79f4615564736f6c63430008040033
Deployed Bytecode
0x6080604052600436106103815760003560e01c80637818a7c2116101d1578063b4e7dddd11610102578063e523a2dc116100a0578063f2c4ce1e1161006f578063f2c4ce1e14610b58578063f2fde38b14610b78578063f38983a614610b98578063f7df4c5a14610bab57600080fd5b8063e523a2dc14610ac4578063e89e106a14610ae4578063e8a3d48514610afa578063e985e9c514610b0f57600080fd5b8063c87b56dd116100dc578063c87b56dd14610a36578063d124728d14610a56578063d625e22614610a76578063dc33e68114610aa457600080fd5b8063b4e7dddd14610957578063b88d4fde1461096e578063bb4061351461098e57600080fd5b80639231ab2a1161016f578063a8b6938411610149578063a8b6938414610882578063ac010bb8146108a2578063ac446002146108b9578063b11065be146108ce57600080fd5b80639231ab2a146107f757806395d89b411461084d578063a22cb4651461086257600080fd5b80638087e4f1116101ab5780638087e4f1146107755780638bc35c2f146107a35780638da5cb5b146107b9578063917d009e146107d757600080fd5b80637818a7c21461072f5780637a7e6c94146107425780637b2e64d81461076257600080fd5b806342842e0e116102b657806355f804b3116102545780636c0360eb116102235780636c0360eb146106c55780636c19e783146106da57806370a08231146106fa578063715018a61461071a57600080fd5b806355f804b31461064e5780635ec085191461066e5780636352211e1461068e5780636bb7b1d9146106ae57600080fd5b80634c261247116102905780634c261247146105bf5780634d4e9578146105df57806351830227146105ff57806351dc86a51461061a57600080fd5b806342842e0e1461055e57806347b08a1d1461057e5780634bde38c81461059e57600080fd5b8063238ac9331161032357806326ee1b5f116102fd57806326ee1b5f14610508578063299c89891461051e57806332cb6b0c1461053157806336e0cac61461054757600080fd5b8063238ac933146104a257806323b872dd146104c85780632446548f146104e857600080fd5b8063081812fc1161035f578063081812fc1461041d578063095ea7b31461043d57806318160ddd1461045f5780631fe543e31461048257600080fd5b806301ffc9a71461038657806305f6a924146103bb57806306fdde03146103fb575b600080fd5b34801561039257600080fd5b506103a66103a13660046139e2565b610bc1565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103e373271682deb8c4e0901d1a1550ad2e64d568e6990981565b6040516001600160a01b0390911681526020016103b2565b34801561040757600080fd5b50610410610c13565b6040516103b29190613f33565b34801561042957600080fd5b506103e3610438366004613bba565b610ca5565b34801561044957600080fd5b5061045d610458366004613908565b610ce9565b005b34801561046b57600080fd5b50610474610d77565b6040519081526020016103b2565b34801561048e57600080fd5b5061045d61049d366004613c0c565b610d85565b3480156104ae57600080fd5b50610101546103e39061010090046001600160a01b031681565b3480156104d457600080fd5b5061045d6104e336600461382e565b610de3565b3480156104f457600080fd5b5061045d610503366004613931565b610dee565b34801561051457600080fd5b5061047460fe5481565b61045d61052c366004613cbf565b610f87565b34801561053d57600080fd5b5061047460fb5481565b34801561055357600080fd5b506104746101045481565b34801561056a57600080fd5b5061045d61057936600461382e565b6110fe565b34801561058a57600080fd5b506103a6610599366004613a59565b611119565b3480156105aa57600080fd5b50610103546103e3906001600160a01b031681565b3480156105cb57600080fd5b5061045d6105da366004613a1a565b61115e565b3480156105eb57600080fd5b5061045d6105fa366004613999565b6112bb565b34801561060b57600080fd5b50610101546103a69060ff1681565b34801561062657600080fd5b506104747f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded8680581565b34801561065a57600080fd5b5061045d610669366004613a1a565b611377565b34801561067a57600080fd5b506103a6610689366004613bba565b6113ae565b34801561069a57600080fd5b506103e36106a9366004613bba565b6113c7565b3480156106ba57600080fd5b506104746101055481565b3480156106d157600080fd5b506104106113d9565b3480156106e657600080fd5b5061045d6106f53660046137e2565b6113e9565b34801561070657600080fd5b506104746107153660046137e2565b61143c565b34801561072657600080fd5b5061045d61148a565b61045d61073d366004613d35565b6114c0565b34801561074e57600080fd5b5061045d61075d366004613d9c565b61168b565b61045d610770366004613bea565b611770565b34801561078157600080fd5b50610474610790366004613bba565b61010b6020526000908152604090205481565b3480156107af57600080fd5b5061047460fd5481565b3480156107c557600080fd5b506033546001600160a01b03166103e3565b3480156107e357600080fd5b506104746107f2366004613bba565b61186b565b34801561080357600080fd5b50610817610812366004613bba565b611982565b6040805182516001600160a01b031681526020808401516001600160401b031690820152918101511515908201526060016103b2565b34801561085957600080fd5b506104106119a8565b34801561086e57600080fd5b5061045d61087d3660046138ce565b6119b7565b34801561088e57600080fd5b5061045d61089d366004613dd3565b611a4d565b3480156108ae57600080fd5b506104746101005481565b3480156108c557600080fd5b5061045d611b8d565b3480156108da57600080fd5b50610106546101075461091a91906001600160401b0381169063ffffffff600160401b820481169161ffff600160601b82041691600160701b9091041685565b604080519586526001600160401b03909416602086015263ffffffff9283169385019390935261ffff16606084015216608082015260a0016103b2565b34801561096357600080fd5b506104746101025481565b34801561097a57600080fd5b5061045d610989366004613869565b611d0e565b34801561099a57600080fd5b50610108546101095461010a546109e9926001600160801b0380821693600160801b928390048216936001600160401b0380831694600160401b84049091169392049091169063ffffffff1686565b604080516001600160801b03978816815295871660208701526001600160401b03948516908601529190921660608401529216608082015263ffffffff90911660a082015260c0016103b2565b348015610a4257600080fd5b50610410610a51366004613bba565b611d59565b348015610a6257600080fd5b5061045d610a71366004613adc565b6120dd565b348015610a8257600080fd5b50610474610a91366004613bba565b61010c6020526000908152604090205481565b348015610ab057600080fd5b50610474610abf3660046137e2565b6122e1565b348015610ad057600080fd5b5061045d610adf366004613d82565b6122ec565b348015610af057600080fd5b5061047460fc5481565b348015610b0657600080fd5b50610410612321565b348015610b1b57600080fd5b506103a6610b2a3660046137fc565b6001600160a01b039182166000908152609f6020908152604080832093909416825291909152205460ff1690565b348015610b6457600080fd5b5061045d610b73366004613a1a565b612330565b348015610b8457600080fd5b5061045d610b933660046137e2565b612366565b61045d610ba6366004613cbf565b612401565b348015610bb757600080fd5b5061047460ff5481565b60006001600160e01b031982166380ac58cd60e01b1480610bf257506001600160e01b03198216635b5e139f60e01b145b80610c0d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060998054610c22906141c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4e906141c0565b8015610c9b5780601f10610c7057610100808354040283529160200191610c9b565b820191906000526020600020905b815481529060010190602001808311610c7e57829003601f168201915b5050505050905090565b6000610cb08261258f565b610ccd576040516333d1c03960e21b815260040160405180910390fd5b506000908152609e60205260409020546001600160a01b031690565b6000610cf4826113c7565b9050806001600160a01b0316836001600160a01b03161415610d295760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610d495750610d478133610b2a565b155b15610d67576040516367d9dca160e11b815260040160405180910390fd5b610d728383836125c8565b505050565b609854609754036000190190565b6000546201000090046001600160a01b03163314610dd55760005460405163073e64fd60e21b8152336004820152620100009091046001600160a01b031660248201526044015b60405180910390fd5b610ddf8282612624565b5050565b610d728383836126da565b6033546001600160a01b03163314610e185760405162461bcd60e51b8152600401610dcc90613f46565b828114610e385760405163ed882f7160e01b815260040160405180910390fd5b6000805b84811015610e8a57838382818110610e6457634e487b7160e01b600052603260045260246000fd5b9050602002013582610e7691906140b3565b915080610e82816141f5565b915050610e3c565b508061010e6000828254610e9e91906140b3565b909155505060fb5481610eaf610d77565b610eb991906140b3565b1115610ed8576040516323e3df8960e11b815260040160405180910390fd5b60fe5461010e541115610efe5760405163022e28e560e61b815260040160405180910390fd5b60005b84811015610f7f57610f6d868683818110610f2c57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610f4191906137e2565b858584818110610f6157634e487b7160e01b600052603260045260246000fd5b905060200201356128ee565b80610f77816141f5565b915050610f01565b505050505050565b323314610fa757604051637df1f81760e01b815260040160405180910390fd5b610fea8484338886868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061111992505050565b61100757604051638baa579f60e01b815260040160405180910390fd5b600085815261010c6020526040902054611020816113ae565b61103d57604051631515407360e31b815260040160405180910390fd5b60fd548661104a336122e1565b61105491906140b3565b111561107357604051632569daf960e11b815260040160405180910390fd5b60fb548661107f610d77565b61108991906140b3565b11156110a8576040516323e3df8960e11b815260040160405180910390fd5b6110b181612908565b6110bb33876128ee565b604080518781526020810183905233917f2c7d174a64b49c17bcea3a44c1ba1547c9a3f4997b68952c5dd3fcc1f17f7d6d910160405180910390a2505050505050565b610d7283838360405180602001604052806000815250611d0e565b600080611128878787876129a1565b6101015490915061010090046001600160a01b031661114782856129dc565b6001600160a01b0316149150505b95945050505050565b6033546001600160a01b031633146111885760405162461bcd60e51b8152600401610dcc90613f46565b6101015460ff16156111ad5760405163a89ac15160e01b815260040160405180910390fd5b6040805160a08101825261010654808252610107546001600160401b0381166020840181905263ffffffff600160401b8304811685870181905261ffff600160601b85041660608701819052600160701b9094049091166080860181905295516305d3b1d360e41b8152600481019490945260248401919091526044830191909152606482015260848101929092529073271682deb8c4e0901d1a1550ad2e64d568e6990990635d3b1d309060a401602060405180830381600087803b15801561127657600080fd5b505af115801561128a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ae9190613bd2565b60fc55610d728383611377565b6033546001600160a01b031633146112e55760405162461bcd60e51b8152600401610dcc90613f46565b61010283905560fd5481101561130e5760405163e39e546360e01b815260040160405180910390fd5b60015b818111611371578282611325600184614166565b81811061134257634e487b7160e01b600052603260045260246000fd5b600084815261010b60209081526040909120910292909201359091555080611369816141f5565b915050611311565b50505050565b6033546001600160a01b031633146113a15760405162461bcd60e51b8152600401610dcc90613f46565b610d7261010d838361358c565b60008115801590610c0d57506101055442101592915050565b60006113d282612a46565b5192915050565b606061010d8054610c22906141c0565b6033546001600160a01b031633146114135760405162461bcd60e51b8152600401610dcc90613f46565b61010180546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160a01b038216611465576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152609d60205260409020546001600160401b031690565b6033546001600160a01b031633146114b45760405162461bcd60e51b8152600401610dcc90613f46565b6114be6000612b6d565b565b3233146114e057604051637df1f81760e01b815260040160405180910390fd5b600084815261010b60205260409020548061150e57604051630497435360e31b815260040160405180910390fd5b60008561151a336122e1565b61152491906140b3565b905060fd5481118061153557508481115b1561155357604051632569daf960e11b815260040160405180910390fd5b60fb548661155f610d77565b61156991906140b3565b1115611588576040516323e3df8960e11b815260040160405180910390fd5b60408051602081018990526bffffffffffffffffffffffff193360601b16918101919091526054810186905260009060740160405160208183030381529060405280519060200120905061161485858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050610102549150849050612bbf565b611631576040516309bde33960e01b815260040160405180910390fd5b61163a83612908565b61164433886128ee565b604080518881526020810188905233918a917f595aaede9de4a7851636cd278316b0c860b678208bab75fdfbb651d01c0b19d5910160405180910390a35050505050505050565b6033546001600160a01b031633146116b55760405162461bcd60e51b8152600401610dcc90613f46565b61010a5463ffffffff16156116df5760006101088190556101095561010a805463ffffffff191690555b63ffffffff83166101055560fd5481101561170d5760405163e39e546360e01b815260040160405180910390fd5b60015b818111611371578282611724600184614166565b81811061174157634e487b7160e01b600052603260045260246000fd5b600084815261010c60209081526040909120910292909201359091555080611768816141f5565b915050611710565b73dab1a1854214684ace522439684a145e6250523333146117a45760405163327247c560e01b815260040160405180910390fd5b600082815261010c60205260409020546117bd816113ae565b6117da57604051631515407360e31b815260040160405180910390fd5b60fb54836117e6610d77565b6117f091906140b3565b111561180f576040516323e3df8960e11b815260040160405180910390fd5b61181881612908565b61182282846128ee565b60408051848152602081018390526001600160a01b038416917fbb4e705ab024d593d85132abfc80ec7f77e853ee64d9c327e347c4fa7bbda10f910160405180910390a2505050565b6040805160c081018252610108546001600160801b038082168352600160801b9182900481166020840152610109546001600160401b0380821695850195909552600160401b810490941660608401529204909116608082015261010a5463ffffffff1660a0820152600090428311156118ef57516001600160801b031692915050565b60408101516001600160401b03166119078442614166565b1061191f57602001516001600160801b031692915050565b60608101516000906001600160401b031661193a8542614166565b61194491906140f1565b905081608001516001600160801b03168161195f919061411f565b825161197491906001600160801b0316614166565b949350505050565b50919050565b6040805160608101825260008082526020820181905291810191909152610c0d82612a46565b6060609a8054610c22906141c0565b6001600160a01b0382163314156119e15760405163b06307db60e01b815260040160405180910390fd5b336000818152609f602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6033546001600160a01b03163314611a775760405162461bcd60e51b8152600401610dcc90613f46565b6101055415611a87576000610105555b611a8f610d77565b60fb54611a9c9190614166565b811115611abc57604051630a5af6b160e31b815260040160405180910390fd5b60ff8190556000611acd8385614105565b6001600160401b0316611ae0868861413e565b611aea91906140cb565b6040805160c0810182526001600160801b03988916808252978916602082018190526001600160401b0397881692820183905295909616606087018190529188166080870181905263ffffffff9990991660a0909601869052600160801b9485029096176101085561010980546001600160801b031916909617600160401b90910217909516919095021790915561010a805463ffffffff191690911790555050565b600260c9541415611be05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dcc565b600260c9556101035447906000906001600160a01b031615611c8c5761010354610104546001600160a01b0390911690606490611c1d908561411f565b611c2791906140f1565b604051600081818185875af1925050503d8060008114611c63576040519150601f19603f3d011682016040523d82523d6000602084013e611c68565b606091505b50508091505080611c8c57604051639c72c84d60e01b815260040160405180910390fd5b6033546040514793506001600160a01b03909116908390600081818185875af1925050503d8060008114611cdc576040519150601f19603f3d011682016040523d82523d6000602084013e611ce1565b606091505b50508091505080611d05576040516312171d8360e31b815260040160405180910390fd5b5050600160c955565b611d198484846126da565b6001600160a01b0383163b15158015611d3b5750611d3984848484612bd5565b155b15611371576040516368d2bf6b60e11b815260040160405180910390fd5b6060611d648261258f565b611d815760405163163a09e160e31b815260040160405180910390fd5b6101015460ff16611e1e57609b8054611d99906141c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611dc5906141c0565b8015611e125780601f10611de757610100808354040283529160200191611e12565b820191906000526020600020905b815481529060010190602001808311611df557829003601f168201915b50505050509050919050565b6101005461010d805460009190611e34906141c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611e60906141c0565b8015611ead5780601f10611e8257610100808354040283529160200191611ead565b820191906000526020600020905b815481529060010190602001808311611e9057829003601f168201915b505050505090506000600160fb54611ec59190614166565b9050600060fb546001600160401b03811115611ef157634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611f1a578160200160208202803683370190505b5090505b611f29600187614166565b821115611ff757808281518110611f5057634e487b7160e01b600052603260045260246000fd5b6020026020010151600014611f8c57808281518110611f7f57634e487b7160e01b600052603260045260246000fd5b6020026020010151611f97565b611f978260016140b3565b818581518110611fb757634e487b7160e01b600052603260045260246000fd5b602090810291909101015281611fce85600561411f565b611fd99060016140b3565b611fe39190614210565b935081611fef816141a9565b925050611f1e565b600081858151811061201957634e487b7160e01b600052603260045260246000fd5b60200260200101516000146120555781858151811061204857634e487b7160e01b600052603260045260246000fd5b6020026020010151612060565b6120608560016140b3565b90508351600014156120a7576040518060400160405280601981526020017f62617365757269206e6f742073657420636f72726563746c79000000000000008152506120d2565b836120b182612cc9565b6040516020016120c2929190613e6b565b6040516020818303038152906040525b979650505050505050565b600054610100900460ff166120f85760005460ff16156120fc565b303b155b61215f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610dcc565b600054610100900460ff16158015612181576000805461ffff19166101011790555b612189612de2565b6121a673271682deb8c4e0901d1a1550ad2e64d568e69909612e12565b6121b18b8b8b612e63565b868611156121d2576040516323e3df8960e11b815260040160405180910390fd5b60fd88905560fe86905560fb8790556040805160a0810182527f9fe0eebf5e446e3c998ec9bb19951541aee00bb90ea201ae456421a2ded868058082526001600160401b03881660208301819052620186a0938301939093526003606083015260016080909201919091526101065561010780546bffffffffffffffffffffffff19169091176a0186a000000000000000001765ffffffffffff60601b19166201000360601b17905561010380546001600160a01b0319166001600160a01b03858116919091179091556101048590556101018054610100600160a81b0319166101009285169290920291909117905580156122d4576000805461ff00191690555b5050505050505050505050565b6000610c0d82612ea5565b6033546001600160a01b031633146123165760405162461bcd60e51b8152600401610dcc90613f46565b63ffffffff1660fd55565b6060609b8054610c22906141c0565b6033546001600160a01b0316331461235a5760405162461bcd60e51b8152600401610dcc90613f46565b610d72609b838361358c565b6033546001600160a01b031633146123905760405162461bcd60e51b8152600401610dcc90613f46565b6001600160a01b0381166123f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dcc565b6123fe81612b6d565b50565b32331461242157604051637df1f81760e01b815260040160405180910390fd5b6124648484338886868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061111992505050565b61248157604051638baa579f60e01b815260040160405180910390fd5b61010a5463ffffffff1680158061249757508042105b156124b557604051636e5bb0c960e11b815260040160405180910390fd5b60ff54866124c1610d77565b6124cb91906140b3565b11156124ea576040516309f0198d60e31b815260040160405180910390fd5b60fd54866124f7336122e1565b61250191906140b3565b111561252057604051632569daf960e11b815260040160405180910390fd5b60008661252c8361186b565b612536919061411f565b905061254181612908565b61254b33886128ee565b604080518881526020810183905233917fb351322093bbf28e3a61b00d67d6e9b269825af3fa800de2731ba0df8dab00ad910160405180910390a250505050505050565b6000816001111580156125a3575060975482105b8015610c0d5750506000908152609c6020526040902054600160e01b900460ff161590565b6000828152609e602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60fb548160008151811061264857634e487b7160e01b600052603260045260246000fd5b602002602001015161265a9190614210565b61010055610101805460ff1916600117905580517f87bc7ac3558ecd9fc4042e000d2f0632cfc75cae031d98a5b795eb1c5aac900390839083906000906126b157634e487b7160e01b600052603260045260246000fd5b602002602001015161010d60016040516126ce9493929190613fc6565b60405180910390a15050565b60006126e582612a46565b80519091506000906001600160a01b0316336001600160a01b03161480612713575081516127139033610b2a565b8061272e57503361272384610ca5565b6001600160a01b0316145b90508061274e57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146127835760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166127aa57604051633a954ecd60e21b815260040160405180910390fd5b6127ba60008484600001516125c8565b6001600160a01b038581166000908152609d60209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652609c90945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166128a4576097548110156128a45782516000828152609c602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610ddf828260405180602001604052806000815250612efa565b803410156129295760405163401c98e360e01b815260040160405180910390fd5b803411156123fe5760003361293e8334614166565b604051600081818185875af1925050503d806000811461297a576040519150601f19603f3d011682016040523d82523d6000602084013e61297f565b606091505b5050905080610ddf57604051639c72c84d60e01b815260040160405180910390fd5b600084843085856040516020016129bc959493929190613ee7565b604051602081830303815290604052805190602001209050949350505050565b6000612a3f82612a39856040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90612f07565b9392505050565b60408051606081018252600080825260208201819052918101919091528180600111158015612a76575060975481105b15612b54576000818152609c6020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290612b525780516001600160a01b031615612ae9579392505050565b50600019016000818152609c6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612b4d579392505050565b612ae9565b505b604051636f96cda160e11b815260040160405180910390fd5b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082612bcc8584612f2b565b14949350505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612c0a903390899088908890600401613eaa565b602060405180830381600087803b158015612c2457600080fd5b505af1925050508015612c54575060408051601f3d908101601f19168201909252612c51918101906139fe565b60015b612caf573d808015612c82576040519150601f19603f3d011682016040523d82523d6000602084013e612c87565b606091505b508051612ca7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611974565b606081612ced5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d175780612d01816141f5565b9150612d109050600a836140f1565b9150612cf1565b6000816001600160401b03811115612d3f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d69576020820181803683370190505b5090505b841561197457612d7e600183614166565b9150612d8b600a86614210565b612d969060306140b3565b60f81b818381518110612db957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612ddb600a866140f1565b9450612d6d565b600054610100900460ff16612e095760405162461bcd60e51b8152600401610dcc90613f7b565b6114be33612b6d565b600054610100900460ff16612e395760405162461bcd60e51b8152600401610dcc90613f7b565b600080546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b600054610100900460ff16612e8a5760405162461bcd60e51b8152600401610dcc90613f7b565b612e92612fa5565b612e9a612fa5565b610d72838383612fcc565b60006001600160a01b038216612ece576040516335ebb31960e01b815260040160405180910390fd5b506001600160a01b03166000908152609d6020526040902054600160401b90046001600160401b031690565b610d728383836001613033565b6000806000612f1685856131f5565b91509150612f2381613265565b509392505050565b600081815b8451811015612f23576000858281518110612f5b57634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311612f815760008381526020829052604090209250612f92565b600081815260208490526040902092505b5080612f9d816141f5565b915050612f30565b600054610100900460ff166114be5760405162461bcd60e51b8152600401610dcc90613f7b565b600054610100900460ff16612ff35760405162461bcd60e51b8152600401610dcc90613f7b565b8251613006906099906020860190613610565b50815161301a90609a906020850190613610565b506001609755805161137190609b906020840190613610565b6097546001600160a01b03851661305c57604051622e076360e81b815260040160405180910390fd5b8361307a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0385166000818152609d6020908152604080832080546001600160801b031981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452609c90925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561311d57506001600160a01b0387163b15155b156131a6575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461316e6000888480600101955088612bd5565b61318b576040516368d2bf6b60e11b815260040160405180910390fd5b808214156131235782609754146131a157600080fd5b6131ec565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156131a7575b506097556128e7565b60008082516041141561322c5760208301516040840151606085015160001a61322087828585613466565b9450945050505061325e565b825160401415613256576020830151604084015161324b868383613553565b93509350505061325e565b506000905060025b9250929050565b600081600481111561328757634e487b7160e01b600052602160045260246000fd5b14156132905750565b60018160048111156132b257634e487b7160e01b600052602160045260246000fd5b14156133005760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610dcc565b600281600481111561332257634e487b7160e01b600052602160045260246000fd5b14156133705760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610dcc565b600381600481111561339257634e487b7160e01b600052602160045260246000fd5b14156133eb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610dcc565b600481600481111561340d57634e487b7160e01b600052602160045260246000fd5b14156123fe5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610dcc565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561349d575060009050600361354a565b8460ff16601b141580156134b557508460ff16601c14155b156134c6575060009050600461354a565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561351a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166135435760006001925092505061354a565b9150600090505b94509492505050565b6000806001600160ff1b0383168161357060ff86901c601b6140b3565b905061357e87828885613466565b935093505050935093915050565b828054613598906141c0565b90600052602060002090601f0160209004810192826135ba5760008555613600565b82601f106135d35782800160ff19823516178555613600565b82800160010185558215613600579182015b828111156136005782358255916020019190600101906135e5565b5061360c929150613684565b5090565b82805461361c906141c0565b90600052602060002090601f01602090048101928261363e5760008555613600565b82601f1061365757805160ff1916838001178555613600565b82800160010185558215613600579182015b82811115613600578251825591602001919060010190613669565b5b8082111561360c5760008155600101613685565b80356001600160a01b03811681146136b057600080fd5b919050565b60008083601f8401126136c6578182fd5b5081356001600160401b038111156136dc578182fd5b6020830191508360208260051b850101111561325e57600080fd5b60008083601f840112613708578182fd5b5081356001600160401b0381111561371e578182fd5b60208301915083602082850101111561325e57600080fd5b600082601f830112613746578081fd5b81356001600160401b0381111561375f5761375f614250565b613772601f8201601f1916602001614083565b818152846020838601011115613786578283fd5b816020850160208301379081016020019190915292915050565b80356001600160801b03811681146136b057600080fd5b803563ffffffff811681146136b057600080fd5b80356001600160401b03811681146136b057600080fd5b6000602082840312156137f3578081fd5b612a3f82613699565b6000806040838503121561380e578081fd5b61381783613699565b915061382560208401613699565b90509250929050565b600080600060608486031215613842578081fd5b61384b84613699565b925061385960208501613699565b9150604084013590509250925092565b6000806000806080858703121561387e578081fd5b61388785613699565b935061389560208601613699565b92506040850135915060608501356001600160401b038111156138b6578182fd5b6138c287828801613736565b91505092959194509250565b600080604083850312156138e0578182fd5b6138e983613699565b9150602083013580151581146138fd578182fd5b809150509250929050565b6000806040838503121561391a578182fd5b61392383613699565b946020939093013593505050565b60008060008060408587031215613946578182fd5b84356001600160401b038082111561395c578384fd5b613968888389016136b5565b90965094506020870135915080821115613980578384fd5b5061398d878288016136b5565b95989497509550505050565b6000806000604084860312156139ad578081fd5b8335925060208401356001600160401b038111156139c9578182fd5b6139d5868287016136b5565b9497909650939450505050565b6000602082840312156139f3578081fd5b8135612a3f81614266565b600060208284031215613a0f578081fd5b8151612a3f81614266565b60008060208385031215613a2c578182fd5b82356001600160401b03811115613a41578283fd5b613a4d858286016136f7565b90969095509350505050565b600080600080600060808688031215613a70578283fd5b85356001600160401b0380821115613a86578485fd5b613a9289838a016136f7565b9097509550859150613aa660208901613699565b9450604088013593506060880135915080821115613ac2578283fd5b50613acf88828901613736565b9150509295509295909350565b6000806000806000806000806000806101408b8d031215613afb578788fd5b8a356001600160401b0380821115613b1157898afd5b613b1d8e838f01613736565b9b5060208d0135915080821115613b3257898afd5b613b3e8e838f01613736565b9a5060408d0135915080821115613b5357898afd5b50613b608d828e01613736565b98505060608b0135965060808b0135955060a08b01359450613b8460c08c016137cb565b935060e08b01359250613b9a6101008c01613699565b9150613ba96101208c01613699565b90509295989b9194979a5092959850565b600060208284031215613bcb578081fd5b5035919050565b600060208284031215613be3578081fd5b5051919050565b60008060408385031215613bfc578182fd5b8235915061382560208401613699565b60008060408385031215613c1e578182fd5b823591506020808401356001600160401b0380821115613c3c578384fd5b818601915086601f830112613c4f578384fd5b813581811115613c6157613c61614250565b8060051b9150613c72848301614083565b8181528481019084860184860187018b1015613c8c578788fd5b8795505b83861015613cae578035835260019590950194918601918601613c90565b508096505050505050509250929050565b600080600080600060608688031215613cd6578283fd5b8535945060208601356001600160401b0380821115613cf3578485fd5b613cff89838a016136f7565b90965094506040880135915080821115613d17578283fd5b50613d24888289016136f7565b969995985093965092949392505050565b600080600080600060808688031215613d4c578283fd5b85359450602086013593506040860135925060608601356001600160401b03811115613d76578182fd5b613d24888289016136b5565b600060208284031215613d93578081fd5b612a3f826137b7565b600080600060408486031215613db0578081fd5b613db9846137b7565b925060208401356001600160401b038111156139c9578182fd5b60008060008060008060c08789031215613deb578384fd5b613df4876137b7565b9550613e02602088016137a0565b9450613e10604088016137a0565b9350613e1e606088016137cb565b9250613e2c608088016137cb565b915060a087013590509295509295509295565b60008151808452613e5781602086016020860161417d565b601f01601f19169290920160200192915050565b60008351613e7d81846020880161417d565b835190830190613e9181836020880161417d565b64173539b7b760d91b9101908152600501949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613edd90830184613e3f565b9695505050505050565b60808152846080820152848660a0830137600060a08683018101919091526001600160a01b0394851660208301529290931660408401526060830152601f909201601f19160101919050565b602081526000612a3f6020830184613e3f565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b8481526000602085818401526080604084015281855483600182811c915080831680613ff357607f831692505b85831081141561401157634e487b7160e01b87526022600452602487fd5b6080880183905260a0880181801561403057600181146140415761406b565b60ff1986168252878201965061406b565b60008c815260209020895b868110156140655781548482015290850190890161404c565b83019750505b50505050861515606087015250909250611155915050565b604051601f8201601f191681016001600160401b03811182821017156140ab576140ab614250565b604052919050565b600082198211156140c6576140c6614224565b500190565b60006001600160801b03808416806140e5576140e561423a565b92169190910492915050565b6000826141005761410061423a565b500490565b60006001600160401b03808416806140e5576140e561423a565b600081600019048311821515161561413957614139614224565b500290565b60006001600160801b038381169083168181101561415e5761415e614224565b039392505050565b60008282101561417857614178614224565b500390565b60005b83811015614198578181015183820152602001614180565b838111156113715750506000910152565b6000816141b8576141b8614224565b506000190190565b600181811c908216806141d457607f821691505b6020821081141561197c57634e487b7160e01b600052602260045260246000fd5b600060001982141561420957614209614224565b5060010190565b60008261421f5761421f61423a565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b0319811681146123fe57600080fdfea26469706673582212206a0cfed42674a7a28ab1fb5178239e37d044582bd15103505e58f2fd79f4615564736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
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.