Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
1,429 KDKEY
Holders
451
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 KDKEYLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
KultDolceKeys
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { MerkleProof } from "lib/openzeppelin-contracts/contracts/utils/cryptography/MerkleProof.sol"; import { ReentrancyGuard } from "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol"; import { Address } from "lib/openzeppelin-contracts/contracts/utils/Address.sol"; import { ERC721ContractMetadata } from "./ERC721ContractMetadata.sol"; contract KultDolceKeys is ERC721ContractMetadata, ReentrancyGuard { mapping(address => bool) public whitelistMinted; bytes32 public whitelistMerkleRoot; bool public whitelistMintActive; function _canMint(uint256 quantity) internal view { require(_totalMinted() <= maxSupply(), "REACHED_MAX_SUPPLY"); require(quantity > 0, "QUANTITY_LESS_THAN_ONE"); require( _totalMinted() + quantity <= maxSupply(), "QUANTITY_EXCEEDED_MAX_SUPPLY" ); } constructor( string memory name, string memory symbol, uint256 reserve ) ERC721ContractMetadata(name, symbol) { _safeMint(msg.sender, reserve); } function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { whitelistMerkleRoot = merkleRoot; } function setMintActive( bool _whitelistMintActive ) external nonReentrant onlyOwner { whitelistMintActive = _whitelistMintActive; } // Custom mints function mintWhitelist( bytes32[] calldata whitelistMerkleProof, uint256 quantity ) external nonReentrant { _canMint(quantity); require(whitelistMintActive, "WHITELIST_MINT_INACTIVE"); require(!whitelistMinted[msg.sender], "ALREADY_MINTED"); require( MerkleProof.verify( whitelistMerkleProof, whitelistMerkleRoot, keccak256(abi.encodePacked(msg.sender, quantity)) ), "INVALID_MERKLE_PROOF" ); _safeMint(msg.sender, quantity); whitelistMinted[msg.sender] = true; } function mintTreasury(uint256 quantity) external nonReentrant onlyOwner { _canMint(quantity); _safeMint(msg.sender, quantity); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // 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 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 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 virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__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 // ERC721A Contracts v4.2.2 // 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; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; /** * @author emo.eth * @notice Abstract smart contract that provides an onlyUninitialized modifier which only allows calling when * from within a constructor of some sort, whether directly instantiating an inherting contract, * or when delegatecalling from a proxy */ abstract contract ConstructorInitializable { error AlreadyInitialized(); modifier onlyConstructor() { if (address(this).code.length != 0) { revert AlreadyInitialized(); } _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import {ConstructorInitializable} from "./ConstructorInitializable.sol"; /** @notice A two-step extension of Ownable, where the new owner must claim ownership of the contract after owner initiates transfer Owner can cancel the transfer at any point before the new owner claims ownership. Helpful in guarding against transferring ownership to an address that is unable to act as the Owner. */ abstract contract TwoStepOwnable is ConstructorInitializable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); address internal potentialOwner; event PotentialOwnerUpdated(address newPotentialAdministrator); error NewOwnerIsZeroAddress(); error NotNextOwner(); error OnlyOwner(); modifier onlyOwner() { _checkOwner(); _; } constructor() { _initialize(); } function _initialize() private onlyConstructor { _transferOwnership(msg.sender); } ///@notice Initiate ownership transfer to newPotentialOwner. Note: new owner will have to manually acceptOwnership ///@param newPotentialOwner address of potential new owner function transferOwnership(address newPotentialOwner) public virtual onlyOwner { if (newPotentialOwner == address(0)) { revert NewOwnerIsZeroAddress(); } potentialOwner = newPotentialOwner; emit PotentialOwnerUpdated(newPotentialOwner); } ///@notice Claim ownership of smart contract, after the current owner has initiated the process with transferOwnership function acceptOwnership() public virtual { address _potentialOwner = potentialOwner; if (msg.sender != _potentialOwner) { revert NotNextOwner(); } delete potentialOwner; emit PotentialOwnerUpdated(address(0)); _transferOwnership(_potentialOwner); } ///@notice cancel ownership transfer function cancelOwnershipTransfer() public virtual onlyOwner { delete potentialOwner; emit PotentialOwnerUpdated(address(0)); } function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (_owner != msg.sender) { revert OnlyOwner(); } } /** * @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`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { ISeaDropTokenContractMetadata } from "./interfaces/ISeaDropTokenContractMetadata.sol"; import { ERC721A } from "lib/ERC721A/contracts/ERC721A.sol"; import { TwoStepOwnable } from "lib/utility-contracts/src/TwoStepOwnable.sol"; import { IERC2981 } from "lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol"; import { IERC165 } from "lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol"; /** * @title ERC721ContractMetadata * @author James Wenzel (emo.eth) * @author Ryan Ghods (ralxz.eth) * @author Stephan Min (stephanm.eth) * @notice ERC721ContractMetadata is a token contract that extends ERC721A * with additional metadata and ownership capabilities. */ contract ERC721ContractMetadata is ERC721A, TwoStepOwnable, ISeaDropTokenContractMetadata { /// @notice Track the max supply. uint256 _maxSupply; /// @notice Track the base URI for token metadata. string _tokenBaseURI; /// @notice Track the contract URI for contract metadata. string _contractURI; /// @notice Track the provenance hash for guaranteeing metadata order /// for random reveals. bytes32 _provenanceHash; /// @notice Track the royalty info: address to receive royalties, and /// royalty basis points. RoyaltyInfo _royaltyInfo; /** * @dev Reverts if the sender is not the owner or the contract itself. * This function is inlined instead of being a modifier * to save contract space from being inlined N times. */ function _onlyOwnerOrSelf() internal view { if ( _cast(msg.sender == owner()) | _cast(msg.sender == address(this)) == 0 ) { revert OnlyOwner(); } } /** * @notice Deploy the token contract with its name and symbol. */ constructor(string memory name, string memory symbol) ERC721A(name, symbol) {} /** * @notice Sets the base URI for the token metadata and emits an event. * * @param newBaseURI The new base URI to set. */ function setBaseURI(string calldata newBaseURI) external override { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Set the new base URI. _tokenBaseURI = newBaseURI; // Emit an event with the update. if (totalSupply() != 0) { emit BatchMetadataUpdate(1, _nextTokenId() - 1); } } /** * @notice Sets the contract URI for contract metadata. * * @param newContractURI The new contract URI. */ function setContractURI(string calldata newContractURI) external override { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Set the new contract URI. _contractURI = newContractURI; // Emit an event with the update. emit ContractURIUpdated(newContractURI); } /** * @notice Emit an event notifying metadata updates for * a range of token ids, according to EIP-4906. * * @param fromTokenId The start token id. * @param toTokenId The end token id. */ function emitBatchMetadataUpdate(uint256 fromTokenId, uint256 toTokenId) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Emit an event with the update. emit BatchMetadataUpdate(fromTokenId, toTokenId); } /** * @notice Sets the max token supply and emits an event. * * @param newMaxSupply The new max supply to set. */ function setMaxSupply(uint256 newMaxSupply) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Ensure the max supply does not exceed the maximum value of uint64. if (newMaxSupply > 2**64 - 1) { revert CannotExceedMaxSupplyOfUint64(newMaxSupply); } // Set the new max supply. _maxSupply = newMaxSupply; // Emit an event with the update. emit MaxSupplyUpdated(newMaxSupply); } /** * @notice Sets the provenance hash and emits an event. * * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it has not been * modified after mint started. * * This function will revert after the first item has been minted. * * @param newProvenanceHash The new provenance hash to set. */ function setProvenanceHash(bytes32 newProvenanceHash) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Revert if any items have been minted. if (_totalMinted() > 0) { revert ProvenanceHashCannotBeSetAfterMintStarted(); } // Keep track of the old provenance hash for emitting with the event. bytes32 oldProvenanceHash = _provenanceHash; // Set the new provenance hash. _provenanceHash = newProvenanceHash; // Emit an event with the update. emit ProvenanceHashUpdated(oldProvenanceHash, newProvenanceHash); } /** * @notice Sets the address and basis points for royalties. * * @param newInfo The struct to configure royalties. */ function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external { // Ensure the sender is only the owner or contract itself. _onlyOwnerOrSelf(); // Revert if the new royalty address is the zero address. if (newInfo.royaltyAddress == address(0)) { revert RoyaltyAddressCannotBeZeroAddress(); } // Revert if the new basis points is greater than 10_000. if (newInfo.royaltyBps > 10_000) { revert InvalidRoyaltyBasisPoints(newInfo.royaltyBps); } // Set the new royalty info. _royaltyInfo = newInfo; // Emit an event with the updated params. emit RoyaltyInfoUpdated(newInfo.royaltyAddress, newInfo.royaltyBps); } /** * @notice Returns the base URI for token metadata. */ function baseURI() external view override returns (string memory) { return _baseURI(); } /** * @notice Returns the base URI for the contract, which ERC721A uses * to return tokenURI. */ function _baseURI() internal view virtual override returns (string memory) { return _tokenBaseURI; } /** * @notice Returns the contract URI for contract metadata. */ function contractURI() external view override returns (string memory) { return _contractURI; } /** * @notice Returns the max token supply. */ function maxSupply() public view returns (uint256) { return _maxSupply; } /** * @notice Returns the provenance hash. * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it is unmodified * after mint has started. */ function provenanceHash() external view override returns (bytes32) { return _provenanceHash; } /** * @notice Returns the address that receives royalties. */ function royaltyAddress() external view returns (address) { return _royaltyInfo.royaltyAddress; } /** * @notice Returns the royalty basis points out of 10_000. */ function royaltyBasisPoints() external view returns (uint256) { return _royaltyInfo.royaltyBps; } /** * @notice Called with the sale price to determine how much royalty * is owed and to whom. * * @ param _tokenId The NFT asset queried for royalty information. * @param _salePrice The sale price of the NFT asset specified by * _tokenId. * * @return receiver Address of who should be sent the royalty payment. * @return royaltyAmount The royalty payment amount for _salePrice. */ function royaltyInfo( uint256, /* _tokenId */ uint256 _salePrice ) external view returns (address receiver, uint256 royaltyAmount) { // Put the royalty info on the stack for more efficient access. RoyaltyInfo storage info = _royaltyInfo; // Set the royalty amount to the sale price times the royalty basis // points divided by 10_000. royaltyAmount = (_salePrice * info.royaltyBps) / 10_000; // Set the receiver of the royalty. receiver = info.royaltyAddress; } /** * @notice Returns whether the interface is supported. * * @param interfaceId The interface id to check against. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721A) returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == 0x49064906 || // ERC-4906 super.supportsInterface(interfaceId); } /** * @dev Internal pure function to cast a `bool` value to a `uint256` value. * * @param b The `bool` value to cast. * * @return u The `uint256` value. */ function _cast(bool b) internal pure returns (uint256 u) { assembly { u := b } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import { IERC2981 } from "lib/openzeppelin-contracts/contracts/interfaces/IERC2981.sol"; interface ISeaDropTokenContractMetadata is IERC2981 { /** * @notice Throw if the max supply exceeds uint64, a limit * due to the storage of bit-packed variables in ERC721A. */ error CannotExceedMaxSupplyOfUint64(uint256 newMaxSupply); /** * @dev Revert with an error when attempting to set the provenance * hash after the mint has started. */ error ProvenanceHashCannotBeSetAfterMintStarted(); /** * @dev Revert if the royalty basis points is greater than 10_000. */ error InvalidRoyaltyBasisPoints(uint256 basisPoints); /** * @dev Revert if the royalty address is being set to the zero address. */ error RoyaltyAddressCannotBeZeroAddress(); /** * @dev Emit an event for token metadata reveals/updates, * according to EIP-4906. * * @param _fromTokenId The start token id. * @param _toTokenId The end token id. */ event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); /** * @dev Emit an event when the URI for the collection-level metadata * is updated. */ event ContractURIUpdated(string newContractURI); /** * @dev Emit an event when the max token supply is updated. */ event MaxSupplyUpdated(uint256 newMaxSupply); /** * @dev Emit an event with the previous and new provenance hash after * being updated. */ event ProvenanceHashUpdated(bytes32 previousHash, bytes32 newHash); /** * @dev Emit an event when the royalties info is updated. */ event RoyaltyInfoUpdated(address receiver, uint256 bps); /** * @notice A struct defining royalty info for the contract. */ struct RoyaltyInfo { address royaltyAddress; uint96 royaltyBps; } /** * @notice Sets the base URI for the token metadata and emits an event. * * @param tokenURI The new base URI to set. */ function setBaseURI(string calldata tokenURI) external; /** * @notice Sets the contract URI for contract metadata. * * @param newContractURI The new contract URI. */ function setContractURI(string calldata newContractURI) external; /** * @notice Sets the max supply and emits an event. * * @param newMaxSupply The new max supply to set. */ function setMaxSupply(uint256 newMaxSupply) external; /** * @notice Sets the provenance hash and emits an event. * * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it has not been * modified after mint started. * * This function will revert after the first item has been minted. * * @param newProvenanceHash The new provenance hash to set. */ function setProvenanceHash(bytes32 newProvenanceHash) external; /** * @notice Sets the address and basis points for royalties. * * @param newInfo The struct to configure royalties. */ function setRoyaltyInfo(RoyaltyInfo calldata newInfo) external; /** * @notice Returns the base URI for token metadata. */ function baseURI() external view returns (string memory); /** * @notice Returns the contract URI. */ function contractURI() external view returns (string memory); /** * @notice Returns the max token supply. */ function maxSupply() external view returns (uint256); /** * @notice Returns the provenance hash. * The provenance hash is used for random reveals, which * is a hash of the ordered metadata to show it is unmodified * after mint has started. */ function provenanceHash() external view returns (bytes32); /** * @notice Returns the address that receives royalties. */ function royaltyAddress() external view returns (address); /** * @notice Returns the royalty basis points out of 10_000. */ function royaltyBasisPoints() external view returns (uint256); }
{ "viaIR": false, "optimizer": { "enabled": true, "runs": 1000000 }, "metadata": { "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"reserve","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"CannotExceedMaxSupplyOfUint64","type":"error"},{"inputs":[{"internalType":"uint256","name":"basisPoints","type":"uint256"}],"name":"InvalidRoyaltyBasisPoints","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NotNextOwner","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ProvenanceHashCannotBeSetAfterMintStarted","type":"error"},{"inputs":[],"name":"RoyaltyAddressCannotBeZeroAddress","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":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newContractURI","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"MaxSupplyUpdated","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":false,"internalType":"address","name":"newPotentialAdministrator","type":"address"}],"name":"PotentialOwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"previousHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newHash","type":"bytes32"}],"name":"ProvenanceHashUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"bps","type":"uint256"}],"name":"RoyaltyInfoUpdated","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":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"internalType":"uint256","name":"toTokenId","type":"uint256"}],"name":"emitBatchMetadataUpdate","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":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"whitelistMerkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintWhitelist","outputs":[],"stateMutability":"nonpayable","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":"provenanceHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyBasisPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_whitelistMintActive","type":"bool"}],"name":"setMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newProvenanceHash","type":"bytes32"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint96","name":"royaltyBps","type":"uint96"}],"internalType":"struct ISeaDropTokenContractMetadata.RoyaltyInfo","name":"newInfo","type":"tuple"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002f7c38038062002f7c83398101604081905262000034916200043f565b82828181600262000046838262000540565b50600362000055828262000540565b505060008055506200006662000082565b50506001600f55620000793382620000af565b50505062000695565b303b15620000a25760405162dc149f60e41b815260040160405180910390fd5b620000ad33620000d5565b565b620000d18282604051806020016040528060008152506200012760201b60201c565b5050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200013383836200019e565b6001600160a01b0383163b1562000199576000548281035b600181019062000161906000908790866200027e565b6200017f576040516368d2bf6b60e11b815260040160405180910390fd5b8181106200014b5781600054146200019657600080fd5b50505b505050565b6000805490829003620001c45760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b1783179055828401908390839060008051602062002f5c8339815191528180a4600183015b81811462000253578083600060008051602062002f5c833981519152600080a46001016200022a565b50816000036200027557604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290620002b59033908990889088906004016200060c565b6020604051808303816000875af1925050508015620002f3575060408051601f3d908101601f19168201909252620002f09181019062000662565b60015b62000355573d80801562000324576040519150601f19603f3d011682016040523d82523d6000602084013e62000329565b606091505b5080516000036200034d576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003a55781810151838201526020016200038b565b50506000910152565b600082601f830112620003c057600080fd5b81516001600160401b0380821115620003dd57620003dd62000372565b604051601f8301601f19908116603f0116810190828211818310171562000408576200040862000372565b816040528381528660208588010111156200042257600080fd5b6200043584602083016020890162000388565b9695505050505050565b6000806000606084860312156200045557600080fd5b83516001600160401b03808211156200046d57600080fd5b6200047b87838801620003ae565b945060208601519150808211156200049257600080fd5b50620004a186828701620003ae565b925050604084015190509250925092565b600181811c90821680620004c757607f821691505b602082108103620004e857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200019957600081815260208120601f850160051c81016020861015620005175750805b601f850160051c820191505b81811015620005385782815560010162000523565b505050505050565b81516001600160401b038111156200055c576200055c62000372565b62000574816200056d8454620004b2565b84620004ee565b602080601f831160018114620005ac5760008415620005935750858301515b600019600386901b1c1916600185901b17855562000538565b600085815260208120601f198616915b82811015620005dd57888601518255948401946001909101908401620005bc565b5085821015620005fc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b0380871683528086166020840152508360408301526080606083015282518060808401526200064b8160a085016020870162000388565b601f01601f19169190910160a00195945050505050565b6000602082840312156200067557600080fd5b81516001600160e01b0319811681146200068e57600080fd5b9392505050565b6128b780620006a56000396000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c806379ba50971161017b578063b439ac74116100d8578063d5abeb011161008c578063e985e9c511610071578063e985e9c5146105a4578063ee1cc944146105ed578063f2fde38b1461060057600080fd5b8063d5abeb0114610594578063e8a3d4851461059c57600080fd5b8063bd32fb66116100bd578063bd32fb6614610566578063c6ab67a314610579578063c87b56dd1461058157600080fd5b8063b439ac7414610540578063b88d4fde1461055357600080fd5b8063a22cb4651161012f578063a6d612f911610114578063a6d612f914610506578063aa98e0c614610519578063ad2f852a1461052257600080fd5b8063a22cb465146104e0578063a4830114146104f357600080fd5b8063938e3d7b11610160578063938e3d7b146104a257806395d89b41146104b557806398a8cffe146104bd57600080fd5b806379ba50971461047c5780638da5cb5b1461048457600080fd5b806342260b5d1161022957806364de1e85116101dd5780636f8b44b0116101c25780636f8b44b01461044e57806370a0823114610461578063715018a61461047457600080fd5b806364de1e85146104395780636c0360eb1461044657600080fd5b806344dae42c1161020e57806344dae42c1461040057806355f804b3146104135780636352211e1461042657600080fd5b806342260b5d146103bf57806342842e0e146103ed57600080fd5b8063099b6bfa1161028057806323452b9c1161026557806323452b9c1461036557806323b872dd1461036d5780632a55205a1461038057600080fd5b8063099b6bfa1461033c57806318160ddd1461034f57600080fd5b806301ffc9a7146102b257806306fdde03146102da578063081812fc146102ef578063095ea7b314610327575b600080fd5b6102c56102c036600461201c565b610613565b60405190151581526020015b60405180910390f35b6102e26106bb565b6040516102d191906120a7565b6103026102fd3660046120ba565b61074d565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102d1565b61033a6103353660046120f5565b6107b7565b005b61033a61034a3660046120ba565b6108cc565b600154600054035b6040519081526020016102d1565b61033a610954565b61033a61037b366004612121565b6109ba565b61039361038e366004612162565b610c74565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016102d1565b600e547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16610357565b61033a6103fb366004612121565b610cdd565b61033a61040e366004612184565b610cfd565b61033a61042136600461219c565b610e6e565b6103026104343660046120ba565b610edf565b6012546102c59060ff1681565b6102e2610eea565b61033a61045c3660046120ba565b610ef9565b61035761046f36600461220e565b610f7b565b61033a610ffd565b61033a611011565b60085473ffffffffffffffffffffffffffffffffffffffff16610302565b61033a6104b036600461219c565b6110cb565b6102e2611112565b6102c56104cb36600461220e565b60106020526000908152604090205460ff1681565b61033a6104ee366004612240565b611121565b61033a610501366004612162565b6111b8565b61033a610514366004612275565b6111f6565b61035760115481565b600e5473ffffffffffffffffffffffffffffffffffffffff16610302565b61033a61054e3660046120ba565b61142e565b61033a61056136600461231f565b61145b565b61033a6105743660046120ba565b6114cb565b600d54610357565b6102e261058f3660046120ba565b6114d8565b600a54610357565b6102e2611575565b6102c56105b236600461241d565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b61033a6105fb366004612456565b611584565b61033a61060e36600461220e565b6115c8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806106a657507f49064906000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806106b557506106b582611690565b92915050565b6060600280546106ca90612471565b80601f01602080910402602001604051908101604052809291908181526020018280546106f690612471565b80156107435780601f1061071857610100808354040283529160200191610743565b820191906000526020600020905b81548152906001019060200180831161072657829003601f168201915b5050505050905090565b600061075882611771565b61078e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006107c282610edf565b90503373ffffffffffffffffffffffffffffffffffffffff82161461084b5773ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832033845290915290205460ff1661084b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6108d46117b1565b6000541561090e576040517fe03264af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d80549082905560408051828152602081018490527f7c22004198bf87da0f0dab623c72e66ca1200f4454aa3b9ca30f436275428b7c91015b60405180910390a15050565b61095c611841565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1565b60006109c582611892565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a2c576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff881690911417610ac95773ffffffffffffffffffffffffffffffffffffffff8616600090815260076020908152604080832033845290915290205460ff16610ac9576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610b16576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610b2157600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003610c1057600184016000818152600460205260408120549003610c0e576000548114610c0e5760008181526004602052604090208490555b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600e8054600091829161271090610cb1907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16866124ed565b610cbb9190612504565b905473ffffffffffffffffffffffffffffffffffffffff169590945092505050565b610cf88383836040518060200160405280600081525061145b565b505050565b610d056117b1565b6000610d14602083018361220e565b73ffffffffffffffffffffffffffffffffffffffff1603610d61576040517f1cc0baef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710610d746040830160208401612559565b6bffffffffffffffffffffffff161115610de057610d986040820160208301612559565b6040517f3cadbafb0000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff90911660048201526024015b60405180910390fd5b80600e610ded8282612576565b507ff21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d9050610e1e602083018361220e565b610e2e6040840160208501612559565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff9091166020830152015b60405180910390a150565b610e766117b1565b600b610e83828483612621565b5060015460005414610edb577f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600180610ebc60005490565b610ec6919061273b565b60408051928352602083019190915201610948565b5050565b60006106b582611892565b6060610ef4611949565b905090565b610f016117b1565b67ffffffffffffffff811115610f46576040517fb43e913700000000000000000000000000000000000000000000000000000000815260048101829052602401610dd7565b600a8190556040518181527f7810bd47de260c3e9ee10061cf438099dd12256c79485f12f94dbccc981e806c90602001610e63565b600073ffffffffffffffffffffffffffffffffffffffff8216610fca576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b611005611841565b61100f6000611958565b565b60095473ffffffffffffffffffffffffffffffffffffffff16338114611063576040517fd6eb09ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a16110c881611958565b50565b6110d36117b1565b600c6110e0828483612621565b507f905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac37378828260405161094892919061274e565b6060600380546106ca90612471565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111c06117b1565b60408051838152602081018390527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c9101610948565b6111fe6119cf565b61120781611a42565b60125460ff16611273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f57484954454c4953545f4d494e545f494e4143544956450000000000000000006044820152606401610dd7565b3360009081526010602052604090205460ff16156112ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f414c52454144595f4d494e5445440000000000000000000000000000000000006044820152606401610dd7565b61137c838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011546040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101879052909250605401905060405160208183030381529060405280519060200120611b99565b6113e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f4d45524b4c455f50524f4f460000000000000000000000006044820152606401610dd7565b6113ec3382611baf565b33600090815260106020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cf86001600f55565b6114366119cf565b61143e611841565b61144781611a42565b6114513382611baf565b6110c86001600f55565b6114668484846109ba565b73ffffffffffffffffffffffffffffffffffffffff83163b156114c55761148f84848484611bc9565b6114c5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6114d3611841565b601155565b60606114e382611771565b611519576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611523611949565b90508051600003611543576040518060200160405280600081525061156e565b8061154d84611d42565b60405160200161155e92919061279b565b6040516020818303038152906040525b9392505050565b6060600c80546106ca90612471565b61158c6119cf565b611594611841565b601280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215151790556001600f5550565b6115d0611841565b73ffffffffffffffffffffffffffffffffffffffff811661161d576040517f7448fbae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da90602001610e63565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061172357507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806106b55750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60008054821080156106b55750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b3033146118076117d660085473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161490565b1760000361100f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085473ffffffffffffffffffffffffffffffffffffffff16331461100f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008160005481101561191757600081815260046020526040812054907c010000000000000000000000000000000000000000000000000000000082169003611915575b8060000361156e57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600460205260409020546118d6565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600b80546106ca90612471565b6008805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600f5403611a3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dd7565b6002600f55565b600a546000541115611ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f524541434845445f4d41585f535550504c5900000000000000000000000000006044820152606401610dd7565b60008111611b1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5155414e544954595f4c4553535f5448414e5f4f4e45000000000000000000006044820152606401610dd7565b600a5481611b2760005490565b611b3191906127ca565b11156110c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f5155414e544954595f45584345454445445f4d41585f535550504c59000000006044820152606401610dd7565b600082611ba68584611da4565b14949350505050565b610edb828260405180602001604052806000815250611df1565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290611c249033908990889088906004016127dd565b6020604051808303816000875af1925050508015611c7d575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611c7a91810190612826565b60015b611cf4573d808015611cab576040519150601f19603f3d011682016040523d82523d6000602084013e611cb0565b606091505b508051600003611cec576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480611d5c57508190037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909101908152919050565b600081815b8451811015611de957611dd582868381518110611dc857611dc8612843565b6020026020010151611e84565b915080611de181612872565b915050611da9565b509392505050565b611dfb8383611eb0565b73ffffffffffffffffffffffffffffffffffffffff83163b15610cf8576000548281035b611e326000868380600101945086611bc9565b611e68576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818110611e1f578160005414611e7d57600080fd5b5050505050565b6000818310611ea057600082815260208490526040902061156e565b5060009182526020526040902090565b6000805490829003611eee576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611faa57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611f72565b5081600003611fe5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146110c857600080fd5b60006020828403121561202e57600080fd5b813561156e81611fee565b60005b8381101561205457818101518382015260200161203c565b50506000910152565b60008151808452612075816020860160208601612039565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061156e602083018461205d565b6000602082840312156120cc57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146110c857600080fd5b6000806040838503121561210857600080fd5b8235612113816120d3565b946020939093013593505050565b60008060006060848603121561213657600080fd5b8335612141816120d3565b92506020840135612151816120d3565b929592945050506040919091013590565b6000806040838503121561217557600080fd5b50508035926020909101359150565b60006040828403121561219657600080fd5b50919050565b600080602083850312156121af57600080fd5b823567ffffffffffffffff808211156121c757600080fd5b818501915085601f8301126121db57600080fd5b8135818111156121ea57600080fd5b8660208285010111156121fc57600080fd5b60209290920196919550909350505050565b60006020828403121561222057600080fd5b813561156e816120d3565b8035801515811461223b57600080fd5b919050565b6000806040838503121561225357600080fd5b823561225e816120d3565b915061226c6020840161222b565b90509250929050565b60008060006040848603121561228a57600080fd5b833567ffffffffffffffff808211156122a257600080fd5b818601915086601f8301126122b657600080fd5b8135818111156122c557600080fd5b8760208260051b85010111156122da57600080fd5b6020928301989097509590910135949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561233557600080fd5b8435612340816120d3565b93506020850135612350816120d3565b925060408501359150606085013567ffffffffffffffff8082111561237457600080fd5b818701915087601f83011261238857600080fd5b81358181111561239a5761239a6122f0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156123e0576123e06122f0565b816040528281528a60208487010111156123f957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561243057600080fd5b823561243b816120d3565b9150602083013561244b816120d3565b809150509250929050565b60006020828403121561246857600080fd5b61156e8261222b565b600181811c9082168061248557607f821691505b602082108103612196577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176106b5576106b56124be565b60008261253a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6bffffffffffffffffffffffff811681146110c857600080fd5b60006020828403121561256b57600080fd5b813561156e8161253f565b8135612581816120d3565b73ffffffffffffffffffffffffffffffffffffffff811690507fffffffffffffffffffffffff0000000000000000000000000000000000000000818184541617835560208401356125d18161253f565b60a01b1617905550565b601f821115610cf857600081815260208120601f850160051c810160208610156126025750805b601f850160051c820191505b81811015610c6c5782815560010161260e565b67ffffffffffffffff831115612639576126396122f0565b61264d836126478354612471565b836125db565b6000601f84116001811461269f57600085156126695750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611e7d565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156126ee57868501358255602094850194600190920191016126ce565b5086821015612729577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b818103818111156106b5576106b56124be565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b600083516127ad818460208801612039565b8351908301906127c1818360208801612039565b01949350505050565b808201808211156106b5576106b56124be565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261281c608083018461205d565b9695505050505050565b60006020828403121561283857600080fd5b815161156e81611fee565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036128a3576128a36124be565b506001019056fea164736f6c6343000811000addf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000008a000000000000000000000000000000000000000000000000000000000000000f4b756c7420446f6c6365204b657973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054b444b4559000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c806379ba50971161017b578063b439ac74116100d8578063d5abeb011161008c578063e985e9c511610071578063e985e9c5146105a4578063ee1cc944146105ed578063f2fde38b1461060057600080fd5b8063d5abeb0114610594578063e8a3d4851461059c57600080fd5b8063bd32fb66116100bd578063bd32fb6614610566578063c6ab67a314610579578063c87b56dd1461058157600080fd5b8063b439ac7414610540578063b88d4fde1461055357600080fd5b8063a22cb4651161012f578063a6d612f911610114578063a6d612f914610506578063aa98e0c614610519578063ad2f852a1461052257600080fd5b8063a22cb465146104e0578063a4830114146104f357600080fd5b8063938e3d7b11610160578063938e3d7b146104a257806395d89b41146104b557806398a8cffe146104bd57600080fd5b806379ba50971461047c5780638da5cb5b1461048457600080fd5b806342260b5d1161022957806364de1e85116101dd5780636f8b44b0116101c25780636f8b44b01461044e57806370a0823114610461578063715018a61461047457600080fd5b806364de1e85146104395780636c0360eb1461044657600080fd5b806344dae42c1161020e57806344dae42c1461040057806355f804b3146104135780636352211e1461042657600080fd5b806342260b5d146103bf57806342842e0e146103ed57600080fd5b8063099b6bfa1161028057806323452b9c1161026557806323452b9c1461036557806323b872dd1461036d5780632a55205a1461038057600080fd5b8063099b6bfa1461033c57806318160ddd1461034f57600080fd5b806301ffc9a7146102b257806306fdde03146102da578063081812fc146102ef578063095ea7b314610327575b600080fd5b6102c56102c036600461201c565b610613565b60405190151581526020015b60405180910390f35b6102e26106bb565b6040516102d191906120a7565b6103026102fd3660046120ba565b61074d565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102d1565b61033a6103353660046120f5565b6107b7565b005b61033a61034a3660046120ba565b6108cc565b600154600054035b6040519081526020016102d1565b61033a610954565b61033a61037b366004612121565b6109ba565b61039361038e366004612162565b610c74565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016102d1565b600e547401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16610357565b61033a6103fb366004612121565b610cdd565b61033a61040e366004612184565b610cfd565b61033a61042136600461219c565b610e6e565b6103026104343660046120ba565b610edf565b6012546102c59060ff1681565b6102e2610eea565b61033a61045c3660046120ba565b610ef9565b61035761046f36600461220e565b610f7b565b61033a610ffd565b61033a611011565b60085473ffffffffffffffffffffffffffffffffffffffff16610302565b61033a6104b036600461219c565b6110cb565b6102e2611112565b6102c56104cb36600461220e565b60106020526000908152604090205460ff1681565b61033a6104ee366004612240565b611121565b61033a610501366004612162565b6111b8565b61033a610514366004612275565b6111f6565b61035760115481565b600e5473ffffffffffffffffffffffffffffffffffffffff16610302565b61033a61054e3660046120ba565b61142e565b61033a61056136600461231f565b61145b565b61033a6105743660046120ba565b6114cb565b600d54610357565b6102e261058f3660046120ba565b6114d8565b600a54610357565b6102e2611575565b6102c56105b236600461241d565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b61033a6105fb366004612456565b611584565b61033a61060e36600461220e565b6115c8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806106a657507f49064906000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806106b557506106b582611690565b92915050565b6060600280546106ca90612471565b80601f01602080910402602001604051908101604052809291908181526020018280546106f690612471565b80156107435780601f1061071857610100808354040283529160200191610743565b820191906000526020600020905b81548152906001019060200180831161072657829003601f168201915b5050505050905090565b600061075882611771565b61078e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006107c282610edf565b90503373ffffffffffffffffffffffffffffffffffffffff82161461084b5773ffffffffffffffffffffffffffffffffffffffff8116600090815260076020908152604080832033845290915290205460ff1661084b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6108d46117b1565b6000541561090e576040517fe03264af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600d80549082905560408051828152602081018490527f7c22004198bf87da0f0dab623c72e66ca1200f4454aa3b9ca30f436275428b7c91015b60405180910390a15050565b61095c611841565b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1565b60006109c582611892565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a2c576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff881690911417610ac95773ffffffffffffffffffffffffffffffffffffffff8616600090815260076020908152604080832033845290915290205460ff16610ac9576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8516610b16576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015610b2157600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003610c1057600184016000818152600460205260408120549003610c0e576000548114610c0e5760008181526004602052604090208490555b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600e8054600091829161271090610cb1907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16866124ed565b610cbb9190612504565b905473ffffffffffffffffffffffffffffffffffffffff169590945092505050565b610cf88383836040518060200160405280600081525061145b565b505050565b610d056117b1565b6000610d14602083018361220e565b73ffffffffffffffffffffffffffffffffffffffff1603610d61576040517f1cc0baef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710610d746040830160208401612559565b6bffffffffffffffffffffffff161115610de057610d986040820160208301612559565b6040517f3cadbafb0000000000000000000000000000000000000000000000000000000081526bffffffffffffffffffffffff90911660048201526024015b60405180910390fd5b80600e610ded8282612576565b507ff21fccf4d64d86d532c4e4eb86c007b6ad57a460c27d724188625e755ec6cf6d9050610e1e602083018361220e565b610e2e6040840160208501612559565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff9091166020830152015b60405180910390a150565b610e766117b1565b600b610e83828483612621565b5060015460005414610edb577f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c600180610ebc60005490565b610ec6919061273b565b60408051928352602083019190915201610948565b5050565b60006106b582611892565b6060610ef4611949565b905090565b610f016117b1565b67ffffffffffffffff811115610f46576040517fb43e913700000000000000000000000000000000000000000000000000000000815260048101829052602401610dd7565b600a8190556040518181527f7810bd47de260c3e9ee10061cf438099dd12256c79485f12f94dbccc981e806c90602001610e63565b600073ffffffffffffffffffffffffffffffffffffffff8216610fca576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b611005611841565b61100f6000611958565b565b60095473ffffffffffffffffffffffffffffffffffffffff16338114611063576040517fd6eb09ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600980547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a16110c881611958565b50565b6110d36117b1565b600c6110e0828483612621565b507f905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac37378828260405161094892919061274e565b6060600380546106ca90612471565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111c06117b1565b60408051838152602081018390527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c9101610948565b6111fe6119cf565b61120781611a42565b60125460ff16611273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f57484954454c4953545f4d494e545f494e4143544956450000000000000000006044820152606401610dd7565b3360009081526010602052604090205460ff16156112ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f414c52454144595f4d494e5445440000000000000000000000000000000000006044820152606401610dd7565b61137c838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011546040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101879052909250605401905060405160208183030381529060405280519060200120611b99565b6113e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f494e56414c49445f4d45524b4c455f50524f4f460000000000000000000000006044820152606401610dd7565b6113ec3382611baf565b33600090815260106020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cf86001600f55565b6114366119cf565b61143e611841565b61144781611a42565b6114513382611baf565b6110c86001600f55565b6114668484846109ba565b73ffffffffffffffffffffffffffffffffffffffff83163b156114c55761148f84848484611bc9565b6114c5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b6114d3611841565b601155565b60606114e382611771565b611519576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611523611949565b90508051600003611543576040518060200160405280600081525061156e565b8061154d84611d42565b60405160200161155e92919061279b565b6040516020818303038152906040525b9392505050565b6060600c80546106ca90612471565b61158c6119cf565b611594611841565b601280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215151790556001600f5550565b6115d0611841565b73ffffffffffffffffffffffffffffffffffffffff811661161d576040517f7448fbae00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da90602001610e63565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061172357507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806106b55750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60008054821080156106b55750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b3033146118076117d660085473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161490565b1760000361100f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085473ffffffffffffffffffffffffffffffffffffffff16331461100f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008160005481101561191757600081815260046020526040812054907c010000000000000000000000000000000000000000000000000000000082169003611915575b8060000361156e57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600460205260409020546118d6565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600b80546106ca90612471565b6008805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600f5403611a3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dd7565b6002600f55565b600a546000541115611ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f524541434845445f4d41585f535550504c5900000000000000000000000000006044820152606401610dd7565b60008111611b1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f5155414e544954595f4c4553535f5448414e5f4f4e45000000000000000000006044820152606401610dd7565b600a5481611b2760005490565b611b3191906127ca565b11156110c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f5155414e544954595f45584345454445445f4d41585f535550504c59000000006044820152606401610dd7565b600082611ba68584611da4565b14949350505050565b610edb828260405180602001604052806000815250611df1565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290611c249033908990889088906004016127dd565b6020604051808303816000875af1925050508015611c7d575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611c7a91810190612826565b60015b611cf4573d808015611cab576040519150601f19603f3d011682016040523d82523d6000602084013e611cb0565b606091505b508051600003611cec576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480611d5c57508190037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909101908152919050565b600081815b8451811015611de957611dd582868381518110611dc857611dc8612843565b6020026020010151611e84565b915080611de181612872565b915050611da9565b509392505050565b611dfb8383611eb0565b73ffffffffffffffffffffffffffffffffffffffff83163b15610cf8576000548281035b611e326000868380600101945086611bc9565b611e68576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818110611e1f578160005414611e7d57600080fd5b5050505050565b6000818310611ea057600082815260208490526040902061156e565b5060009182526020526040902090565b6000805490829003611eee576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611faa57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611f72565b5081600003611fe5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146110c857600080fd5b60006020828403121561202e57600080fd5b813561156e81611fee565b60005b8381101561205457818101518382015260200161203c565b50506000910152565b60008151808452612075816020860160208601612039565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061156e602083018461205d565b6000602082840312156120cc57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146110c857600080fd5b6000806040838503121561210857600080fd5b8235612113816120d3565b946020939093013593505050565b60008060006060848603121561213657600080fd5b8335612141816120d3565b92506020840135612151816120d3565b929592945050506040919091013590565b6000806040838503121561217557600080fd5b50508035926020909101359150565b60006040828403121561219657600080fd5b50919050565b600080602083850312156121af57600080fd5b823567ffffffffffffffff808211156121c757600080fd5b818501915085601f8301126121db57600080fd5b8135818111156121ea57600080fd5b8660208285010111156121fc57600080fd5b60209290920196919550909350505050565b60006020828403121561222057600080fd5b813561156e816120d3565b8035801515811461223b57600080fd5b919050565b6000806040838503121561225357600080fd5b823561225e816120d3565b915061226c6020840161222b565b90509250929050565b60008060006040848603121561228a57600080fd5b833567ffffffffffffffff808211156122a257600080fd5b818601915086601f8301126122b657600080fd5b8135818111156122c557600080fd5b8760208260051b85010111156122da57600080fd5b6020928301989097509590910135949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806080858703121561233557600080fd5b8435612340816120d3565b93506020850135612350816120d3565b925060408501359150606085013567ffffffffffffffff8082111561237457600080fd5b818701915087601f83011261238857600080fd5b81358181111561239a5761239a6122f0565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156123e0576123e06122f0565b816040528281528a60208487010111156123f957600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806040838503121561243057600080fd5b823561243b816120d3565b9150602083013561244b816120d3565b809150509250929050565b60006020828403121561246857600080fd5b61156e8261222b565b600181811c9082168061248557607f821691505b602082108103612196577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820281158282048414176106b5576106b56124be565b60008261253a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6bffffffffffffffffffffffff811681146110c857600080fd5b60006020828403121561256b57600080fd5b813561156e8161253f565b8135612581816120d3565b73ffffffffffffffffffffffffffffffffffffffff811690507fffffffffffffffffffffffff0000000000000000000000000000000000000000818184541617835560208401356125d18161253f565b60a01b1617905550565b601f821115610cf857600081815260208120601f850160051c810160208610156126025750805b601f850160051c820191505b81811015610c6c5782815560010161260e565b67ffffffffffffffff831115612639576126396122f0565b61264d836126478354612471565b836125db565b6000601f84116001811461269f57600085156126695750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b178355611e7d565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b828110156126ee57868501358255602094850194600190920191016126ce565b5086821015612729577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b818103818111156106b5576106b56124be565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b600083516127ad818460208801612039565b8351908301906127c1818360208801612039565b01949350505050565b808201808211156106b5576106b56124be565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261281c608083018461205d565b9695505050505050565b60006020828403121561283857600080fd5b815161156e81611fee565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036128a3576128a36124be565b506001019056fea164736f6c6343000811000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000008a000000000000000000000000000000000000000000000000000000000000000f4b756c7420446f6c6365204b657973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054b444b4559000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): Kult Dolce Keys
Arg [1] : symbol (string): KDKEY
Arg [2] : reserve (uint256): 138
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 000000000000000000000000000000000000000000000000000000000000008a
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [4] : 4b756c7420446f6c6365204b6579730000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 4b444b4559000000000000000000000000000000000000000000000000000000
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.