Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
999 GK
Holders
352
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 GKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Konquest
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import 'erc721a/contracts/ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; /** * @title Galactic Konquest contract * @dev Extends ERC721A Non-Fungible Token Standard basic implementation */ contract Konquest is ERC721A, Ownable { using EnumerableSet for EnumerableSet.UintSet; // Metadata string private constant TOKEN_NAME = 'Galactic Konquest'; string private constant TOKEN_SYMBOL = 'GK'; uint private constant KONQUEST_RESERVED = 299; uint private constant MAX_KONQUESTS = 999; uint public constant MAX_PURCHASE_PER_ONCE = 1; uint256 public constant KONQUEST_PRICE = 40000000000000000; // 0.04 ETH per 1 token uint public SALE_WHITELIST_A_TIMESTAMP = 1703250000; // Friday, December 22, 2023 8:00:00 PM GMT+07:00 uint public SALE_WHITELIST_B_TIMESTAMP = 1703257200; // Friday, December 22, 2023 10:00:00 PM GMT+07:00 uint public SALE_START_TIMESTAMP = 1703260800; // Friday, December 22, 2023 11:00:00 PM GMT+07:00 uint public REVEAL_TIMESTAMP = 1703682000; // Wednesday, December 27, 2023 8:00:00 PM GMT+07:00 string public KONQUEST_PROVENANCE = ''; bool public konquestIsReserved = false; bool public saleIsActive = false; string private _baseTokenURI; // Mapping from address to bool to check if the address has already minted mapping(address => bool) private _hasMinted; // Mapping from holder address to their (enumerable) set of owned tokens mapping(address => EnumerableSet.UintSet) private _holderTokens; // Set starting index logic uint256 public startingIndexBlock; uint256 public startingIndex; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) {} function withdraw(uint256 amount) public onlyOwner { payable(msg.sender).transfer(amount); } /* * Set provenance once it's calculated */ function setProvenanceHash(string memory provenanceHash) public onlyOwner { KONQUEST_PROVENANCE = provenanceHash; } /* * Set timestamp for all sale tiers * tier = 1 if whitelistA * tier = 2 if whitelistB * tier = 3 if public sale * tier = 4 if reveal timestamp */ function setTimestamp(uint8 tier, uint256 timestamp) public onlyOwner { if (tier == 1) { SALE_WHITELIST_A_TIMESTAMP = timestamp; } else if (tier == 2) { SALE_WHITELIST_B_TIMESTAMP = timestamp; } else if (tier == 3) { SALE_START_TIMESTAMP = timestamp; } else if (tier == 4) { REVEAL_TIMESTAMP = timestamp; } else { revert('Invalid tier'); } } /* * Get base URI */ function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } /* * Set base URI */ function setBaseURI(string calldata baseURI) external onlyOwner { _baseTokenURI = baseURI; } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { saleIsActive = !saleIsActive; } /** * Reserve Konquests */ function reserveKonquests() public onlyOwner { require(!konquestIsReserved, 'Konquest is already reserved'); // mint tokens _safeMint(msg.sender, KONQUEST_RESERVED); konquestIsReserved = true; } /** * Mint Konquests * tier = 1 if whitelistA * tier = 2 if whitelistB * tier = 3 if public sale */ function mintKonquest( uint numberOfTokens, uint8 tier, bytes memory signature ) public payable { require(saleIsActive, 'Sale is not active'); require(!_hasMinted[msg.sender], 'Caller has already minted'); if (tier == 1 || tier == 2) { require( verifySignatureMatchTierAndSender(tier, signature), 'Caller is not in the whitelist' ); } if (tier == 1) { require( block.timestamp >= SALE_WHITELIST_A_TIMESTAMP, 'Sale has not started for whitelist A' ); } else if (tier == 2) { require( block.timestamp >= SALE_WHITELIST_B_TIMESTAMP, 'Sale has not started for whitelist B' ); } else if (tier == 3) { require( block.timestamp >= SALE_START_TIMESTAMP, 'Sale has not started for public sale' ); } else { revert('Invalid tier'); } require( numberOfTokens <= MAX_PURCHASE_PER_ONCE, 'Can only mint 1 token at a time' ); require( totalSupply() + numberOfTokens <= MAX_KONQUESTS, 'Purchase would exceed max supply of Konquests' ); require( KONQUEST_PRICE * numberOfTokens <= msg.value, 'Ether value sent is not correct' ); // mint tokens _safeMint(msg.sender, numberOfTokens); // flag that the address has minted _hasMinted[msg.sender] = true; // If we haven't set the starting index and this is either 1) the last saleable token or 2) the first token to be sold after // the end of pre-sale, set the starting index block if ( startingIndexBlock == 0 && (totalSupply() == MAX_KONQUESTS || block.timestamp >= REVEAL_TIMESTAMP) ) { startingIndexBlock = block.number; } } /** * Set the starting index for the collection */ function setStartingIndex() public { require(startingIndex == 0, 'Starting index is already set'); require(startingIndexBlock != 0, 'Starting index block must be set'); startingIndex = uint(blockhash(startingIndexBlock)) % MAX_KONQUESTS; // Just a sanity case in the worst case if this function is called late (EVM only stores last 256 block hashes) if (block.number - (startingIndexBlock) > 255) { startingIndex = uint(blockhash(block.number - 1)) % MAX_KONQUESTS; } // Prevent default sequence if (startingIndex == 0) { startingIndex = startingIndex + 1; } } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { require(startingIndex == 0, 'Starting index is already set'); startingIndexBlock = block.number; } /** * Get token ids of the tokens owned by the address at index. */ function tokenOfOwnerByIndex( address owner, uint256 index ) public view returns (uint256) { return _holderTokens[owner].at(index); } /** * Override _afterTokenTransfers to update the token owners * token mint, burn and transfer will call this function */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { for (uint256 i = 0; i < quantity; i++) { _holderTokens[from].remove(startTokenId + i); _holderTokens[to].add(startTokenId + i); } } /** * Verify signature match tier and sender * by checking if the signature is signed by the owner */ function verifySignatureMatchTierAndSender( uint8 tier, bytes memory signature ) public view returns (bool) { bytes32 msgHash = keccak256(abi.encodePacked(msg.sender, tier)); bytes32 _ethSignedMessageHash = getEthSignedMessageHash(msgHash); (bytes32 r, bytes32 s, uint8 v) = splitSignature(signature); address signer = ecrecover(_ethSignedMessageHash, v, r, s); return signer == owner(); } /** * Split signature into r, s, v */ function splitSignature( bytes memory sig ) internal pure returns (bytes32 r, bytes32 s, uint8 v) { require(sig.length == 65, 'invalid signature length'); assembly { r := mload(add(sig, 32)) s := mload(add(sig, 64)) v := byte(0, mload(add(sig, 96))) } } /** * Get eth signed message hash */ function getEthSignedMessageHash( bytes32 _messageHash ) internal pure returns (bytes32) { return keccak256( abi.encodePacked( '\x19Ethereum Signed Message:\n32', _messageHash ) ); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { 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 ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // 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; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _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 _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 _currentIndex - _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 _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _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 _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_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 (_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(_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 = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _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 _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _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(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _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 < _currentIndex) { uint256 packed = _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 = _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 payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _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 _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 { _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 _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 < _currentIndex && // If within bounds, _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) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. 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 payable 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. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _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 (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _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 payable 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 payable 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__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(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 = _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`. _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`. _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. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. 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`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. 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(); _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 = _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`. _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`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _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 = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_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;`. _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`. _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 (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _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 { _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 = _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); _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 str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * 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 payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @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 payable; /** * @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 payable; /** * @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 // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","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":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":"KONQUEST_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KONQUEST_PROVENANCE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PURCHASE_PER_ONCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEAL_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_START_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_WHITELIST_A_TIMESTAMP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_WHITELIST_B_TIMESTAMP","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencySetStartingIndexBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"konquestIsReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"},{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintKonquest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveKonquests","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":"payable","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":"payable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setStartingIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"setTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startingIndexBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tier","type":"uint8"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifySignatureMatchTierAndSender","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6365858850600955636585a470600a55636585b280600b5563658c1fd0600c5560a060405260006080908152600d906200003a9082620001c8565b50600e805461ffff191690553480156200005357600080fd5b506040518060400160405280601181526020017011d85b1858dd1a58c812dbdb9c5d595cdd607a1b81525060405180604001604052806002815260200161474b60f01b8152508160029081620000aa9190620001c8565b506003620000b98282620001c8565b50506000805550620000cb33620000d1565b62000294565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200014e57607f821691505b6020821081036200016f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001c357600081815260208120601f850160051c810160208610156200019e5750805b601f850160051c820191505b81811015620001bf57828155600101620001aa565b5050505b505050565b81516001600160401b03811115620001e457620001e462000123565b620001fc81620001f5845462000139565b8462000175565b602080601f8311600181146200023457600084156200021b5750858301515b600019600386901b1c1916600185901b178555620001bf565b600085815260208120601f198616915b82811015620002655788860151825594840194600190910190840162000244565b5085821015620002845787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61237280620002a46000396000f3fe6080604052600436106102305760003560e01c806370a082311161012e578063c87b56dd116100ab578063e98665501161006f578063e98665501461060a578063e9dcc14b1461061f578063eb8d244414610634578063eec572bf14610653578063f2fde38b1461067357600080fd5b8063c87b56dd14610562578063cb774d4714610582578063e36d649814610598578063e981a7b7146105ae578063e985e9c5146105c157600080fd5b8063946807fd116100f2578063946807fd146104ea57806395d89b4114610500578063a22cb46514610515578063b48a53cf14610535578063b88d4fde1461054f57600080fd5b806370a0823114610462578063715018a6146104825780637d17fcbe146104975780638c7e7df7146104ac5780638da5cb5b146104cc57600080fd5b80631fe5e05f116101bc57806335675c401161018057806335675c40146103e557806342842e0e146103fa578063474071561461040d57806355f804b3146104225780636352211e1461044257600080fd5b80631fe5e05f1461036757806323b872dd1461037d5780632e1a7d4d146103905780632f745c59146103b057806334918dfd146103d057600080fd5b8063095ea7b311610203578063095ea7b3146102ed578063109695231461030257806318160ddd1461032257806318e20a381461033b5780631e4a926b1461035157600080fd5b806301ffc9a71461023557806306aa9e4a1461026a57806306fdde0314610293578063081812fc146102b5575b600080fd5b34801561024157600080fd5b50610255610250366004611bab565b610693565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b50610285668e1bc9bf04000081565b604051908152602001610261565b34801561029f57600080fd5b506102a86106e5565b6040516102619190611c18565b3480156102c157600080fd5b506102d56102d0366004611c2b565b610777565b6040516001600160a01b039091168152602001610261565b6103006102fb366004611c60565b6107bb565b005b34801561030e57600080fd5b5061030061031d366004611d16565b61085b565b34801561032e57600080fd5b5060015460005403610285565b34801561034757600080fd5b50610285600c5481565b34801561035d57600080fd5b5061028560095481565b34801561037357600080fd5b50610285600a5481565b61030061038b366004611d5f565b610873565b34801561039c57600080fd5b506103006103ab366004611c2b565b610a18565b3480156103bc57600080fd5b506102856103cb366004611c60565b610a4d565b3480156103dc57600080fd5b50610300610a76565b3480156103f157600080fd5b50610300610a9b565b610300610408366004611d5f565b610b16565b34801561041957600080fd5b50610285600181565b34801561042e57600080fd5b5061030061043d366004611d9b565b610b36565b34801561044e57600080fd5b506102d561045d366004611c2b565b610b4b565b34801561046e57600080fd5b5061028561047d366004611e0d565b610b56565b34801561048e57600080fd5b50610300610ba5565b3480156104a357600080fd5b50610300610bb9565b3480156104b857600080fd5b506103006104c7366004611e39565b610c17565b3480156104d857600080fd5b506008546001600160a01b03166102d5565b3480156104f657600080fd5b50610285600b5481565b34801561050c57600080fd5b506102a8610c9a565b34801561052157600080fd5b50610300610530366004611e55565b610ca9565b34801561054157600080fd5b50600e546102559060ff1681565b61030061055d366004611eb1565b610d15565b34801561056e57600080fd5b506102a861057d366004611c2b565b610d5f565b34801561058e57600080fd5b5061028560135481565b3480156105a457600080fd5b5061028560125481565b6103006105bc366004611f19565b610de2565b3480156105cd57600080fd5b506102556105dc366004611f70565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561061657600080fd5b506103006111c9565b34801561062b57600080fd5b506102a86112cf565b34801561064057600080fd5b50600e5461025590610100900460ff1681565b34801561065f57600080fd5b5061025561066e366004611fa3565b61135d565b34801561067f57600080fd5b5061030061068e366004611e0d565b61149c565b60006301ffc9a760e01b6001600160e01b0319831614806106c457506380ac58cd60e01b6001600160e01b03198316145b806106df5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546106f490611ff1565b80601f016020809104026020016040519081016040528092919081815260200182805461072090611ff1565b801561076d5780601f106107425761010080835404028352916020019161076d565b820191906000526020600020905b81548152906001019060200180831161075057829003601f168201915b5050505050905090565b600061078282611515565b61079f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006107c682610b4b565b9050336001600160a01b038216146107ff576107e281336105dc565b6107ff576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61086361153c565b600d61086f8282612071565b5050565b600061087e82611596565b9050836001600160a01b0316816001600160a01b0316146108b15760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176108fe576108e186336105dc565b6108fe57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661092557604051633a954ecd60e21b815260040160405180910390fd5b801561093057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036109c2576001840160008181526004602052604081205490036109c05760005481146109c05760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610a1086868660016115fd565b505050505050565b610a2061153c565b604051339082156108fc029083906000818181858888f1935050505015801561086f573d6000803e3d6000fd5b6001600160a01b0382166000908152601160205260408120610a6f9083611679565b9392505050565b610a7e61153c565b600e805461ff001981166101009182900460ff1615909102179055565b610aa361153c565b600e5460ff1615610afb5760405162461bcd60e51b815260206004820152601c60248201527f4b6f6e717565737420697320616c72656164792072657365727665640000000060448201526064015b60405180910390fd5b610b073361012b611685565b600e805460ff19166001179055565b610b3183838360405180602001604052806000815250610d15565b505050565b610b3e61153c565b600f610b31828483612131565b60006106df82611596565b60006001600160a01b038216610b7f576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610bad61153c565b610bb7600061169f565b565b610bc161153c565b60135415610c115760405162461bcd60e51b815260206004820152601d60248201527f5374617274696e6720696e64657820697320616c7265616479207365740000006044820152606401610af2565b43601255565b610c1f61153c565b8160ff16600103610c305760095550565b8160ff16600203610c4157600a5550565b8160ff16600303610c5257600b5550565b8160ff16600403610c6357600c5550565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b6044820152606401610af2565b6060600380546106f490611ff1565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610d20848484610873565b6001600160a01b0383163b15610d5957610d3c848484846116f1565b610d59576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060610d6a82611515565b610d8757604051630a14c4b560e41b815260040160405180910390fd5b6000610d916117dd565b90508051600003610db15760405180602001604052806000815250610a6f565b80610dbb846117ec565b604051602001610dcc9291906121f1565b6040516020818303038152906040529392505050565b600e54610100900460ff16610e2e5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610af2565b3360009081526010602052604090205460ff1615610e8e5760405162461bcd60e51b815260206004820152601960248201527f43616c6c65722068617320616c7265616479206d696e746564000000000000006044820152606401610af2565b8160ff1660011480610ea357508160ff166002145b15610efe57610eb2828261135d565b610efe5760405162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206973206e6f7420696e207468652077686974656c69737400006044820152606401610af2565b8160ff16600103610f6c57600954421015610f675760405162461bcd60e51b8152602060048201526024808201527f53616c6520686173206e6f74207374617274656420666f722077686974656c696044820152637374204160e01b6064820152608401610af2565b61103e565b8160ff16600203610fd557600a54421015610f675760405162461bcd60e51b8152602060048201526024808201527f53616c6520686173206e6f74207374617274656420666f722077686974656c6960448201526339ba102160e11b6064820152608401610af2565b8160ff16600303610c6357600b54421015610f675760405162461bcd60e51b8152602060048201526024808201527f53616c6520686173206e6f74207374617274656420666f72207075626c69632060448201526373616c6560e01b6064820152608401610af2565b600183111561108f5760405162461bcd60e51b815260206004820152601f60248201527f43616e206f6e6c79206d696e74203120746f6b656e20617420612074696d65006044820152606401610af2565b6103e7836110a06001546000540390565b6110aa9190612236565b111561110e5760405162461bcd60e51b815260206004820152602d60248201527f507572636861736520776f756c6420657863656564206d617820737570706c7960448201526c206f66204b6f6e71756573747360981b6064820152608401610af2565b3461112084668e1bc9bf040000612249565b111561116e5760405162461bcd60e51b815260206004820152601f60248201527f45746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610af2565b6111783384611685565b336000908152601060205260409020805460ff191660011790556012541580156111bb57506103e76111ad6001546000540390565b14806111bb5750600c544210155b15610b315743601255505050565b601354156112195760405162461bcd60e51b815260206004820152601d60248201527f5374617274696e6720696e64657820697320616c7265616479207365740000006044820152606401610af2565b60125460000361126b5760405162461bcd60e51b815260206004820181905260248201527f5374617274696e6720696e64657820626c6f636b206d757374206265207365746044820152606401610af2565b60125461127c906103e79040612268565b60135560125460ff9061128f904361228a565b11156112b2576103e76112a360014361228a565b6112ae919040612268565b6013555b601354600003610bb7576013546112ca906001612236565b601355565b600d80546112dc90611ff1565b80601f016020809104026020016040519081016040528092919081815260200182805461130890611ff1565b80156113555780601f1061132a57610100808354040283529160200191611355565b820191906000526020600020905b81548152906001019060200180831161133857829003601f168201915b505050505081565b604080513360601b6bffffffffffffffffffffffff191660208083019190915260f885901b6001600160f81b0319166034830152825160158184030181526035830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006055840152607180840182905284518085039091018152609190930190935281519101206000919060008060006113fe87611830565b925092509250600060018583868660405160008152602001604052604051611442949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611464573d6000803e3d6000fd5b5050506020604051035190506114826008546001600160a01b031690565b6001600160a01b0391821691161498975050505050505050565b6114a461153c565b6001600160a01b0381166115095760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610af2565b6115128161169f565b50565b60008054821080156106df575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b03163314610bb75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610af2565b6000816000548110156115e45760008181526004602052604081205490600160e01b821690036115e2575b80600003610a6f5750600019016000818152600460205260409020546115c1565b505b604051636f96cda160e11b815260040160405180910390fd5b60005b81811015611672576116336116158285612236565b6001600160a01b0387166000908152601160205260409020906118a4565b5061165f6116418285612236565b6001600160a01b0386166000908152601160205260409020906118b0565b508061166a8161229d565b915050611600565b5050505050565b6000610a6f83836118bc565b61086f8282604051806020016040528060008152506118e6565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906117269033908990889088906004016122b6565b6020604051808303816000875af1925050508015611761575060408051601f3d908101601f1916820190925261175e918101906122f3565b60015b6117bf573d80801561178f576040519150601f19603f3d011682016040523d82523d6000602084013e611794565b606091505b5080516000036117b7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060600f80546106f490611ff1565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806118065750819003601f19909101908152919050565b600080600083516041146118865760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610af2565b50505060208101516040820151606090920151909260009190911a90565b6000610a6f838361194c565b6000610a6f8383611a3f565b60008260000182815481106118d3576118d3612310565b9060005260206000200154905092915050565b6118f08383611a8e565b6001600160a01b0383163b15610b31576000548281035b61191a60008683806001019450866116f1565b611937576040516368d2bf6b60e11b815260040160405180910390fd5b81811061190757816000541461167257600080fd5b60008181526001830160205260408120548015611a3557600061197060018361228a565b85549091506000906119849060019061228a565b90508181146119e95760008660000182815481106119a4576119a4612310565b90600052602060002001549050808760000184815481106119c7576119c7612310565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806119fa576119fa612326565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106df565b60009150506106df565b6000818152600183016020526040812054611a86575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106df565b5060006106df565b6000805490829003611ab35760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611b6257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611b2a565b5081600003611b8357604051622e076360e81b815260040160405180910390fd5b6000908155610b3191508483856115fd565b6001600160e01b03198116811461151257600080fd5b600060208284031215611bbd57600080fd5b8135610a6f81611b95565b60005b83811015611be3578181015183820152602001611bcb565b50506000910152565b60008151808452611c04816020860160208601611bc8565b601f01601f19169290920160200192915050565b602081526000610a6f6020830184611bec565b600060208284031215611c3d57600080fd5b5035919050565b80356001600160a01b0381168114611c5b57600080fd5b919050565b60008060408385031215611c7357600080fd5b611c7c83611c44565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611cbb57611cbb611c8a565b604051601f8501601f19908116603f01168101908282118183101715611ce357611ce3611c8a565b81604052809350858152868686011115611cfc57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611d2857600080fd5b813567ffffffffffffffff811115611d3f57600080fd5b8201601f81018413611d5057600080fd5b6117d584823560208401611ca0565b600080600060608486031215611d7457600080fd5b611d7d84611c44565b9250611d8b60208501611c44565b9150604084013590509250925092565b60008060208385031215611dae57600080fd5b823567ffffffffffffffff80821115611dc657600080fd5b818501915085601f830112611dda57600080fd5b813581811115611de957600080fd5b866020828501011115611dfb57600080fd5b60209290920196919550909350505050565b600060208284031215611e1f57600080fd5b610a6f82611c44565b803560ff81168114611c5b57600080fd5b60008060408385031215611e4c57600080fd5b611c7c83611e28565b60008060408385031215611e6857600080fd5b611e7183611c44565b915060208301358015158114611e8657600080fd5b809150509250929050565b600082601f830112611ea257600080fd5b610a6f83833560208501611ca0565b60008060008060808587031215611ec757600080fd5b611ed085611c44565b9350611ede60208601611c44565b925060408501359150606085013567ffffffffffffffff811115611f0157600080fd5b611f0d87828801611e91565b91505092959194509250565b600080600060608486031215611f2e57600080fd5b83359250611f3e60208501611e28565b9150604084013567ffffffffffffffff811115611f5a57600080fd5b611f6686828701611e91565b9150509250925092565b60008060408385031215611f8357600080fd5b611f8c83611c44565b9150611f9a60208401611c44565b90509250929050565b60008060408385031215611fb657600080fd5b611fbf83611e28565b9150602083013567ffffffffffffffff811115611fdb57600080fd5b611fe785828601611e91565b9150509250929050565b600181811c9082168061200557607f821691505b60208210810361202557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610b3157600081815260208120601f850160051c810160208610156120525750805b601f850160051c820191505b81811015610a105782815560010161205e565b815167ffffffffffffffff81111561208b5761208b611c8a565b61209f816120998454611ff1565b8461202b565b602080601f8311600181146120d457600084156120bc5750858301515b600019600386901b1c1916600185901b178555610a10565b600085815260208120601f198616915b82811015612103578886015182559484019460019091019084016120e4565b50858210156121215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff83111561214957612149611c8a565b61215d836121578354611ff1565b8361202b565b6000601f84116001811461219157600085156121795750838201355b600019600387901b1c1916600186901b178355611672565b600083815260209020601f19861690835b828110156121c257868501358255602094850194600190920191016121a2565b50868210156121df5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008351612203818460208801611bc8565b835190830190612217818360208801611bc8565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106df576106df612220565b600081600019048311821515161561226357612263612220565b500290565b60008261228557634e487b7160e01b600052601260045260246000fd5b500690565b818103818111156106df576106df612220565b6000600182016122af576122af612220565b5060010190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906122e990830184611bec565b9695505050505050565b60006020828403121561230557600080fd5b8151610a6f81611b95565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c47466dec00afa329d29f948f7d22b87e2c745df4422616b497405a5ce65fee664736f6c63430008100033
Deployed Bytecode
0x6080604052600436106102305760003560e01c806370a082311161012e578063c87b56dd116100ab578063e98665501161006f578063e98665501461060a578063e9dcc14b1461061f578063eb8d244414610634578063eec572bf14610653578063f2fde38b1461067357600080fd5b8063c87b56dd14610562578063cb774d4714610582578063e36d649814610598578063e981a7b7146105ae578063e985e9c5146105c157600080fd5b8063946807fd116100f2578063946807fd146104ea57806395d89b4114610500578063a22cb46514610515578063b48a53cf14610535578063b88d4fde1461054f57600080fd5b806370a0823114610462578063715018a6146104825780637d17fcbe146104975780638c7e7df7146104ac5780638da5cb5b146104cc57600080fd5b80631fe5e05f116101bc57806335675c401161018057806335675c40146103e557806342842e0e146103fa578063474071561461040d57806355f804b3146104225780636352211e1461044257600080fd5b80631fe5e05f1461036757806323b872dd1461037d5780632e1a7d4d146103905780632f745c59146103b057806334918dfd146103d057600080fd5b8063095ea7b311610203578063095ea7b3146102ed578063109695231461030257806318160ddd1461032257806318e20a381461033b5780631e4a926b1461035157600080fd5b806301ffc9a71461023557806306aa9e4a1461026a57806306fdde0314610293578063081812fc146102b5575b600080fd5b34801561024157600080fd5b50610255610250366004611bab565b610693565b60405190151581526020015b60405180910390f35b34801561027657600080fd5b50610285668e1bc9bf04000081565b604051908152602001610261565b34801561029f57600080fd5b506102a86106e5565b6040516102619190611c18565b3480156102c157600080fd5b506102d56102d0366004611c2b565b610777565b6040516001600160a01b039091168152602001610261565b6103006102fb366004611c60565b6107bb565b005b34801561030e57600080fd5b5061030061031d366004611d16565b61085b565b34801561032e57600080fd5b5060015460005403610285565b34801561034757600080fd5b50610285600c5481565b34801561035d57600080fd5b5061028560095481565b34801561037357600080fd5b50610285600a5481565b61030061038b366004611d5f565b610873565b34801561039c57600080fd5b506103006103ab366004611c2b565b610a18565b3480156103bc57600080fd5b506102856103cb366004611c60565b610a4d565b3480156103dc57600080fd5b50610300610a76565b3480156103f157600080fd5b50610300610a9b565b610300610408366004611d5f565b610b16565b34801561041957600080fd5b50610285600181565b34801561042e57600080fd5b5061030061043d366004611d9b565b610b36565b34801561044e57600080fd5b506102d561045d366004611c2b565b610b4b565b34801561046e57600080fd5b5061028561047d366004611e0d565b610b56565b34801561048e57600080fd5b50610300610ba5565b3480156104a357600080fd5b50610300610bb9565b3480156104b857600080fd5b506103006104c7366004611e39565b610c17565b3480156104d857600080fd5b506008546001600160a01b03166102d5565b3480156104f657600080fd5b50610285600b5481565b34801561050c57600080fd5b506102a8610c9a565b34801561052157600080fd5b50610300610530366004611e55565b610ca9565b34801561054157600080fd5b50600e546102559060ff1681565b61030061055d366004611eb1565b610d15565b34801561056e57600080fd5b506102a861057d366004611c2b565b610d5f565b34801561058e57600080fd5b5061028560135481565b3480156105a457600080fd5b5061028560125481565b6103006105bc366004611f19565b610de2565b3480156105cd57600080fd5b506102556105dc366004611f70565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561061657600080fd5b506103006111c9565b34801561062b57600080fd5b506102a86112cf565b34801561064057600080fd5b50600e5461025590610100900460ff1681565b34801561065f57600080fd5b5061025561066e366004611fa3565b61135d565b34801561067f57600080fd5b5061030061068e366004611e0d565b61149c565b60006301ffc9a760e01b6001600160e01b0319831614806106c457506380ac58cd60e01b6001600160e01b03198316145b806106df5750635b5e139f60e01b6001600160e01b03198316145b92915050565b6060600280546106f490611ff1565b80601f016020809104026020016040519081016040528092919081815260200182805461072090611ff1565b801561076d5780601f106107425761010080835404028352916020019161076d565b820191906000526020600020905b81548152906001019060200180831161075057829003601f168201915b5050505050905090565b600061078282611515565b61079f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006107c682610b4b565b9050336001600160a01b038216146107ff576107e281336105dc565b6107ff576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61086361153c565b600d61086f8282612071565b5050565b600061087e82611596565b9050836001600160a01b0316816001600160a01b0316146108b15760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176108fe576108e186336105dc565b6108fe57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661092557604051633a954ecd60e21b815260040160405180910390fd5b801561093057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036109c2576001840160008181526004602052604081205490036109c05760005481146109c05760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610a1086868660016115fd565b505050505050565b610a2061153c565b604051339082156108fc029083906000818181858888f1935050505015801561086f573d6000803e3d6000fd5b6001600160a01b0382166000908152601160205260408120610a6f9083611679565b9392505050565b610a7e61153c565b600e805461ff001981166101009182900460ff1615909102179055565b610aa361153c565b600e5460ff1615610afb5760405162461bcd60e51b815260206004820152601c60248201527f4b6f6e717565737420697320616c72656164792072657365727665640000000060448201526064015b60405180910390fd5b610b073361012b611685565b600e805460ff19166001179055565b610b3183838360405180602001604052806000815250610d15565b505050565b610b3e61153c565b600f610b31828483612131565b60006106df82611596565b60006001600160a01b038216610b7f576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b610bad61153c565b610bb7600061169f565b565b610bc161153c565b60135415610c115760405162461bcd60e51b815260206004820152601d60248201527f5374617274696e6720696e64657820697320616c7265616479207365740000006044820152606401610af2565b43601255565b610c1f61153c565b8160ff16600103610c305760095550565b8160ff16600203610c4157600a5550565b8160ff16600303610c5257600b5550565b8160ff16600403610c6357600c5550565b60405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b6044820152606401610af2565b6060600380546106f490611ff1565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610d20848484610873565b6001600160a01b0383163b15610d5957610d3c848484846116f1565b610d59576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6060610d6a82611515565b610d8757604051630a14c4b560e41b815260040160405180910390fd5b6000610d916117dd565b90508051600003610db15760405180602001604052806000815250610a6f565b80610dbb846117ec565b604051602001610dcc9291906121f1565b6040516020818303038152906040529392505050565b600e54610100900460ff16610e2e5760405162461bcd60e51b815260206004820152601260248201527153616c65206973206e6f742061637469766560701b6044820152606401610af2565b3360009081526010602052604090205460ff1615610e8e5760405162461bcd60e51b815260206004820152601960248201527f43616c6c65722068617320616c7265616479206d696e746564000000000000006044820152606401610af2565b8160ff1660011480610ea357508160ff166002145b15610efe57610eb2828261135d565b610efe5760405162461bcd60e51b815260206004820152601e60248201527f43616c6c6572206973206e6f7420696e207468652077686974656c69737400006044820152606401610af2565b8160ff16600103610f6c57600954421015610f675760405162461bcd60e51b8152602060048201526024808201527f53616c6520686173206e6f74207374617274656420666f722077686974656c696044820152637374204160e01b6064820152608401610af2565b61103e565b8160ff16600203610fd557600a54421015610f675760405162461bcd60e51b8152602060048201526024808201527f53616c6520686173206e6f74207374617274656420666f722077686974656c6960448201526339ba102160e11b6064820152608401610af2565b8160ff16600303610c6357600b54421015610f675760405162461bcd60e51b8152602060048201526024808201527f53616c6520686173206e6f74207374617274656420666f72207075626c69632060448201526373616c6560e01b6064820152608401610af2565b600183111561108f5760405162461bcd60e51b815260206004820152601f60248201527f43616e206f6e6c79206d696e74203120746f6b656e20617420612074696d65006044820152606401610af2565b6103e7836110a06001546000540390565b6110aa9190612236565b111561110e5760405162461bcd60e51b815260206004820152602d60248201527f507572636861736520776f756c6420657863656564206d617820737570706c7960448201526c206f66204b6f6e71756573747360981b6064820152608401610af2565b3461112084668e1bc9bf040000612249565b111561116e5760405162461bcd60e51b815260206004820152601f60248201527f45746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610af2565b6111783384611685565b336000908152601060205260409020805460ff191660011790556012541580156111bb57506103e76111ad6001546000540390565b14806111bb5750600c544210155b15610b315743601255505050565b601354156112195760405162461bcd60e51b815260206004820152601d60248201527f5374617274696e6720696e64657820697320616c7265616479207365740000006044820152606401610af2565b60125460000361126b5760405162461bcd60e51b815260206004820181905260248201527f5374617274696e6720696e64657820626c6f636b206d757374206265207365746044820152606401610af2565b60125461127c906103e79040612268565b60135560125460ff9061128f904361228a565b11156112b2576103e76112a360014361228a565b6112ae919040612268565b6013555b601354600003610bb7576013546112ca906001612236565b601355565b600d80546112dc90611ff1565b80601f016020809104026020016040519081016040528092919081815260200182805461130890611ff1565b80156113555780601f1061132a57610100808354040283529160200191611355565b820191906000526020600020905b81548152906001019060200180831161133857829003601f168201915b505050505081565b604080513360601b6bffffffffffffffffffffffff191660208083019190915260f885901b6001600160f81b0319166034830152825160158184030181526035830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006055840152607180840182905284518085039091018152609190930190935281519101206000919060008060006113fe87611830565b925092509250600060018583868660405160008152602001604052604051611442949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611464573d6000803e3d6000fd5b5050506020604051035190506114826008546001600160a01b031690565b6001600160a01b0391821691161498975050505050505050565b6114a461153c565b6001600160a01b0381166115095760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610af2565b6115128161169f565b50565b60008054821080156106df575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b03163314610bb75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610af2565b6000816000548110156115e45760008181526004602052604081205490600160e01b821690036115e2575b80600003610a6f5750600019016000818152600460205260409020546115c1565b505b604051636f96cda160e11b815260040160405180910390fd5b60005b81811015611672576116336116158285612236565b6001600160a01b0387166000908152601160205260409020906118a4565b5061165f6116418285612236565b6001600160a01b0386166000908152601160205260409020906118b0565b508061166a8161229d565b915050611600565b5050505050565b6000610a6f83836118bc565b61086f8282604051806020016040528060008152506118e6565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906117269033908990889088906004016122b6565b6020604051808303816000875af1925050508015611761575060408051601f3d908101601f1916820190925261175e918101906122f3565b60015b6117bf573d80801561178f576040519150601f19603f3d011682016040523d82523d6000602084013e611794565b606091505b5080516000036117b7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060600f80546106f490611ff1565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806118065750819003601f19909101908152919050565b600080600083516041146118865760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610af2565b50505060208101516040820151606090920151909260009190911a90565b6000610a6f838361194c565b6000610a6f8383611a3f565b60008260000182815481106118d3576118d3612310565b9060005260206000200154905092915050565b6118f08383611a8e565b6001600160a01b0383163b15610b31576000548281035b61191a60008683806001019450866116f1565b611937576040516368d2bf6b60e11b815260040160405180910390fd5b81811061190757816000541461167257600080fd5b60008181526001830160205260408120548015611a3557600061197060018361228a565b85549091506000906119849060019061228a565b90508181146119e95760008660000182815481106119a4576119a4612310565b90600052602060002001549050808760000184815481106119c7576119c7612310565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806119fa576119fa612326565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106df565b60009150506106df565b6000818152600183016020526040812054611a86575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106df565b5060006106df565b6000805490829003611ab35760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611b6257808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611b2a565b5081600003611b8357604051622e076360e81b815260040160405180910390fd5b6000908155610b3191508483856115fd565b6001600160e01b03198116811461151257600080fd5b600060208284031215611bbd57600080fd5b8135610a6f81611b95565b60005b83811015611be3578181015183820152602001611bcb565b50506000910152565b60008151808452611c04816020860160208601611bc8565b601f01601f19169290920160200192915050565b602081526000610a6f6020830184611bec565b600060208284031215611c3d57600080fd5b5035919050565b80356001600160a01b0381168114611c5b57600080fd5b919050565b60008060408385031215611c7357600080fd5b611c7c83611c44565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611cbb57611cbb611c8a565b604051601f8501601f19908116603f01168101908282118183101715611ce357611ce3611c8a565b81604052809350858152868686011115611cfc57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611d2857600080fd5b813567ffffffffffffffff811115611d3f57600080fd5b8201601f81018413611d5057600080fd5b6117d584823560208401611ca0565b600080600060608486031215611d7457600080fd5b611d7d84611c44565b9250611d8b60208501611c44565b9150604084013590509250925092565b60008060208385031215611dae57600080fd5b823567ffffffffffffffff80821115611dc657600080fd5b818501915085601f830112611dda57600080fd5b813581811115611de957600080fd5b866020828501011115611dfb57600080fd5b60209290920196919550909350505050565b600060208284031215611e1f57600080fd5b610a6f82611c44565b803560ff81168114611c5b57600080fd5b60008060408385031215611e4c57600080fd5b611c7c83611e28565b60008060408385031215611e6857600080fd5b611e7183611c44565b915060208301358015158114611e8657600080fd5b809150509250929050565b600082601f830112611ea257600080fd5b610a6f83833560208501611ca0565b60008060008060808587031215611ec757600080fd5b611ed085611c44565b9350611ede60208601611c44565b925060408501359150606085013567ffffffffffffffff811115611f0157600080fd5b611f0d87828801611e91565b91505092959194509250565b600080600060608486031215611f2e57600080fd5b83359250611f3e60208501611e28565b9150604084013567ffffffffffffffff811115611f5a57600080fd5b611f6686828701611e91565b9150509250925092565b60008060408385031215611f8357600080fd5b611f8c83611c44565b9150611f9a60208401611c44565b90509250929050565b60008060408385031215611fb657600080fd5b611fbf83611e28565b9150602083013567ffffffffffffffff811115611fdb57600080fd5b611fe785828601611e91565b9150509250929050565b600181811c9082168061200557607f821691505b60208210810361202557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610b3157600081815260208120601f850160051c810160208610156120525750805b601f850160051c820191505b81811015610a105782815560010161205e565b815167ffffffffffffffff81111561208b5761208b611c8a565b61209f816120998454611ff1565b8461202b565b602080601f8311600181146120d457600084156120bc5750858301515b600019600386901b1c1916600185901b178555610a10565b600085815260208120601f198616915b82811015612103578886015182559484019460019091019084016120e4565b50858210156121215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b67ffffffffffffffff83111561214957612149611c8a565b61215d836121578354611ff1565b8361202b565b6000601f84116001811461219157600085156121795750838201355b600019600387901b1c1916600186901b178355611672565b600083815260209020601f19861690835b828110156121c257868501358255602094850194600190920191016121a2565b50868210156121df5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008351612203818460208801611bc8565b835190830190612217818360208801611bc8565b01949350505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106df576106df612220565b600081600019048311821515161561226357612263612220565b500290565b60008261228557634e487b7160e01b600052601260045260246000fd5b500690565b818103818111156106df576106df612220565b6000600182016122af576122af612220565b5060010190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906122e990830184611bec565b9695505050505050565b60006020828403121561230557600080fd5b8151610a6f81611b95565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c47466dec00afa329d29f948f7d22b87e2c745df4422616b497405a5ce65fee664736f6c63430008100033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.