Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ChillTuna
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* _,.----. ,--.-,,-,--, .=-.-. ,--.--------. .-._ ,---. .' .' - \/==/ /|=| |/==/_ / _.-. _.-. /==/, - , -\.--.-. .-.-./==/ \ .-._.--.' \ /==/ , ,-'|==|_ ||=|, |==|, |.-,.'| .-,.'| \==\.-. - ,-./==/ -|/=/ ||==|, \/ /, |==\-/\ \ |==|- | .|==| ,|/=| _|==| |==|, | |==|, | `--`\==\- \ |==| ,||=| -||==|- \| |/==/-|_\ | |==|_ `-' \==|- `-' _ |==|- |==|- | |==|- | \==\_ \ |==|- | =/ ||==| , | -|\==\, - \ |==| _ , |==| _ |==| ,|==|, | |==|, | |==|- | |==|, \/ - ||==| - _ |/==/ - ,| \==\. /==| .-. ,\==|- |==|- `-._|==|- `-._ |==|, | |==|- , /|==| /\ , /==/- /\ - \ `-.`.___.-'/==/, //=/ /==/. /==/ - , ,/==/ - , ,/ /==/ -/ /==/ , _ .' /==/, | |- \==\ _.\=\.-' `--`-' `-`--`--`-``--`-----'`--`-----' `--`--` `--`..---' `--`./ `--``--` */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import 'erc721a-upgradeable/contracts/ERC721AUpgradeable.sol'; import 'erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/cryptography/MerkleProofUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol'; import {DefaultOperatorFiltererUpgradeable} from './operator-filter-registry/upgradeable/DefaultOperatorFiltererUpgradeable.sol'; contract ChillTuna is ERC721AUpgradeable, ERC721AQueryableUpgradeable, DefaultOperatorFiltererUpgradeable, OwnableUpgradeable, ReentrancyGuardUpgradeable { using ECDSAUpgradeable for bytes32; uint256 public constant MAX_SUPPLY = 5000; string public baseURI; uint256 public ogSupply; uint256 public wlSupply; uint256 public mintPrice; uint256 public wlMintPrice; uint256 public ogMintPrice; struct IsMintLive { bool og; bool koiplus; bool wl; bool pub; } struct MerkleTreeRoot { bytes32 og; bytes32 koiplus; bytes32 wl; } IsMintLive public isMintLive; uint256 public maxTxOg; uint256 public maxTxWl; uint256 public maxTxPub; MerkleTreeRoot private merkleTreeRoot; address private signerAddress; mapping(address => uint256) public ogMintBalance; mapping(address => uint256) public wlMintBalance; mapping(address => uint256) public mintBalance; function initialize(address _signer) initializerERC721A initializer public { __ERC721A_init('ChillTuna', 'CHILLTUNA'); __Ownable_init(); __DefaultOperatorFilterer_init(); signerAddress = _signer; ogSupply = 777; wlSupply = 2500; ogMintPrice = 0.025 ether; wlMintPrice = 0.03 ether; mintPrice = 0.035 ether; maxTxOg = 1; maxTxWl = 2; maxTxPub = 2; } function mint(uint256 quantity, bytes32 hash, bytes calldata signature) external payable nonReentrant { require(isMintLive.pub, "Mint not live"); require(quantity > 0, "Mint atleast 1"); require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds total supply"); require(quantity <= maxTxPub, "Exceeds max per transaction"); uint256 mintCount = mintBalance[_msgSender()]; require(mintCount + quantity <= maxTxPub, "Exceeds max per wallet"); require(msg.value >= mintPrice * quantity, "Not enough ETH"); require(hash == keccak256(abi.encodePacked(msg.sender, "allow", address(this))), "Invalid hash"); require(_verify(hash, signature), "Invalid data signature"); _mint(_msgSender(), quantity); mintBalance[_msgSender()] += quantity; } function ogMint(uint256 quantity, bytes32[] memory _proof) external payable nonReentrant { require(isMintLive.og, "Mint not live"); require(quantity > 0, "Mint atleast 1"); require(totalSupply() + quantity <= ogSupply, "Exceeds OG supply"); require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds total supply"); require(quantity <= maxTxOg, "Exceeds max per transaction"); uint256 mintCount = ogMintBalance[_msgSender()]; require(mintCount + quantity <= maxTxOg, "Exceeds max per wallet"); require(msg.value >= ogMintPrice * quantity, "Not enough ETH"); require( MerkleProofUpgradeable.verify(_proof, merkleTreeRoot.og, keccak256(abi.encodePacked(_msgSender()))), "Not eligible for OG mint." ); _mint(_msgSender(), quantity); ogMintBalance[_msgSender()] += quantity; } function wlMint(uint256 quantity, bytes32[] memory _proof) external payable nonReentrant { require((isMintLive.koiplus || isMintLive.wl), "Mint not live"); require(quantity > 0, "Mint atleast 1"); require(totalSupply() + quantity <= wlSupply, "Exceeds WL supply"); require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds total supply"); require(quantity <= maxTxWl, "Exceeds max per transaction"); uint256 mintCount = wlMintBalance[_msgSender()]; require(mintCount + quantity <= maxTxWl, "Exceeds max per wallet"); require(msg.value >= wlMintPrice * quantity, "Not enough ETH"); require( MerkleProofUpgradeable.verify(_proof, merkleTreeRoot.koiplus, keccak256(abi.encodePacked(_msgSender()))) || MerkleProofUpgradeable.verify(_proof, merkleTreeRoot.wl, keccak256(abi.encodePacked(_msgSender()))), "Not eligible for whitelist mint." ); _mint(_msgSender(), quantity); wlMintBalance[_msgSender()] += quantity; } function giveaway(address to, uint256 quantity) external onlyOwner { require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds total supply"); _mint(to, quantity); } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function setMintPrice(uint256 _mintPrice) external onlyOwner { mintPrice = _mintPrice; } function setOgMintPrice(uint256 _mintPrice) external onlyOwner { ogMintPrice = _mintPrice; } function setWlMintPrice(uint256 _mintPrice) external onlyOwner { wlMintPrice = _mintPrice; } function setIsMintLive(IsMintLive memory _isMintLive) external onlyOwner { isMintLive = _isMintLive; } function setOgSupply(uint256 _supply) external onlyOwner { ogSupply = _supply; } function setWlSupply(uint256 _supply) external onlyOwner { wlSupply = _supply; } function setMaxTxOg(uint256 _maxTx) external onlyOwner { maxTxOg = _maxTx; } function setMaxTxWl(uint256 _maxTx) external onlyOwner { maxTxWl = _maxTx; } function setMaxTxPub(uint256 _maxTx) external onlyOwner { maxTxPub = _maxTx; } function setBaseURI(string memory _newBaseURI) external onlyOwner { baseURI = _newBaseURI; } function setMerkleTreeRoot(MerkleTreeRoot memory _merkleTreeRoot) external onlyOwner { merkleTreeRoot = _merkleTreeRoot; } function updateSignerAddress(address _signer) external onlyOwner { signerAddress = _signer; } function _verify(bytes32 data, bytes memory signature) internal view returns (bool) { return data .toEthSignedMessageHash() .recover(signature) == signerAddress; } function transferFrom(address from, address to, uint256 tokenId) public override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function withdraw() external onlyOwner { (bool success, ) = payable(0xE5BC04fB8B4cD138d39B76227E9DAD8785b95f45).call{value: address(this).balance}(""); require(success, "Withdraw Failed"); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AUpgradeable.sol'; import {ERC721AStorage} from './ERC721AStorage.sol'; import './ERC721A__Initializable.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721ReceiverUpgradeable { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable { using ERC721AStorage for ERC721AStorage.Layout; // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // CONSTRUCTOR // ============================================================= function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A { __ERC721A_init_unchained(name_, symbol_); } function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A { ERC721AStorage.layout()._name = name_; ERC721AStorage.layout()._symbol = symbol_; ERC721AStorage.layout()._currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return ERC721AStorage.layout()._currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return ERC721AStorage.layout()._currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return ERC721AStorage.layout()._burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary 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 virtual { uint256 packed = ERC721AStorage.layout()._packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); ERC721AStorage.layout()._packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return ERC721AStorage.layout()._name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return ERC721AStorage.layout()._symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ 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, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(ERC721AStorage.layout()._packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (ERC721AStorage.layout()._packedOwnerships[index] == 0) { ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < ERC721AStorage.layout()._currentIndex) { uint256 packed = ERC721AStorage.layout()._packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = ERC721AStorage.layout()._packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } ERC721AStorage.layout()._tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return ERC721AStorage.layout()._tokenApprovals[tokenId].value; } /** * @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) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); ERC721AStorage.layout()._operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return ERC721AStorage.layout()._operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < ERC721AStorage.layout()._currentIndex && // If within bounds, ERC721AStorage.layout()._packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // We can directly increment and decrement the balances. --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`. ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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 {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (bytes4 retval) { return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @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 for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); ERC721AStorage.layout()._currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); ERC721AStorage.layout()._currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, 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. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = ERC721AStorage.layout()._currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (ERC721AStorage.layout()._currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. ERC721AStorage.layout()._packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { ERC721AStorage.layout()._burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = ERC721AStorage.layout()._packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); ERC721AStorage.layout()._packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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 _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryableUpgradeable.sol'; import '../ERC721AUpgradeable.sol'; import '../ERC721A__Initializable.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryableUpgradeable is ERC721A__Initializable, ERC721AUpgradeable, IERC721AQueryableUpgradeable { function __ERC721AQueryable_init() internal onlyInitializingERC721A { __ERC721AQueryable_init_unchained(); } function __ERC721AQueryable_init_unchained() internal onlyInitializingERC721A {} /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library 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 Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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. /// @solidity memory-safe-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. /// @solidity memory-safe-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.13; import {OperatorFiltererUpgradeable} from "./OperatorFiltererUpgradeable.sol"; abstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); function __DefaultOperatorFilterer_init() internal onlyInitializing { OperatorFiltererUpgradeable.__OperatorFilterer_init(DEFAULT_SUBSCRIPTION, true); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721AUpgradeable { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @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, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ERC721AStorage { // Reference type for token approval. struct TokenApprovalRef { address value; } struct Layout { // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 _currentIndex; // The number of tokens burned. uint256 _burnCounter; // Token name string _name; // Token symbol string _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) _operatorApprovals; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable diamond facet 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. */ import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol'; abstract contract ERC721A__Initializable { using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializerERC721A() { // 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( ERC721A__InitializableStorage.layout()._initializing ? _isConstructor() : !ERC721A__InitializableStorage.layout()._initialized, 'ERC721A__Initializable: contract is already initialized' ); bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = true; ERC721A__InitializableStorage.layout()._initialized = true; } _; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._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 onlyInitializingERC721A() { require( ERC721A__InitializableStorage.layout()._initializing, 'ERC721A__Initializable: contract is not initializing' ); _; } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base storage for the initialization function for upgradeable diamond facet contracts **/ library ERC721A__InitializableStorage { struct Layout { /* * Indicates that the contract has been initialized. */ bool _initialized; /* * Indicates that the contract is in the process of being initialized. */ bool _initializing; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721AUpgradeable.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryableUpgradeable is IERC721AUpgradeable { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "../IOperatorFilterRegistry.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; abstract contract OperatorFiltererUpgradeable is Initializable { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe) internal onlyInitializing { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isRegistered(address(this))) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if ( !( operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender) && operatorFilterRegistry.isOperatorAllowed(address(this), from) ) ) { revert OperatorNotAllowed(msg.sender); } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"giveaway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":[],"name":"isMintLive","outputs":[{"internalType":"bool","name":"og","type":"bool"},{"internalType":"bool","name":"koiplus","type":"bool"},{"internalType":"bool","name":"wl","type":"bool"},{"internalType":"bool","name":"pub","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTxOg","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTxPub","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTxWl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","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":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"ogMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ogMintBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogSupply","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"og","type":"bool"},{"internalType":"bool","name":"koiplus","type":"bool"},{"internalType":"bool","name":"wl","type":"bool"},{"internalType":"bool","name":"pub","type":"bool"}],"internalType":"struct ChillTuna.IsMintLive","name":"_isMintLive","type":"tuple"}],"name":"setIsMintLive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTx","type":"uint256"}],"name":"setMaxTxOg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTx","type":"uint256"}],"name":"setMaxTxPub","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTx","type":"uint256"}],"name":"setMaxTxWl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"og","type":"bytes32"},{"internalType":"bytes32","name":"koiplus","type":"bytes32"},{"internalType":"bytes32","name":"wl","type":"bytes32"}],"internalType":"struct ChillTuna.MerkleTreeRoot","name":"_merkleTreeRoot","type":"tuple"}],"name":"setMerkleTreeRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"setOgMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setOgSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"setWlMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setWlSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"updateSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"wlMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wlMintBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061468a806100206000396000f3fe60806040526004361061034a5760003560e01c80636c0360eb116101bb578063ab59e976116100f7578063c87b56dd11610095578063e985e9c51161006f578063e985e9c514610976578063f2fde38b146109de578063f4a0a528146109fe578063fdfc7aae14610a1e57600080fd5b8063c87b56dd14610909578063d23b588014610929578063d88cc3ff1461094957600080fd5b8063b88d4fde116100d1578063b88d4fde14610886578063bd4ca9a2146108a6578063c23dc68f146108bc578063c4d66de8146108e957600080fd5b8063ab59e97614610830578063ae5b7a7d14610850578063b824ca881461086657600080fd5b80638fa2a9f0116101645780639ab475b51161013e5780639ab475b5146107d15780639d1f1c47146107e45780639e19f27b146107fa578063a22cb4651461081057600080fd5b80638fa2a9f01461077c57806395d89b411461079c57806399a2557a146107b157600080fd5b80638462151c116101955780638462151c1461071157806387e6da9d1461073e5780638da5cb5b1461075e57600080fd5b80636c0360eb146106c757806370a08231146106dc578063715018a6146106fc57600080fd5b806335dd3b1e1161028a5780634781d295116102335780635bbb21771161020d5780635bbb2177146106445780635fe48df1146106715780636352211e146106915780636817c76c146106b157600080fd5b80634781d295146105d75780634e286614146105f757806355f804b31461062457600080fd5b80633d272294116102645780633d272294146105845780633ef0d36d146105a457806342842e0e146105b757600080fd5b806335dd3b1e1461052f5780633abe82ee1461054f5780633ccfd60b1461056f57600080fd5b8063095ea7b3116102f757806323b872dd116102d157806323b872dd146104d05780632b314dc6146104f05780632c4e9fc61461050357806332cb6b0c1461051957600080fd5b8063095ea7b3146104515780630fe8418b1461047157806318160ddd1461048757600080fd5b806306fdde031161032857806306fdde03146103ca57806307fc1f23146103ec578063081812fc1461041957600080fd5b8063013c1ceb1461034f57806301ffc9a714610378578063050225ea146103a8575b600080fd5b34801561035b57600080fd5b50610365609e5481565b6040519081526020015b60405180910390f35b34801561038457600080fd5b50610398610393366004613df4565b610a7e565b604051901515815260200161036f565b3480156103b457600080fd5b506103c86103c3366004613e2d565b610b1b565b005b3480156103d657600080fd5b506103df610bc2565b60405161036f9190613eaf565b3480156103f857600080fd5b50610365610407366004613ec2565b60a66020526000908152604090205481565b34801561042557600080fd5b50610439610434366004613edd565b610c64565b6040516001600160a01b03909116815260200161036f565b34801561045d57600080fd5b506103c861046c366004613e2d565b610ce0565b34801561047d57600080fd5b5061036560995481565b34801561049357600080fd5b507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614635833981519152540360001901610365565b3480156104dc57600080fd5b506103c86104eb366004613ef6565b610e01565b6103c86104fe366004613f79565b610f5d565b34801561050f57600080fd5b50610365609b5481565b34801561052557600080fd5b5061036561138881565b34801561053b57600080fd5b506103c861054a366004613edd565b61134d565b34801561055b57600080fd5b506103c861056a366004613edd565b61135a565b34801561057b57600080fd5b506103c8611367565b34801561059057600080fd5b506103c861059f366004613edd565b61141e565b6103c86105b2366004613f79565b61142b565b3480156105c357600080fd5b506103c86105d2366004613ef6565b6117cd565b3480156105e357600080fd5b506103c86105f236600461402b565b61191e565b34801561060357600080fd5b50610365610612366004613ec2565b60a56020526000908152604090205481565b34801561063057600080fd5b506103c861063f3660046140df565b61193c565b34801561065057600080fd5b5061066461065f366004614128565b611957565b60405161036f919061419d565b34801561067d57600080fd5b506103c861068c366004613edd565b611a23565b34801561069d57600080fd5b506104396106ac366004613edd565b611a30565b3480156106bd57600080fd5b50610365609a5481565b3480156106d357600080fd5b506103df611a3b565b3480156106e857600080fd5b506103656106f7366004613ec2565b611ac9565b34801561070857600080fd5b506103c8611b50565b34801561071d57600080fd5b5061073161072c366004613ec2565b611b64565b60405161036f919061421a565b34801561074a57600080fd5b506103c8610759366004613edd565b611c68565b34801561076a57600080fd5b506033546001600160a01b0316610439565b34801561078857600080fd5b506103c8610797366004613ec2565b611c75565b3480156107a857600080fd5b506103df611cac565b3480156107bd57600080fd5b506107316107cc366004614252565b611ccb565b6103c86107df366004614285565b611e79565b3480156107f057600080fd5b50610365609c5481565b34801561080657600080fd5b50610365609f5481565b34801561081c57600080fd5b506103c861082b366004614313565b61226b565b34801561083c57600080fd5b506103c861084b36600461434a565b612338565b34801561085c57600080fd5b5061036560985481565b34801561087257600080fd5b506103c8610881366004613edd565b6123a5565b34801561089257600080fd5b506103c86108a13660046143cf565b6123b2565b3480156108b257600080fd5b5061036560a05481565b3480156108c857600080fd5b506108dc6108d7366004613edd565b612511565b60405161036f919061444b565b3480156108f557600080fd5b506103c8610904366004613ec2565b6125a6565b34801561091557600080fd5b506103df610924366004613edd565b612907565b34801561093557600080fd5b506103c8610944366004613edd565b6129a3565b34801561095557600080fd5b50610365610964366004613ec2565b60a76020526000908152604090205481565b34801561098257600080fd5b50610398610991366004614490565b6001600160a01b0391821660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832093909416825291909152205460ff1690565b3480156109ea57600080fd5b506103c86109f9366004613ec2565b6129b0565b348015610a0a57600080fd5b506103c8610a19366004613edd565b612a3d565b348015610a2a57600080fd5b50609d54610a549060ff808216916101008104821691620100008204811691630100000090041684565b6040805194151585529215156020850152901515918301919091521515606082015260800161036f565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610ae157507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610b1557507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b610b23612a4a565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614635833981519152546113889183910360001901610b6a91906144d9565b1115610bb45760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b60448201526064015b60405180910390fd5b610bbe8282612aa4565b5050565b60606000805160206146358339815191526002018054610be1906144f1565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0d906144f1565b8015610c5a5780601f10610c2f57610100808354040283529160200191610c5a565b820191906000526020600020905b815481529060010190602001808311610c3d57829003601f168201915b5050505050905090565b6000610c6f82612c32565b610ca5576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610ceb82611a30565b9050336001600160a01b03821614610d79576001600160a01b03811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16610d79576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b826daaeb6d7670e522a718067333cd4e3b15610f4c57336001600160a01b03821603610e3757610e32848484612c93565b610f57565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610e86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaa919061452b565b8015610f2d5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2d919061452b565b610f4c57604051633b79c77360e21b8152336004820152602401610bab565b610f57848484612c93565b50505050565b600260655403610faf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bab565b6002606555609d5460ff16610ff65760405162461bcd60e51b815260206004820152600d60248201526c4d696e74206e6f74206c69766560981b6044820152606401610bab565b600082116110375760405162461bcd60e51b815260206004820152600e60248201526d4d696e742061746c65617374203160901b6044820152606401610bab565b6098547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460008051602061463583398151915254849190036000190161107e91906144d9565b11156110cc5760405162461bcd60e51b815260206004820152601160248201527f45786365656473204f4720737570706c790000000000000000000000000000006044820152606401610bab565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460008051602061463583398151915254611388918491036000190161111391906144d9565b11156111585760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b6044820152606401610bab565b609e548211156111aa5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610bab565b33600090815260a56020526040902054609e546111c784836144d9565b11156112155760405162461bcd60e51b815260206004820152601660248201527f45786365656473206d6178207065722077616c6c6574000000000000000000006044820152606401610bab565b82609c546112239190614548565b3410156112635760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610bab565b60a1546112b1908390335b604051602001611296919060609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120612f5c565b6112fd5760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656c696769626c6520666f72204f47206d696e742e000000000000006044820152606401610bab565b611308335b84612aa4565b8260a56000335b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461133e91906144d9565b90915550506001606555505050565b611355612a4a565b60a055565b611362612a4a565b609955565b61136f612a4a565b60405160009073e5bc04fb8b4cd138d39b76227e9dad8785b95f459047908381818185875af1925050503d80600081146113c5576040519150601f19603f3d011682016040523d82523d6000602084013e6113ca565b606091505b505090508061141b5760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177204661696c656400000000000000000000000000000000006044820152606401610bab565b50565b611426612a4a565b609b55565b60026065540361147d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bab565b6002606555609d54610100900460ff16806114a05750609d5462010000900460ff165b6114dc5760405162461bcd60e51b815260206004820152600d60248201526c4d696e74206e6f74206c69766560981b6044820152606401610bab565b6000821161151d5760405162461bcd60e51b815260206004820152600e60248201526d4d696e742061746c65617374203160901b6044820152606401610bab565b6099547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460008051602061463583398151915254849190036000190161156491906144d9565b11156115b25760405162461bcd60e51b815260206004820152601160248201527f4578636565647320574c20737570706c790000000000000000000000000000006044820152606401610bab565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41546000805160206146358339815191525461138891849103600019016115f991906144d9565b111561163e5760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b6044820152606401610bab565b609f548211156116905760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610bab565b33600090815260a66020526040902054609f546116ad84836144d9565b11156116fb5760405162461bcd60e51b815260206004820152601660248201527f45786365656473206d6178207065722077616c6c6574000000000000000000006044820152606401610bab565b82609b546117099190614548565b3410156117495760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610bab565b60a2546117589083903361126e565b8061176d575060a35461176d9083903361126e565b6117b95760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656c696769626c6520666f722077686974656c697374206d696e742e6044820152606401610bab565b6117c233611302565b8260a660003361130f565b826daaeb6d7670e522a718067333cd4e3b1561191357336001600160a01b038216036117fe57610e32848484612f72565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561184d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611871919061452b565b80156118f45750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156118d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f4919061452b565b61191357604051633b79c77360e21b8152336004820152602401610bab565b610f57848484612f72565b611926612a4a565b805160a155602081015160a2556040015160a355565b611944612a4a565b8051610bbe906097906020840190613d45565b60608160008167ffffffffffffffff81111561197557611975613f32565b6040519080825280602002602001820160405280156119c757816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816119935790505b50905060005b828114611a1a576119f58686838181106119e9576119e9614567565b90506020020135612511565b828281518110611a0757611a07614567565b60209081029190910101526001016119cd565b50949350505050565b611a2b612a4a565b609e55565b6000610b1582612f8d565b60978054611a48906144f1565b80601f0160208091040260200160405190810160405280929190818152602001828054611a74906144f1565b8015611ac15780601f10611a9657610100808354040283529160200191611ac1565b820191906000526020600020905b815481529060010190602001808311611aa457829003601f168201915b505050505081565b60006001600160a01b038216611b0b576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45602052604090205467ffffffffffffffff1690565b611b58612a4a565b611b626000613060565b565b60606000806000611b7485611ac9565b905060008167ffffffffffffffff811115611b9157611b91613f32565b604051908082528060200260200182016040528015611bba578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b838614611c5c57611bf5816130bf565b91508160400151611c545781516001600160a01b031615611c1557815194505b876001600160a01b0316856001600160a01b031603611c545780838780600101985081518110611c4757611c47614567565b6020026020010181815250505b600101611be5565b50909695505050505050565b611c70612a4a565b609855565b611c7d612a4a565b60a4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60606000805160206146358339815191526003018054610be1906144f1565b6060818310611d06576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611d1f6000805160206146358339815191525490565b90506001851015611d2f57600194505b80841115611d3b578093505b6000611d4687611ac9565b905084861015611d655785850381811015611d5f578091505b50611d69565b5060005b60008167ffffffffffffffff811115611d8457611d84613f32565b604051908082528060200260200182016040528015611dad578160200160208202803683370190505b50905081600003611dc3579350611e7292505050565b6000611dce88612511565b905060008160400151611ddf575080515b885b888114158015611df15750848714155b15611e6657611dff816130bf565b92508260400151611e5e5782516001600160a01b031615611e1f57825191505b8a6001600160a01b0316826001600160a01b031603611e5e5780848880600101995081518110611e5157611e51614567565b6020026020010181815250505b600101611de1565b50505092835250909150505b9392505050565b600260655403611ecb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bab565b6002606555609d546301000000900460ff16611f195760405162461bcd60e51b815260206004820152600d60248201526c4d696e74206e6f74206c69766560981b6044820152606401610bab565b60008411611f5a5760405162461bcd60e51b815260206004820152600e60248201526d4d696e742061746c65617374203160901b6044820152606401610bab565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614635833981519152546113889186910360001901611fa191906144d9565b1115611fe65760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b6044820152606401610bab565b60a0548411156120385760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610bab565b33600090815260a7602052604090205460a05461205586836144d9565b11156120a35760405162461bcd60e51b815260206004820152601660248201527f45786365656473206d6178207065722077616c6c6574000000000000000000006044820152606401610bab565b84609a546120b19190614548565b3410156120f15760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610bab565b6040516bffffffffffffffffffffffff1933606090811b821660208401527f616c6c6f77000000000000000000000000000000000000000000000000000000603484015230901b166039820152604d016040516020818303038152906040528051906020012084146121a55760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206861736800000000000000000000000000000000000000006044820152606401610bab565b6121e58484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061315092505050565b6122315760405162461bcd60e51b815260206004820152601660248201527f496e76616c69642064617461207369676e6174757265000000000000000000006044820152606401610bab565b61223b3386612aa4565b33600090815260a760205260408120805487929061225a9084906144d9565b909155505060016065555050505050565b336001600160a01b038316036122ad576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612340612a4a565b8051609d80546020840151604085015160609095015161ffff1990921693151561ff00191693909317610100931515939093029290921763ffff00001916620100009315159390930263ff000000191692909217630100000091151591909102179055565b6123ad612a4a565b609c55565b836daaeb6d7670e522a718067333cd4e3b156124fe57336001600160a01b038216036123e9576123e4858585856131d1565b61250a565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245c919061452b565b80156124df5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156124bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124df919061452b565b6124fe57604051633b79c77360e21b8152336004820152602401610bab565b61250a858585856131d1565b5050505050565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806125775750600080516020614635833981519152548310155b156125825792915050565b61258b836130bf565b905080604001511561259d5792915050565b611e7283613215565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166125ff577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f5460ff1615612603565b303b155b6126755760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610bab565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff161580156126d5577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ffff19166101011790555b600054610100900460ff16158080156126f55750600054600160ff909116105b8061270f5750303b15801561270f575060005460ff166001145b6127815760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bab565b6000805460ff1916600117905580156127a4576000805461ff0019166101001790555b6128186040518060400160405280600981526020017f4368696c6c54756e6100000000000000000000000000000000000000000000008152506040518060400160405280600981526020017f4348494c4c54554e41000000000000000000000000000000000000000000000081525061328d565b612820613333565b6128286133a6565b60a4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385161790556103096098556109c46099556658d15e17628000609c55666a94d74f430000609b55667c585087238000609a556001609e556002609f81905560a05580156128d2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015610bbe5750507fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ff0019169055565b606061291282612c32565b612948576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612952613430565b905080516000036129725760405180602001604052806000815250611e72565b8061297c8461343f565b60405160200161298d92919061457d565b6040516020818303038152906040529392505050565b6129ab612a4a565b609f55565b6129b8612a4a565b6001600160a01b038116612a345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bab565b61141b81613060565b612a45612a4a565b609a55565b6033546001600160a01b03163314611b625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bab565b600080516020614635833981519152546000829003612aef576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c456020908152604080832080546801000000000000000188020190558483527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612bdc57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612ba4565b5081600003612c17576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805160206146358339815191525550505050565b505050565b600081600111158015612c5357506000805160206146358339815191525482105b8015610b1557505060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054600160e01b161590565b6000612c9e82612f8d565b9050836001600160a01b0316816001600160a01b031614612ceb576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604090208054338082146001600160a01b03881690911417612dac576001600160a01b03861660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16612dac576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516612dec576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015612df757600082555b6001600160a01b0386811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b1760008581527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040812091909155600160e11b84169003612f12576001840160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260408120549003612f1057600080516020614635833981519152548114612f105760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600082612f69858461348e565b14949350505050565b612c2d838383604051806020016040528060008152506123b2565b6000818060011161302e576000805160206146358339815191525481101561302e5760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604081205490600160e01b8216900361302c575b80600003611e7257506000190160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054612fec565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152610b1560008051602061463583398151915260008481526004919091016020526040902054604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60a4546000906001600160a01b03166131c0836131ba866040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b906134db565b6001600160a01b0316149392505050565b6131dc848484610e01565b6001600160a01b0383163b15610f57576131f8848484846134f7565b610f57576040516368d2bf6b60e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152610b1561324583612f8d565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166133295760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610bab565b610bbe82826135e3565b600054610100900460ff1661339e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b611b626136fb565b600054610100900460ff166134115760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b611b62733cc6cdda760b79bafa08df41ecfa224f810dceb6600161376f565b606060978054610be1906144f1565b604080516080810191829052607f0190826030600a8206018353600a90045b801561347c57600183039250600a81066030018353600a900461345e565b50819003601f19909101908152919050565b600081815b84518110156134d3576134bf828683815181106134b2576134b2614567565b60200260200101516139b6565b9150806134cb816145ac565b915050613493565b509392505050565b60008060006134ea85856139e2565b915091506134d381613a50565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061352c9033908990889088906004016145c5565b6020604051808303816000875af1925050508015613567575060408051601f3d908101601f1916820190925261356491810190614601565b60015b6135c5573d808015613595576040519150601f19603f3d011682016040523d82523d6000602084013e61359a565b606091505b5080516000036135bd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff1661367f5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610bab565b81516136b1907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c42906020850190613d45565b5080516136e4907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c43906020840190613d45565b506001600080516020614635833981519152555050565b600054610100900460ff166137665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b611b6233613060565b600054610100900460ff166137da5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b6daaeb6d7670e522a718067333cd4e3b15610bbe576040517fc3c5a5470000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af1158015613853573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613877919061452b565b610bbe578015613904576040517f7d3e3dbe0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156138f057600080fd5b505af1158015612f54573d6000803e3d6000fd5b6001600160a01b0382161561396c576040517fa0af29030000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016138d6565b6040517f4420e4860000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024016138d6565b60008183106139d2576000828152602084905260409020611e72565b5060009182526020526040902090565b6000808251604103613a185760208301516040840151606085015160001a613a0c87828585613c06565b94509450505050613a49565b8251604003613a415760208301516040840151613a36868383613cf3565b935093505050613a49565b506000905060025b9250929050565b6000816004811115613a6457613a6461461e565b03613a6c5750565b6001816004811115613a8057613a8061461e565b03613acd5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bab565b6002816004811115613ae157613ae161461e565b03613b2e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bab565b6003816004811115613b4257613b4261461e565b03613b9a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610bab565b6004816004811115613bae57613bae61461e565b0361141b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610bab565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613c3d5750600090506003613cea565b8460ff16601b14158015613c5557508460ff16601c14155b15613c665750600090506004613cea565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613cba573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613ce357600060019250925050613cea565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681613d2960ff86901c601b6144d9565b9050613d3787828885613c06565b935093505050935093915050565b828054613d51906144f1565b90600052602060002090601f016020900481019282613d735760008555613db9565b82601f10613d8c57805160ff1916838001178555613db9565b82800160010185558215613db9579182015b82811115613db9578251825591602001919060010190613d9e565b50613dc5929150613dc9565b5090565b5b80821115613dc55760008155600101613dca565b6001600160e01b03198116811461141b57600080fd5b600060208284031215613e0657600080fd5b8135611e7281613dde565b80356001600160a01b0381168114613e2857600080fd5b919050565b60008060408385031215613e4057600080fd5b613e4983613e11565b946020939093013593505050565b60005b83811015613e72578181015183820152602001613e5a565b83811115610f575750506000910152565b60008151808452613e9b816020860160208601613e57565b601f01601f19169290920160200192915050565b602081526000611e726020830184613e83565b600060208284031215613ed457600080fd5b611e7282613e11565b600060208284031215613eef57600080fd5b5035919050565b600080600060608486031215613f0b57600080fd5b613f1484613e11565b9250613f2260208501613e11565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f7157613f71613f32565b604052919050565b60008060408385031215613f8c57600080fd5b8235915060208084013567ffffffffffffffff80821115613fac57600080fd5b818601915086601f830112613fc057600080fd5b813581811115613fd257613fd2613f32565b8060051b9150613fe3848301613f48565b8181529183018401918481019089841115613ffd57600080fd5b938501935b8385101561401b57843582529385019390850190614002565b8096505050505050509250929050565b60006060828403121561403d57600080fd5b6040516060810181811067ffffffffffffffff8211171561406057614060613f32565b80604052508235815260208301356020820152604083013560408201528091505092915050565b600067ffffffffffffffff8311156140a1576140a1613f32565b6140b4601f8401601f1916602001613f48565b90508281528383830111156140c857600080fd5b828260208301376000602084830101529392505050565b6000602082840312156140f157600080fd5b813567ffffffffffffffff81111561410857600080fd5b8201601f8101841361411957600080fd5b6135db84823560208401614087565b6000806020838503121561413b57600080fd5b823567ffffffffffffffff8082111561415357600080fd5b818501915085601f83011261416757600080fd5b81358181111561417657600080fd5b8660208260051b850101111561418b57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611c5c576142078385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b92840192608092909201916001016141b9565b6020808252825182820181905260009190848201906040850190845b81811015611c5c57835183529284019291840191600101614236565b60008060006060848603121561426757600080fd5b61427084613e11565b95602085013595506040909401359392505050565b6000806000806060858703121561429b57600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156142c157600080fd5b818701915087601f8301126142d557600080fd5b8135818111156142e457600080fd5b8860208285010111156142f657600080fd5b95989497505060200194505050565b801515811461141b57600080fd5b6000806040838503121561432657600080fd5b61432f83613e11565b9150602083013561433f81614305565b809150509250929050565b60006080828403121561435c57600080fd5b6040516080810181811067ffffffffffffffff8211171561437f5761437f613f32565b604052823561438d81614305565b8152602083013561439d81614305565b602082015260408301356143b081614305565b604082015260608301356143c381614305565b60608201529392505050565b600080600080608085870312156143e557600080fd5b6143ee85613e11565b93506143fc60208601613e11565b925060408501359150606085013567ffffffffffffffff81111561441f57600080fd5b8501601f8101871361443057600080fd5b61443f87823560208401614087565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610b15565b600080604083850312156144a357600080fd5b6144ac83613e11565b91506144ba60208401613e11565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b600082198211156144ec576144ec6144c3565b500190565b600181811c9082168061450557607f821691505b60208210810361452557634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561453d57600080fd5b8151611e7281614305565b6000816000190483118215151615614562576145626144c3565b500290565b634e487b7160e01b600052603260045260246000fd5b6000835161458f818460208801613e57565b8351908301906145a3818360208801613e57565b01949350505050565b6000600182016145be576145be6144c3565b5060010190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526145f76080830184613e83565b9695505050505050565b60006020828403121561461357600080fd5b8151611e7281613dde565b634e487b7160e01b600052602160045260246000fdfe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40a264697066735822122039e20fab7b5241549f2746c466ca3985f0e819ebe0b4eb72ab4ae68d010b4d5764736f6c634300080d0033
Deployed Bytecode
0x60806040526004361061034a5760003560e01c80636c0360eb116101bb578063ab59e976116100f7578063c87b56dd11610095578063e985e9c51161006f578063e985e9c514610976578063f2fde38b146109de578063f4a0a528146109fe578063fdfc7aae14610a1e57600080fd5b8063c87b56dd14610909578063d23b588014610929578063d88cc3ff1461094957600080fd5b8063b88d4fde116100d1578063b88d4fde14610886578063bd4ca9a2146108a6578063c23dc68f146108bc578063c4d66de8146108e957600080fd5b8063ab59e97614610830578063ae5b7a7d14610850578063b824ca881461086657600080fd5b80638fa2a9f0116101645780639ab475b51161013e5780639ab475b5146107d15780639d1f1c47146107e45780639e19f27b146107fa578063a22cb4651461081057600080fd5b80638fa2a9f01461077c57806395d89b411461079c57806399a2557a146107b157600080fd5b80638462151c116101955780638462151c1461071157806387e6da9d1461073e5780638da5cb5b1461075e57600080fd5b80636c0360eb146106c757806370a08231146106dc578063715018a6146106fc57600080fd5b806335dd3b1e1161028a5780634781d295116102335780635bbb21771161020d5780635bbb2177146106445780635fe48df1146106715780636352211e146106915780636817c76c146106b157600080fd5b80634781d295146105d75780634e286614146105f757806355f804b31461062457600080fd5b80633d272294116102645780633d272294146105845780633ef0d36d146105a457806342842e0e146105b757600080fd5b806335dd3b1e1461052f5780633abe82ee1461054f5780633ccfd60b1461056f57600080fd5b8063095ea7b3116102f757806323b872dd116102d157806323b872dd146104d05780632b314dc6146104f05780632c4e9fc61461050357806332cb6b0c1461051957600080fd5b8063095ea7b3146104515780630fe8418b1461047157806318160ddd1461048757600080fd5b806306fdde031161032857806306fdde03146103ca57806307fc1f23146103ec578063081812fc1461041957600080fd5b8063013c1ceb1461034f57806301ffc9a714610378578063050225ea146103a8575b600080fd5b34801561035b57600080fd5b50610365609e5481565b6040519081526020015b60405180910390f35b34801561038457600080fd5b50610398610393366004613df4565b610a7e565b604051901515815260200161036f565b3480156103b457600080fd5b506103c86103c3366004613e2d565b610b1b565b005b3480156103d657600080fd5b506103df610bc2565b60405161036f9190613eaf565b3480156103f857600080fd5b50610365610407366004613ec2565b60a66020526000908152604090205481565b34801561042557600080fd5b50610439610434366004613edd565b610c64565b6040516001600160a01b03909116815260200161036f565b34801561045d57600080fd5b506103c861046c366004613e2d565b610ce0565b34801561047d57600080fd5b5061036560995481565b34801561049357600080fd5b507f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614635833981519152540360001901610365565b3480156104dc57600080fd5b506103c86104eb366004613ef6565b610e01565b6103c86104fe366004613f79565b610f5d565b34801561050f57600080fd5b50610365609b5481565b34801561052557600080fd5b5061036561138881565b34801561053b57600080fd5b506103c861054a366004613edd565b61134d565b34801561055b57600080fd5b506103c861056a366004613edd565b61135a565b34801561057b57600080fd5b506103c8611367565b34801561059057600080fd5b506103c861059f366004613edd565b61141e565b6103c86105b2366004613f79565b61142b565b3480156105c357600080fd5b506103c86105d2366004613ef6565b6117cd565b3480156105e357600080fd5b506103c86105f236600461402b565b61191e565b34801561060357600080fd5b50610365610612366004613ec2565b60a56020526000908152604090205481565b34801561063057600080fd5b506103c861063f3660046140df565b61193c565b34801561065057600080fd5b5061066461065f366004614128565b611957565b60405161036f919061419d565b34801561067d57600080fd5b506103c861068c366004613edd565b611a23565b34801561069d57600080fd5b506104396106ac366004613edd565b611a30565b3480156106bd57600080fd5b50610365609a5481565b3480156106d357600080fd5b506103df611a3b565b3480156106e857600080fd5b506103656106f7366004613ec2565b611ac9565b34801561070857600080fd5b506103c8611b50565b34801561071d57600080fd5b5061073161072c366004613ec2565b611b64565b60405161036f919061421a565b34801561074a57600080fd5b506103c8610759366004613edd565b611c68565b34801561076a57600080fd5b506033546001600160a01b0316610439565b34801561078857600080fd5b506103c8610797366004613ec2565b611c75565b3480156107a857600080fd5b506103df611cac565b3480156107bd57600080fd5b506107316107cc366004614252565b611ccb565b6103c86107df366004614285565b611e79565b3480156107f057600080fd5b50610365609c5481565b34801561080657600080fd5b50610365609f5481565b34801561081c57600080fd5b506103c861082b366004614313565b61226b565b34801561083c57600080fd5b506103c861084b36600461434a565b612338565b34801561085c57600080fd5b5061036560985481565b34801561087257600080fd5b506103c8610881366004613edd565b6123a5565b34801561089257600080fd5b506103c86108a13660046143cf565b6123b2565b3480156108b257600080fd5b5061036560a05481565b3480156108c857600080fd5b506108dc6108d7366004613edd565b612511565b60405161036f919061444b565b3480156108f557600080fd5b506103c8610904366004613ec2565b6125a6565b34801561091557600080fd5b506103df610924366004613edd565b612907565b34801561093557600080fd5b506103c8610944366004613edd565b6129a3565b34801561095557600080fd5b50610365610964366004613ec2565b60a76020526000908152604090205481565b34801561098257600080fd5b50610398610991366004614490565b6001600160a01b0391821660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832093909416825291909152205460ff1690565b3480156109ea57600080fd5b506103c86109f9366004613ec2565b6129b0565b348015610a0a57600080fd5b506103c8610a19366004613edd565b612a3d565b348015610a2a57600080fd5b50609d54610a549060ff808216916101008104821691620100008204811691630100000090041684565b6040805194151585529215156020850152901515918301919091521515606082015260800161036f565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161480610ae157507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610b1557507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b610b23612a4a565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614635833981519152546113889183910360001901610b6a91906144d9565b1115610bb45760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b60448201526064015b60405180910390fd5b610bbe8282612aa4565b5050565b60606000805160206146358339815191526002018054610be1906144f1565b80601f0160208091040260200160405190810160405280929190818152602001828054610c0d906144f1565b8015610c5a5780601f10610c2f57610100808354040283529160200191610c5a565b820191906000526020600020905b815481529060010190602001808311610c3d57829003601f168201915b5050505050905090565b6000610c6f82612c32565b610ca5576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020546001600160a01b031690565b6000610ceb82611a30565b9050336001600160a01b03821614610d79576001600160a01b03811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16610d79576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b826daaeb6d7670e522a718067333cd4e3b15610f4c57336001600160a01b03821603610e3757610e32848484612c93565b610f57565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610e86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaa919061452b565b8015610f2d5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2d919061452b565b610f4c57604051633b79c77360e21b8152336004820152602401610bab565b610f57848484612c93565b50505050565b600260655403610faf5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bab565b6002606555609d5460ff16610ff65760405162461bcd60e51b815260206004820152600d60248201526c4d696e74206e6f74206c69766560981b6044820152606401610bab565b600082116110375760405162461bcd60e51b815260206004820152600e60248201526d4d696e742061746c65617374203160901b6044820152606401610bab565b6098547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460008051602061463583398151915254849190036000190161107e91906144d9565b11156110cc5760405162461bcd60e51b815260206004820152601160248201527f45786365656473204f4720737570706c790000000000000000000000000000006044820152606401610bab565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460008051602061463583398151915254611388918491036000190161111391906144d9565b11156111585760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b6044820152606401610bab565b609e548211156111aa5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610bab565b33600090815260a56020526040902054609e546111c784836144d9565b11156112155760405162461bcd60e51b815260206004820152601660248201527f45786365656473206d6178207065722077616c6c6574000000000000000000006044820152606401610bab565b82609c546112239190614548565b3410156112635760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610bab565b60a1546112b1908390335b604051602001611296919060609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120612f5c565b6112fd5760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656c696769626c6520666f72204f47206d696e742e000000000000006044820152606401610bab565b611308335b84612aa4565b8260a56000335b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461133e91906144d9565b90915550506001606555505050565b611355612a4a565b60a055565b611362612a4a565b609955565b61136f612a4a565b60405160009073e5bc04fb8b4cd138d39b76227e9dad8785b95f459047908381818185875af1925050503d80600081146113c5576040519150601f19603f3d011682016040523d82523d6000602084013e6113ca565b606091505b505090508061141b5760405162461bcd60e51b815260206004820152600f60248201527f5769746864726177204661696c656400000000000000000000000000000000006044820152606401610bab565b50565b611426612a4a565b609b55565b60026065540361147d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bab565b6002606555609d54610100900460ff16806114a05750609d5462010000900460ff165b6114dc5760405162461bcd60e51b815260206004820152600d60248201526c4d696e74206e6f74206c69766560981b6044820152606401610bab565b6000821161151d5760405162461bcd60e51b815260206004820152600e60248201526d4d696e742061746c65617374203160901b6044820152606401610bab565b6099547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460008051602061463583398151915254849190036000190161156491906144d9565b11156115b25760405162461bcd60e51b815260206004820152601160248201527f4578636565647320574c20737570706c790000000000000000000000000000006044820152606401610bab565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41546000805160206146358339815191525461138891849103600019016115f991906144d9565b111561163e5760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b6044820152606401610bab565b609f548211156116905760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610bab565b33600090815260a66020526040902054609f546116ad84836144d9565b11156116fb5760405162461bcd60e51b815260206004820152601660248201527f45786365656473206d6178207065722077616c6c6574000000000000000000006044820152606401610bab565b82609b546117099190614548565b3410156117495760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610bab565b60a2546117589083903361126e565b8061176d575060a35461176d9083903361126e565b6117b95760405162461bcd60e51b815260206004820181905260248201527f4e6f7420656c696769626c6520666f722077686974656c697374206d696e742e6044820152606401610bab565b6117c233611302565b8260a660003361130f565b826daaeb6d7670e522a718067333cd4e3b1561191357336001600160a01b038216036117fe57610e32848484612f72565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561184d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611871919061452b565b80156118f45750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156118d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f4919061452b565b61191357604051633b79c77360e21b8152336004820152602401610bab565b610f57848484612f72565b611926612a4a565b805160a155602081015160a2556040015160a355565b611944612a4a565b8051610bbe906097906020840190613d45565b60608160008167ffffffffffffffff81111561197557611975613f32565b6040519080825280602002602001820160405280156119c757816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816119935790505b50905060005b828114611a1a576119f58686838181106119e9576119e9614567565b90506020020135612511565b828281518110611a0757611a07614567565b60209081029190910101526001016119cd565b50949350505050565b611a2b612a4a565b609e55565b6000610b1582612f8d565b60978054611a48906144f1565b80601f0160208091040260200160405190810160405280929190818152602001828054611a74906144f1565b8015611ac15780601f10611a9657610100808354040283529160200191611ac1565b820191906000526020600020905b815481529060010190602001808311611aa457829003601f168201915b505050505081565b60006001600160a01b038216611b0b576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45602052604090205467ffffffffffffffff1690565b611b58612a4a565b611b626000613060565b565b60606000806000611b7485611ac9565b905060008167ffffffffffffffff811115611b9157611b91613f32565b604051908082528060200260200182016040528015611bba578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b838614611c5c57611bf5816130bf565b91508160400151611c545781516001600160a01b031615611c1557815194505b876001600160a01b0316856001600160a01b031603611c545780838780600101985081518110611c4757611c47614567565b6020026020010181815250505b600101611be5565b50909695505050505050565b611c70612a4a565b609855565b611c7d612a4a565b60a4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60606000805160206146358339815191526003018054610be1906144f1565b6060818310611d06576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611d1f6000805160206146358339815191525490565b90506001851015611d2f57600194505b80841115611d3b578093505b6000611d4687611ac9565b905084861015611d655785850381811015611d5f578091505b50611d69565b5060005b60008167ffffffffffffffff811115611d8457611d84613f32565b604051908082528060200260200182016040528015611dad578160200160208202803683370190505b50905081600003611dc3579350611e7292505050565b6000611dce88612511565b905060008160400151611ddf575080515b885b888114158015611df15750848714155b15611e6657611dff816130bf565b92508260400151611e5e5782516001600160a01b031615611e1f57825191505b8a6001600160a01b0316826001600160a01b031603611e5e5780848880600101995081518110611e5157611e51614567565b6020026020010181815250505b600101611de1565b50505092835250909150505b9392505050565b600260655403611ecb5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bab565b6002606555609d546301000000900460ff16611f195760405162461bcd60e51b815260206004820152600d60248201526c4d696e74206e6f74206c69766560981b6044820152606401610bab565b60008411611f5a5760405162461bcd60e51b815260206004820152600e60248201526d4d696e742061746c65617374203160901b6044820152606401610bab565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4154600080516020614635833981519152546113889186910360001901611fa191906144d9565b1115611fe65760405162461bcd60e51b81526020600482015260146024820152734578636565647320746f74616c20737570706c7960601b6044820152606401610bab565b60a0548411156120385760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610bab565b33600090815260a7602052604090205460a05461205586836144d9565b11156120a35760405162461bcd60e51b815260206004820152601660248201527f45786365656473206d6178207065722077616c6c6574000000000000000000006044820152606401610bab565b84609a546120b19190614548565b3410156120f15760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610bab565b6040516bffffffffffffffffffffffff1933606090811b821660208401527f616c6c6f77000000000000000000000000000000000000000000000000000000603484015230901b166039820152604d016040516020818303038152906040528051906020012084146121a55760405162461bcd60e51b815260206004820152600c60248201527f496e76616c6964206861736800000000000000000000000000000000000000006044820152606401610bab565b6121e58484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061315092505050565b6122315760405162461bcd60e51b815260206004820152601660248201527f496e76616c69642064617461207369676e6174757265000000000000000000006044820152606401610bab565b61223b3386612aa4565b33600090815260a760205260408120805487929061225a9084906144d9565b909155505060016065555050505050565b336001600160a01b038316036122ad576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612340612a4a565b8051609d80546020840151604085015160609095015161ffff1990921693151561ff00191693909317610100931515939093029290921763ffff00001916620100009315159390930263ff000000191692909217630100000091151591909102179055565b6123ad612a4a565b609c55565b836daaeb6d7670e522a718067333cd4e3b156124fe57336001600160a01b038216036123e9576123e4858585856131d1565b61250a565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612438573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245c919061452b565b80156124df5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156124bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124df919061452b565b6124fe57604051633b79c77360e21b8152336004820152602401610bab565b61250a858585856131d1565b5050505050565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806125775750600080516020614635833981519152548310155b156125825792915050565b61258b836130bf565b905080604001511561259d5792915050565b611e7283613215565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166125ff577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f5460ff1615612603565b303b155b6126755760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610bab565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff161580156126d5577fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ffff19166101011790555b600054610100900460ff16158080156126f55750600054600160ff909116105b8061270f5750303b15801561270f575060005460ff166001145b6127815760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610bab565b6000805460ff1916600117905580156127a4576000805461ff0019166101001790555b6128186040518060400160405280600981526020017f4368696c6c54756e6100000000000000000000000000000000000000000000008152506040518060400160405280600981526020017f4348494c4c54554e41000000000000000000000000000000000000000000000081525061328d565b612820613333565b6128286133a6565b60a4805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385161790556103096098556109c46099556658d15e17628000609c55666a94d74f430000609b55667c585087238000609a556001609e556002609f81905560a05580156128d2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015610bbe5750507fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ff0019169055565b606061291282612c32565b612948576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612952613430565b905080516000036129725760405180602001604052806000815250611e72565b8061297c8461343f565b60405160200161298d92919061457d565b6040516020818303038152906040529392505050565b6129ab612a4a565b609f55565b6129b8612a4a565b6001600160a01b038116612a345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bab565b61141b81613060565b612a45612a4a565b609a55565b6033546001600160a01b03163314611b625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bab565b600080516020614635833981519152546000829003612aef576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c456020908152604080832080546801000000000000000188020190558483527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612bdc57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612ba4565b5081600003612c17576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805160206146358339815191525550505050565b505050565b600081600111158015612c5357506000805160206146358339815191525482105b8015610b1557505060009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054600160e01b161590565b6000612c9e82612f8d565b9050836001600160a01b0316816001600160a01b031614612ceb576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604090208054338082146001600160a01b03881690911417612dac576001600160a01b03861660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c476020908152604080832033845290915290205460ff16612dac576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516612dec576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015612df757600082555b6001600160a01b0386811660009081527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b1760008581527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040812091909155600160e11b84169003612f12576001840160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4460205260408120549003612f1057600080516020614635833981519152548114612f105760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600082612f69858461348e565b14949350505050565b612c2d838383604051806020016040528060008152506123b2565b6000818060011161302e576000805160206146358339815191525481101561302e5760008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c44602052604081205490600160e01b8216900361302c575b80600003611e7257506000190160008181527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c446020526040902054612fec565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516080810182526000808252602082018190529181018290526060810191909152610b1560008051602061463583398151915260008481526004919091016020526040902054604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b60a4546000906001600160a01b03166131c0836131ba866040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b906134db565b6001600160a01b0316149392505050565b6131dc848484610e01565b6001600160a01b0383163b15610f57576131f8848484846134f7565b610f57576040516368d2bf6b60e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152610b1561324583612f8d565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff166133295760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610bab565b610bbe82826135e3565b600054610100900460ff1661339e5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b611b626136fb565b600054610100900460ff166134115760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b611b62733cc6cdda760b79bafa08df41ecfa224f810dceb6600161376f565b606060978054610be1906144f1565b604080516080810191829052607f0190826030600a8206018353600a90045b801561347c57600183039250600a81066030018353600a900461345e565b50819003601f19909101908152919050565b600081815b84518110156134d3576134bf828683815181106134b2576134b2614567565b60200260200101516139b6565b9150806134cb816145ac565b915050613493565b509392505050565b60008060006134ea85856139e2565b915091506134d381613a50565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061352c9033908990889088906004016145c5565b6020604051808303816000875af1925050508015613567575060408051601f3d908101601f1916820190925261356491810190614601565b60015b6135c5573d808015613595576040519150601f19603f3d011682016040523d82523d6000602084013e61359a565b606091505b5080516000036135bd576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f54610100900460ff1661367f5760405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608401610bab565b81516136b1907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c42906020850190613d45565b5080516136e4907f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c43906020840190613d45565b506001600080516020614635833981519152555050565b600054610100900460ff166137665760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b611b6233613060565b600054610100900460ff166137da5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610bab565b6daaeb6d7670e522a718067333cd4e3b15610bbe576040517fc3c5a5470000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af1158015613853573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613877919061452b565b610bbe578015613904576040517f7d3e3dbe0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156138f057600080fd5b505af1158015612f54573d6000803e3d6000fd5b6001600160a01b0382161561396c576040517fa0af29030000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016138d6565b6040517f4420e4860000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024016138d6565b60008183106139d2576000828152602084905260409020611e72565b5060009182526020526040902090565b6000808251604103613a185760208301516040840151606085015160001a613a0c87828585613c06565b94509450505050613a49565b8251604003613a415760208301516040840151613a36868383613cf3565b935093505050613a49565b506000905060025b9250929050565b6000816004811115613a6457613a6461461e565b03613a6c5750565b6001816004811115613a8057613a8061461e565b03613acd5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bab565b6002816004811115613ae157613ae161461e565b03613b2e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bab565b6003816004811115613b4257613b4261461e565b03613b9a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610bab565b6004816004811115613bae57613bae61461e565b0361141b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610bab565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613c3d5750600090506003613cea565b8460ff16601b14158015613c5557508460ff16601c14155b15613c665750600090506004613cea565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613cba573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613ce357600060019250925050613cea565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681613d2960ff86901c601b6144d9565b9050613d3787828885613c06565b935093505050935093915050565b828054613d51906144f1565b90600052602060002090601f016020900481019282613d735760008555613db9565b82601f10613d8c57805160ff1916838001178555613db9565b82800160010185558215613db9579182015b82811115613db9578251825591602001919060010190613d9e565b50613dc5929150613dc9565b5090565b5b80821115613dc55760008155600101613dca565b6001600160e01b03198116811461141b57600080fd5b600060208284031215613e0657600080fd5b8135611e7281613dde565b80356001600160a01b0381168114613e2857600080fd5b919050565b60008060408385031215613e4057600080fd5b613e4983613e11565b946020939093013593505050565b60005b83811015613e72578181015183820152602001613e5a565b83811115610f575750506000910152565b60008151808452613e9b816020860160208601613e57565b601f01601f19169290920160200192915050565b602081526000611e726020830184613e83565b600060208284031215613ed457600080fd5b611e7282613e11565b600060208284031215613eef57600080fd5b5035919050565b600080600060608486031215613f0b57600080fd5b613f1484613e11565b9250613f2260208501613e11565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f7157613f71613f32565b604052919050565b60008060408385031215613f8c57600080fd5b8235915060208084013567ffffffffffffffff80821115613fac57600080fd5b818601915086601f830112613fc057600080fd5b813581811115613fd257613fd2613f32565b8060051b9150613fe3848301613f48565b8181529183018401918481019089841115613ffd57600080fd5b938501935b8385101561401b57843582529385019390850190614002565b8096505050505050509250929050565b60006060828403121561403d57600080fd5b6040516060810181811067ffffffffffffffff8211171561406057614060613f32565b80604052508235815260208301356020820152604083013560408201528091505092915050565b600067ffffffffffffffff8311156140a1576140a1613f32565b6140b4601f8401601f1916602001613f48565b90508281528383830111156140c857600080fd5b828260208301376000602084830101529392505050565b6000602082840312156140f157600080fd5b813567ffffffffffffffff81111561410857600080fd5b8201601f8101841361411957600080fd5b6135db84823560208401614087565b6000806020838503121561413b57600080fd5b823567ffffffffffffffff8082111561415357600080fd5b818501915085601f83011261416757600080fd5b81358181111561417657600080fd5b8660208260051b850101111561418b57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b81811015611c5c576142078385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b92840192608092909201916001016141b9565b6020808252825182820181905260009190848201906040850190845b81811015611c5c57835183529284019291840191600101614236565b60008060006060848603121561426757600080fd5b61427084613e11565b95602085013595506040909401359392505050565b6000806000806060858703121561429b57600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156142c157600080fd5b818701915087601f8301126142d557600080fd5b8135818111156142e457600080fd5b8860208285010111156142f657600080fd5b95989497505060200194505050565b801515811461141b57600080fd5b6000806040838503121561432657600080fd5b61432f83613e11565b9150602083013561433f81614305565b809150509250929050565b60006080828403121561435c57600080fd5b6040516080810181811067ffffffffffffffff8211171561437f5761437f613f32565b604052823561438d81614305565b8152602083013561439d81614305565b602082015260408301356143b081614305565b604082015260608301356143c381614305565b60608201529392505050565b600080600080608085870312156143e557600080fd5b6143ee85613e11565b93506143fc60208601613e11565b925060408501359150606085013567ffffffffffffffff81111561441f57600080fd5b8501601f8101871361443057600080fd5b61443f87823560208401614087565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610b15565b600080604083850312156144a357600080fd5b6144ac83613e11565b91506144ba60208401613e11565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b600082198211156144ec576144ec6144c3565b500190565b600181811c9082168061450557607f821691505b60208210810361452557634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561453d57600080fd5b8151611e7281614305565b6000816000190483118215151615614562576145626144c3565b500290565b634e487b7160e01b600052603260045260246000fd5b6000835161458f818460208801613e57565b8351908301906145a3818360208801613e57565b01949350505050565b6000600182016145be576145be6144c3565b5060010190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526145f76080830184613e83565b9695505050505050565b60006020828403121561461357600080fd5b8151611e7281613dde565b634e487b7160e01b600052602160045260246000fdfe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c40a264697066735822122039e20fab7b5241549f2746c466ca3985f0e819ebe0b4eb72ab4ae68d010b4d5764736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.