ERC-721
Overview
Max Total Supply
807 CWV1
Holders
138
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 CWV1Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BuidlerTemplateSignature
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: None pragma solidity >=0.4.22 <0.9.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "erc721a/contracts/ERC721A.sol"; contract BuidlerTemplateSignature is Context, Ownable, ReentrancyGuard, ERC2981, ERC721A, DefaultOperatorFilterer { using Counters for Counters.Counter; using EnumerableSet for EnumerableSet.AddressSet; /* BBBBBBBBBBBBBBBBB UUUUUUUU UUUUUUUUIIIIIIIIIIDDDDDDDDDDDDD LLLLLLLLLLL EEEEEEEEEEEEEEEEEEEEEERRRRRRRRRRRRRRRRR B::::::::::::::::B U::::::U U::::::UI::::::::ID::::::::::::DDD L:::::::::L E::::::::::::::::::::ER::::::::::::::::R B::::::BBBBBB:::::B U::::::U U::::::UI::::::::ID:::::::::::::::DD L:::::::::L E::::::::::::::::::::ER::::::RRRRRR:::::R BB:::::B B:::::BUU:::::U U:::::UUII::::::IIDDD:::::DDDDD:::::D LL:::::::LL EE::::::EEEEEEEEE::::ERR:::::R R:::::R B::::B B:::::B U:::::U U:::::U I::::I D:::::D D:::::D L:::::L E:::::E EEEEEE R::::R R:::::R B::::B B:::::B U:::::D D:::::U I::::I D:::::D D:::::D L:::::L E:::::E R::::R R:::::R B::::BBBBBB:::::B U:::::D D:::::U I::::I D:::::D D:::::D L:::::L E::::::EEEEEEEEEE R::::RRRRRR:::::R B:::::::::::::BB U:::::D D:::::U I::::I D:::::D D:::::D L:::::L E:::::::::::::::E R:::::::::::::RR B::::BBBBBB:::::B U:::::D D:::::U I::::I D:::::D D:::::D L:::::L E:::::::::::::::E R::::RRRRRR:::::R B::::B B:::::B U:::::D D:::::U I::::I D:::::D D:::::D L:::::L E::::::EEEEEEEEEE R::::R R:::::R B::::B B:::::B U:::::D D:::::U I::::I D:::::D D:::::D L:::::L E:::::E R::::R R:::::R B::::B B:::::B U::::::U U::::::U I::::I D:::::D D:::::D L:::::L LLLLLL E:::::E EEEEEE R::::R R:::::R BB:::::BBBBBB::::::B U:::::::UUU:::::::U II::::::IIDDD:::::DDDDD:::::D LL:::::::LLLLLLLLL:::::LEE::::::EEEEEEEE:::::ERR:::::R R:::::R B:::::::::::::::::B UU:::::::::::::UU I::::::::ID:::::::::::::::DD L::::::::::::::::::::::LE::::::::::::::::::::ER::::::R R:::::R B::::::::::::::::B UU:::::::::UU I::::::::ID::::::::::::DDD L::::::::::::::::::::::LE::::::::::::::::::::ER::::::R R:::::R BBBBBBBBBBBBBBBBB UUUUUUUUU IIIIIIIIIIDDDDDDDDDDDDD LLLLLLLLLLLLLLLLLLLLLLLLEEEEEEEEEEEEEEEEEEEEEERRRRRRRR RRRRRRR Developed and deployed with Buidler Launcher https://buidler.it */ /** @notice Capped max supply */ uint256 public immutable supplyCap = 6900; uint256 public immutable batchMintCap = 520; /** @notice Capped max supply for free claim */ uint256 public immutable freeClaimCap = 2580; /** @notice Each address has a mint quota */ uint16 public immutable holdersQuota = 6; uint16 public immutable whiteQuota = 5000; uint16 public immutable publicQuota = 5000; string private _baseTokenURI; /** @notice Token ID counter declared */ Counters.Counter private _tokenIds; /** @notice Token ID counter declared */ Counters.Counter private _freeClaimTokenIds; /** @notice Public mint open */ bool public isOpenPublic; bool public isOpenWhite; bool public isOpenHolders; uint256 public dtStartHolders = 1677250800; //24-02 12h00 uint256 public dtCloseHolders = 1677258000; //24-02 14h00 uint256 public dtCloseWhiteList = 1677344400; //25-02 14h45 uint256 public dtClosePublic = 1679763600; uint256 private mintHoldersValue = 0.016 ether; uint256 private mintWLValue = 0.018 ether; uint256 private mintPublicValue = 0.021 ether; mapping(address => bool) public __holders; mapping(address => bool) public __whitelist; mapping(address => bool) public __holdersFree; mapping(address => uint256) public __quotasFree; /** @notice Mapping to track number of mints per address */ mapping(address => uint256) public userHoldersMintCount; mapping(address => uint256) public userWhiteMintCount; mapping(address => uint256) public userPublicMintCount; mapping(address => uint256) public userFreeMintCount; mapping(address => uint256) public ownerBatchMintCount; address private signerAddress = 0xaa030cCA457Ee250341ea24853693BBeA845D91E; using ECDSA for bytes32; /** * @notice Verify signature */ function verifyAddressSigner(bytes memory signature) private view returns (bool) { bytes32 messageHash = keccak256(abi.encodePacked(msg.sender)); return signerAddress == messageHash.toEthSignedMessageHash().recover(signature); } /*store metadata*/ function contractURI() public view returns (string memory) { return "https://buidler.it/minters/cw/v1/json/contractmetadata"; } modifier publicMintOpen() { require(isOpenPublic, "Public sale is not open"); _; } modifier holdersMintOpen() { require(isOpenWhite, "Holders sale is not open"); _; } modifier whiteListMintOpen() { require(isOpenHolders, "Whitelist sale is not open"); _; } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } constructor() ERC721A("Creepy World Vol. 1", "CWV1") { _baseTokenURI = 'https://buidler.it/minters/cw/v1/json/'; isOpenPublic = false; isOpenWhite = false; isOpenHolders = false; /*set royalties*/ address _receiver = 0xCc3714049eD0A6EE7C013808c8e6C255A07D8466; _setDefaultRoyalty(_receiver, 150); } function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner { _setDefaultRoyalty(_receiver, _feeNumerator); } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } /** @notice Owner can change baseURI */ function setBaseURI(string memory baseTokenURI) external onlyOwner { _baseTokenURI = baseTokenURI; } /** @notice Open public mint */ function openPublicMint() external onlyOwner { isOpenPublic = true; } /** @notice End public mint */ function closePublicMint() external onlyOwner { isOpenPublic = false; } /** @notice Open public mint */ function openWhiteMint() external onlyOwner { isOpenWhite = true; } /** @notice End public mint */ function closeWhiteMint() external onlyOwner { isOpenWhite = false; } /** @notice Open holders mint */ function openHoldersMint() external onlyOwner { isOpenHolders = true; } /** @notice End public mint */ function closeHoldersMint() external onlyOwner { isOpenHolders = false; } function mint( uint256 amount, bytes memory signature) external payable { require(msg.sender == tx.origin, "You can't use other contract."); if ((block.timestamp >= dtStartHolders && block.timestamp <= dtCloseHolders)) { holdersMint(amount, signature); } else if (block.timestamp > dtCloseHolders && block.timestamp <= dtCloseWhiteList) { whiteListMint(amount, signature); } else if (block.timestamp > dtCloseWhiteList && block.timestamp <= dtClosePublic ) { publicSaleMint(amount); } else if (isOpenHolders == true){ holdersMint(amount, signature); } else if (isOpenWhite == true){ whiteListMint(amount, signature); } else if (isOpenPublic == true){ publicSaleMint(amount); } sendBuidlerFee(msg.value); } function publicSaleMint(uint256 _amount) private { require(msg.value >= _amount * mintPublicValue, "Not enough funds."); for (uint256 i = 0; i < _amount; i++) { require(userPublicMintCount[msg.sender] < publicQuota, "Exceed quota"); require(_tokenIds.current() < supplyCap, "Exceed cap"); userPublicMintCount[msg.sender]++; _safeMint(msg.sender, 1); _tokenIds.increment(); } } function holdersMint(uint256 _amount, bytes memory signature) private { require(verifyAddressSigner(signature), "NOT_IN_HOLDERS_LIST"); require(msg.value >= _amount * mintHoldersValue, "Not enough funds."); for (uint256 i = 0; i < _amount; i++) { require(userHoldersMintCount[msg.sender] < holdersQuota, "Exceed quota"); require(_tokenIds.current() < supplyCap, "Exceed cap"); userHoldersMintCount[msg.sender]++; _safeMint(msg.sender, 1); _tokenIds.increment(); } } function whiteListMint(uint256 _amount, bytes memory signature) private { require(verifyAddressSigner(signature), "NOT_IN_WHITE_LIST"); require(msg.value >= _amount * mintWLValue, "Not enough funds."); for (uint256 i = 0; i < _amount; i++) { require(userWhiteMintCount[msg.sender] < whiteQuota, "Exceed quota"); require(_tokenIds.current() < supplyCap, "Exceed cap"); userWhiteMintCount[msg.sender]++; _safeMint(msg.sender, 1); _tokenIds.increment(); } } /** @notice Contract owner can burn token he owns * @param _id token to be burned */ function burn(uint256 _id) external onlyOwner { require(ownerOf(_id) == msg.sender); _burn(_id); } /** @notice Owner can batch mint to itself * @param _amount Number of tokens to be minted */ function batchMintForOwner(uint256 _amount) external onlyOwner { for (uint256 i = 0; i < _amount; i++) { require(ownerBatchMintCount[msg.sender] < batchMintCap, "Exceed cap"); ownerBatchMintCount[msg.sender]++; _safeMint(msg.sender, 1); //increment _tokenIds.increment(); } } /*do Free Claim Mint*/ function freeClaimMint(uint256 _amount, uint quota, bytes memory signature) external { require(verifyAddressSigner(signature), "NOT_IN_FREE_LIST"); for (uint256 i = 0; i < _amount; i++) { require(userFreeMintCount[msg.sender] < quota, "Exceed quota"); require(_freeClaimTokenIds.current() < freeClaimCap, "Exceed cap"); userFreeMintCount[msg.sender]++; _safeMint(msg.sender, 1); _freeClaimTokenIds.increment(); } } function isMintActive() external view returns (bool) { return isOpenPublic; } function totalMintCount() external view returns (uint256) { return _tokenIds.current(); } function sendBuidlerFee(uint256 value) private { address __buidler_wallet = 0xCc3714049eD0A6EE7C013808c8e6C255A07D8466; //get only 1.5% to buidler uint256 totalToSend1 = value * 3 / 2 / 100; (bool success, ) = __buidler_wallet.call{value: totalToSend1}(""); require(success, "Transfer to buidler failed."); } /** * override(ERC721, ERC721Enumerable) -> here you're specifying only two base classes ERC721, ERC721Enumerable * */ function supportsInterface(bytes4 interfaceId) public view override(ERC721A, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) payable { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) payable { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) payable { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) payable { super.safeTransferFrom(from, to, tokenId, data); } function withdraw() external onlyOwner nonReentrant { uint256 totalBalance = address(this).balance; (bool success, ) = msg.sender.call{value: totalBalance}(""); require(success, "Transfer failed."); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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, _status will be _NOT_ENTERED 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 pragma solidity ^0.8.17; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// 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 pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// 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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"__holders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"__holdersFree","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"__quotasFree","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"__whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchMintCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"batchMintForOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeHoldersMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closePublicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeWhiteMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dtCloseHolders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dtClosePublic","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dtCloseWhiteList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dtStartHolders","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeClaimCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"quota","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"freeClaimMint","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":[],"name":"holdersQuota","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":"isMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpenHolders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpenPublic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpenWhite","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openHoldersMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openPublicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"openWhiteMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ownerBatchMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"publicQuota","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userFreeMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userHoldersMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userPublicMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userWhiteMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whiteQuota","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610140604052611af460809081525061020860a090815250610a1460c090815250600661ffff1660e09061ffff1681525061138861ffff166101009061ffff1681525061138861ffff166101209061ffff168152506363f8d0f06010556363f8ed106011556363fa3e9060125563641f28906013556638d7ea4c680000601455663ff2e795f50000601555664a9b638448800060165573aa030cca457ee250341ea24853693bbea845d91e602060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550348015620000f757600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280601381526020017f43726565707920576f726c6420566f6c2e2031000000000000000000000000008152506040518060400160405280600481526020017f43575631000000000000000000000000000000000000000000000000000000008152506200019b6200018f6200048460201b60201c565b6200048c60201b60201c565b600180819055508160069081620001b391906200097c565b508060079081620001c591906200097c565b50620001d66200055060201b60201c565b600481905550505060006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115620003d357801562000299576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16637d3e3dbe30846040518363ffffffff1660e01b81526004016200025f92919062000aa8565b600060405180830381600087803b1580156200027a57600080fd5b505af11580156200028f573d6000803e3d6000fd5b50505050620003d2565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161462000353576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663a0af290330846040518363ffffffff1660e01b81526004016200031992919062000aa8565b600060405180830381600087803b1580156200033457600080fd5b505af115801562000349573d6000803e3d6000fd5b50505050620003d1565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16634420e486306040518263ffffffff1660e01b81526004016200039c919062000ad5565b600060405180830381600087803b158015620003b757600080fd5b505af1158015620003cc573d6000803e3d6000fd5b505050505b5b5b5050604051806060016040528060268152602001620061f460269139600c9081620003ff91906200097c565b506000600f60006101000a81548160ff0219169083151502179055506000600f60016101000a81548160ff0219169083151502179055506000600f60026101000a81548160ff021916908315150217905550600073cc3714049ed0a6ee7c013808c8e6c255a07d846690506200047d8160966200055560201b60201c565b5062000c0d565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600090565b62000565620006f860201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115620005c6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005bd9062000b79565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000638576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200062f9062000beb565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600260008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000612710905090565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200078457607f821691505b6020821081036200079a57620007996200073c565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620008047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620007c5565b620008108683620007c5565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200085d62000857620008518462000828565b62000832565b62000828565b9050919050565b6000819050919050565b62000879836200083c565b62000891620008888262000864565b848454620007d2565b825550505050565b600090565b620008a862000899565b620008b58184846200086e565b505050565b5b81811015620008dd57620008d16000826200089e565b600181019050620008bb565b5050565b601f8211156200092c57620008f681620007a0565b6200090184620007b5565b8101602085101562000911578190505b620009296200092085620007b5565b830182620008ba565b50505b505050565b600082821c905092915050565b6000620009516000198460080262000931565b1980831691505092915050565b60006200096c83836200093e565b9150826002028217905092915050565b620009878262000702565b67ffffffffffffffff811115620009a357620009a26200070d565b5b620009af82546200076b565b620009bc828285620008e1565b600060209050601f831160018114620009f45760008415620009df578287015190505b620009eb85826200095e565b86555062000a5b565b601f19841662000a0486620007a0565b60005b8281101562000a2e5784890151825560018201915060208501945060208101905062000a07565b8683101562000a4e578489015162000a4a601f8916826200093e565b8355505b6001600288020188555050505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000a908262000a63565b9050919050565b62000aa28162000a83565b82525050565b600060408201905062000abf600083018562000a97565b62000ace602083018462000a97565b9392505050565b600060208201905062000aec600083018462000a97565b92915050565b600082825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000b61602a8362000af2565b915062000b6e8262000b03565b604082019050919050565b6000602082019050818103600083015262000b948162000b52565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000bd360198362000af2565b915062000be08262000b9b565b602082019050919050565b6000602082019050818103600083015262000c068162000bc4565b9050919050565b60805160a05160c05160e051610100516101205161555f62000c9560003960008181611a060152613065015260008181610ea20152612e780152600081816119440152612c430152600081816115b40152611bfd015260008181610f4a01526113700152600081816117c001528181612ce801528181612f1d015261310a015261555f6000f3fe6080604052600436106103765760003560e01c8063715018a6116101d1578063c87b56dd11610102578063e46bce59116100a0578063f2fde38b1161006f578063f2fde38b14610c8e578063f364d82f14610cb7578063f9502a7214610ce2578063fe06634114610d1f57610376565b8063e46bce5914610bac578063e8a3d48514610be9578063e985e9c514610c14578063eddae94c14610c5157610376565b8063d3cd4ec3116100dc578063d3cd4ec314610b11578063d7dbe00714610b28578063db7fd40814610b65578063e2075df014610b8157610376565b8063c87b56dd14610a6c578063c932a3dc14610aa9578063c9dbfbd414610ad457610376565b806395d89b411161016f578063af07145f11610149578063af07145f146109e3578063b6498c8214610a0e578063b88d4fde14610a25578063badb2e0514610a4157610376565b806395d89b4114610964578063a0da40651461098f578063a22cb465146109ba57610376565b80638da5cb5b116101ab5780638da5cb5b146108b85780638f770ad0146108e3578063932652261461090e5780639414760e1461093957610376565b8063715018a6146108395780637a0d2302146108505780638940dd6b1461087b57610376565b80633f48773e116102ab57806355f804b3116102495780636352211e116102235780636352211e1461077f5780636c502c2d146107bc5780636e8c15f3146107d357806370a08231146107fc57610376565b806355f804b3146107025780635950ae201461072b5780635b92ac0d1461075457610376565b806342966c681161028557806342966c681461066e5780634565b4431461069757806345f7e06e146106d4578063557d694c146106eb57610376565b80633f48773e146105fc57806341f434341461062757806342842e0e1461065257610376565b806318160ddd1161031857806323b872dd116102f257806323b872dd1461056057806327ee23e61461057c5780632a55205a146105a75780633ccfd60b146105e557610376565b806318160ddd146104cd5780631d3ce40c146104f8578063214ceca81461052357610376565b8063072d26c511610354578063072d26c51461040c578063081812fc14610449578063095ea7b3146104865780631595fe50146104a257610376565b806301ffc9a71461037b57806304634d8d146103b857806306fdde03146103e1575b600080fd5b34801561038757600080fd5b506103a2600480360381019061039d9190613d33565b610d36565b6040516103af9190613d7b565b60405180910390f35b3480156103c457600080fd5b506103df60048036038101906103da9190613e38565b610d48565b005b3480156103ed57600080fd5b506103f6610d5e565b6040516104039190613f08565b60405180910390f35b34801561041857600080fd5b50610433600480360381019061042e9190613f2a565b610df0565b6040516104409190613f70565b60405180910390f35b34801561045557600080fd5b50610470600480360381019061046b9190613fb7565b610e08565b60405161047d9190613ff3565b60405180910390f35b6104a0600480360381019061049b919061400e565b610e87565b005b3480156104ae57600080fd5b506104b7610ea0565b6040516104c4919061406b565b60405180910390f35b3480156104d957600080fd5b506104e2610ec4565b6040516104ef9190613f70565b60405180910390f35b34801561050457600080fd5b5061050d610edb565b60405161051a9190613f70565b60405180910390f35b34801561052f57600080fd5b5061054a60048036038101906105459190613f2a565b610ee1565b6040516105579190613f70565b60405180910390f35b61057a60048036038101906105759190614086565b610ef9565b005b34801561058857600080fd5b50610591610f48565b60405161059e9190613f70565b60405180910390f35b3480156105b357600080fd5b506105ce60048036038101906105c991906140d9565b610f6c565b6040516105dc929190614119565b60405180910390f35b3480156105f157600080fd5b506105fa611156565b005b34801561060857600080fd5b50610611611223565b60405161061e9190613f70565b60405180910390f35b34801561063357600080fd5b5061063c611229565b60405161064991906141a1565b60405180910390f35b61066c60048036038101906106679190614086565b61123b565b005b34801561067a57600080fd5b5061069560048036038101906106909190613fb7565b61128a565b005b3480156106a357600080fd5b506106be60048036038101906106b99190613f2a565b6112de565b6040516106cb9190613f70565b60405180910390f35b3480156106e057600080fd5b506106e96112f6565b005b3480156106f757600080fd5b5061070061131b565b005b34801561070e57600080fd5b50610729600480360381019061072491906142f1565b611340565b005b34801561073757600080fd5b50610752600480360381019061074d9190613fb7565b61135b565b005b34801561076057600080fd5b50610769611490565b6040516107769190613d7b565b60405180910390f35b34801561078b57600080fd5b506107a660048036038101906107a19190613fb7565b6114a7565b6040516107b39190613ff3565b60405180910390f35b3480156107c857600080fd5b506107d16114b9565b005b3480156107df57600080fd5b506107fa60048036038101906107f591906143db565b6114de565b005b34801561080857600080fd5b50610823600480360381019061081e9190613f2a565b6116a0565b6040516108309190613f70565b60405180910390f35b34801561084557600080fd5b5061084e611758565b005b34801561085c57600080fd5b5061086561176c565b6040516108729190613f70565b60405180910390f35b34801561088757600080fd5b506108a2600480360381019061089d9190613f2a565b61177d565b6040516108af9190613f70565b60405180910390f35b3480156108c457600080fd5b506108cd611795565b6040516108da9190613ff3565b60405180910390f35b3480156108ef57600080fd5b506108f86117be565b6040516109059190613f70565b60405180910390f35b34801561091a57600080fd5b506109236117e2565b6040516109309190613d7b565b60405180910390f35b34801561094557600080fd5b5061094e6117f5565b60405161095b9190613f70565b60405180910390f35b34801561097057600080fd5b506109796117fb565b6040516109869190613f08565b60405180910390f35b34801561099b57600080fd5b506109a461188d565b6040516109b19190613d7b565b60405180910390f35b3480156109c657600080fd5b506109e160048036038101906109dc9190614476565b6118a0565b005b3480156109ef57600080fd5b506109f86118b9565b604051610a059190613d7b565b60405180910390f35b348015610a1a57600080fd5b50610a236118cc565b005b610a3f6004803603810190610a3a91906144b6565b6118f1565b005b348015610a4d57600080fd5b50610a56611942565b604051610a63919061406b565b60405180910390f35b348015610a7857600080fd5b50610a936004803603810190610a8e9190613fb7565b611966565b604051610aa09190613f08565b60405180910390f35b348015610ab557600080fd5b50610abe611a04565b604051610acb919061406b565b60405180910390f35b348015610ae057600080fd5b50610afb6004803603810190610af69190613f2a565b611a28565b604051610b089190613d7b565b60405180910390f35b348015610b1d57600080fd5b50610b26611a48565b005b348015610b3457600080fd5b50610b4f6004803603810190610b4a9190613f2a565b611a6d565b604051610b5c9190613d7b565b60405180910390f35b610b7f6004803603810190610b7a9190614539565b611a8d565b005b348015610b8d57600080fd5b50610b96611bfb565b604051610ba39190613f70565b60405180910390f35b348015610bb857600080fd5b50610bd36004803603810190610bce9190613f2a565b611c1f565b604051610be09190613f70565b60405180910390f35b348015610bf557600080fd5b50610bfe611c37565b604051610c0b9190613f08565b60405180910390f35b348015610c2057600080fd5b50610c3b6004803603810190610c369190614595565b611c57565b604051610c489190613d7b565b60405180910390f35b348015610c5d57600080fd5b50610c786004803603810190610c739190613f2a565b611ceb565b604051610c859190613f70565b60405180910390f35b348015610c9a57600080fd5b50610cb56004803603810190610cb09190613f2a565b611d03565b005b348015610cc357600080fd5b50610ccc611d86565b604051610cd99190613f70565b60405180910390f35b348015610cee57600080fd5b50610d096004803603810190610d049190613f2a565b611d8c565b604051610d169190613d7b565b60405180910390f35b348015610d2b57600080fd5b50610d34611dac565b005b6000610d4182611dd1565b9050919050565b610d50611e63565b610d5a8282611ee1565b5050565b606060068054610d6d90614604565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9990614604565b8015610de65780601f10610dbb57610100808354040283529160200191610de6565b820191906000526020600020905b815481529060010190602001808311610dc957829003601f168201915b5050505050905090565b601a6020528060005260406000206000915090505481565b6000610e1382612076565b610e49576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610e91816120d5565b610e9b83836121d2565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610ece612316565b6005546004540303905090565b60115481565b601c6020528060005260406000206000915090505481565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f3757610f36336120d5565b5b610f4284848461231b565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806000600360008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036111015760026040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b600061110b61263d565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16866111379190614664565b61114191906146d5565b90508160000151819350935050509250929050565b61115e611e63565b611166612647565b600047905060003373ffffffffffffffffffffffffffffffffffffffff168260405161119190614737565b60006040518083038185875af1925050503d80600081146111ce576040519150601f19603f3d011682016040523d82523d6000602084013e6111d3565b606091505b5050905080611217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120e90614798565b60405180910390fd5b5050611221612696565b565b60125481565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461127957611278336120d5565b5b61128484848461269f565b50505050565b611292611e63565b3373ffffffffffffffffffffffffffffffffffffffff166112b2826114a7565b73ffffffffffffffffffffffffffffffffffffffff16146112d257600080fd5b6112db816126bf565b50565b601e6020528060005260406000206000915090505481565b6112fe611e63565b6001600f60006101000a81548160ff021916908315150217905550565b611323611e63565b6000600f60006101000a81548160ff021916908315150217905550565b611348611e63565b80600c9081611357919061495a565b5050565b611363611e63565b60005b8181101561148c577f0000000000000000000000000000000000000000000000000000000000000000601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061140f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140690614a78565b60405180910390fd5b601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061145f90614a98565b919050555061146f3360016126cd565b611479600d6126eb565b808061148490614a98565b915050611366565b5050565b6000600f60009054906101000a900460ff16905090565b60006114b282612701565b9050919050565b6114c1611e63565b6001600f60026101000a81548160ff021916908315150217905550565b6114e7816127cd565b611526576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151d90614b2c565b60405180910390fd5b60005b8381101561169a5782601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a990614b98565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006115dd600e61286c565b1061161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161490614a78565b60405180910390fd5b601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061166d90614a98565b919050555061167d3360016126cd565b611687600e6126eb565b808061169290614a98565b915050611529565b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611707576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611760611e63565b61176a600061287a565b565b6000611778600d61286c565b905090565b601b6020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600f60029054906101000a900460ff1681565b60105481565b60606007805461180a90614604565b80601f016020809104026020016040519081016040528092919081815260200182805461183690614604565b80156118835780601f1061185857610100808354040283529160200191611883565b820191906000526020600020905b81548152906001019060200180831161186657829003601f168201915b5050505050905090565b600f60009054906101000a900460ff1681565b816118aa816120d5565b6118b4838361293e565b505050565b600f60019054906101000a900460ff1681565b6118d4611e63565b6000600f60016101000a81548160ff021916908315150217905550565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461192f5761192e336120d5565b5b61193b85858585612a49565b5050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b606061197182612076565b6119a7576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119b1612abc565b905060008151036119d157604051806020016040528060008152506119fc565b806119db84612b4e565b6040516020016119ec929190614bf4565b6040516020818303038152906040525b915050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60186020528060005260406000206000915054906101000a900460ff1681565b611a50611e63565b6001600f60016101000a81548160ff021916908315150217905550565b60176020528060005260406000206000915054906101000a900460ff1681565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af290614c64565b60405180910390fd5b6010544210158015611b0f57506011544211155b15611b2357611b1e8282612b9e565b611bee565b60115442118015611b3657506012544211155b15611b4a57611b458282612dd3565b611bed565b60125442118015611b5d57506013544211155b15611b7057611b6b82613008565b611bec565b60011515600f60029054906101000a900460ff16151503611b9a57611b958282612b9e565b611beb565b60011515600f60019054906101000a900460ff16151503611bc457611bbf8282612dd3565b611bea565b60011515600f60009054906101000a900460ff16151503611be957611be882613008565b5b5b5b5b5b5b611bf7346131f4565b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b601f6020528060005260406000206000915090505481565b60606040518060600160405280603681526020016154f460369139905090565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b601d6020528060005260406000206000915090505481565b611d0b611e63565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7190614cf6565b60405180910390fd5b611d838161287a565b50565b60135481565b60196020528060005260406000206000915054906101000a900460ff1681565b611db4611e63565b6000600f60026101000a81548160ff021916908315150217905550565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611e2c57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611e5c5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b611e6b6132e8565b73ffffffffffffffffffffffffffffffffffffffff16611e89611795565b73ffffffffffffffffffffffffffffffffffffffff1614611edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed690614d62565b60405180910390fd5b565b611ee961263d565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115611f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3e90614df4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611fb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fad90614e60565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600260008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600081612081612316565b11158015612090575060045482105b80156120ce575060007c0100000000000000000000000000000000000000000000000000000000600860008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156121cf576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b815260040161214c929190614e80565b602060405180830381865afa158015612169573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218d9190614ebe565b6121ce57806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016121c59190613ff3565b60405180910390fd5b5b50565b60006121dd826114a7565b90508073ffffffffffffffffffffffffffffffffffffffff166121fe6132f0565b73ffffffffffffffffffffffffffffffffffffffff16146122615761222a816122256132f0565b611c57565b612260576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b82600a600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600090565b600061232682612701565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461238d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612399846132f8565b915091506123af81876123aa6132f0565b61331f565b6123fb576123c4866123bf6132f0565b611c57565b6123fa576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612461576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61246e8686866001613363565b801561247957600082555b600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001019190508190555061254785612523888887613369565b7c020000000000000000000000000000000000000000000000000000000017613391565b600860008681526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008416036125cd57600060018501905060006008600083815260200190815260200160002054036125cb5760045481146125ca578360086000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461263586868660016133bc565b505050505050565b6000612710905090565b60026001540361268c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268390614f37565b60405180910390fd5b6002600181905550565b60018081905550565b6126ba838383604051806020016040528060008152506118f1565b505050565b6126ca8160006133c2565b50565b6126e7828260405180602001604052806000815250613614565b5050565b6001816000016000828254019250508190555050565b60008082905080612710612316565b11612796576004548110156127955760006008600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612793575b6000810361278957600860008360019003935083815260200190815260200160002054905061275f565b80925050506127c8565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600080336040516020016127e19190614f9f565b60405160208183030381529060405280519060200120905061281483612806836136b2565b6136e290919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff16602060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614915050919050565b600081600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b80600b600061294b6132f0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166129f86132f0565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612a3d9190613d7b565b60405180910390a35050565b612a54848484610ef9565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612ab657612a7f84848484613709565b612ab5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6060600c8054612acb90614604565b80601f0160208091040260200160405190810160405280929190818152602001828054612af790614604565b8015612b445780601f10612b1957610100808354040283529160200191612b44565b820191906000526020600020905b815481529060010190602001808311612b2757829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612b8957600184039350600a81066030018453600a8104905080612b67575b50828103602084039350808452505050919050565b612ba7816127cd565b612be6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bdd90615006565b60405180910390fd5b60145482612bf49190614664565b341015612c36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2d90615072565b60405180910390fd5b60005b82811015612dce577f000000000000000000000000000000000000000000000000000000000000000061ffff16601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410612ce6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cdd90614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000612d11600d61286c565b10612d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4890614a78565b60405180910390fd5b601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190612da190614a98565b9190505550612db13360016126cd565b612dbb600d6126eb565b8080612dc690614a98565b915050612c39565b505050565b612ddc816127cd565b612e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e12906150de565b60405180910390fd5b60155482612e299190614664565b341015612e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e6290615072565b60405180910390fd5b60005b82811015613003577f000000000000000000000000000000000000000000000000000000000000000061ffff16601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410612f1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f1290614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000612f46600d61286c565b10612f86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f7d90614a78565b60405180910390fd5b601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190612fd690614a98565b9190505550612fe63360016126cd565b612ff0600d6126eb565b8080612ffb90614a98565b915050612e6e565b505050565b601654816130169190614664565b341015613058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161304f90615072565b60405180910390fd5b60005b818110156131f0577f000000000000000000000000000000000000000000000000000000000000000061ffff16601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410613108576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ff90614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000613133600d61286c565b10613173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161316a90614a78565b60405180910390fd5b601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906131c390614a98565b91905055506131d33360016126cd565b6131dd600d6126eb565b80806131e890614a98565b91505061305b565b5050565b600073cc3714049ed0a6ee7c013808c8e6c255a07d846690506000606460026003856132209190614664565b61322a91906146d5565b61323491906146d5565b905060008273ffffffffffffffffffffffffffffffffffffffff168260405161325c90614737565b60006040518083038185875af1925050503d8060008114613299576040519150601f19603f3d011682016040523d82523d6000602084013e61329e565b606091505b50509050806132e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132d99061514a565b60405180910390fd5b50505050565b600033905090565b600033905090565b6000806000600a600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613380868684613859565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006133cd83612701565b905060008190506000806133e0866132f8565b915091508415613449576133fc81846133f76132f0565b61331f565b613448576134118361340c6132f0565b611c57565b613447576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b613457836000886001613363565b801561346257600082555b600160806001901b03600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061350a836134c785600088613369565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717613391565b600860008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603613590576000600187019050600060086000838152602001908152602001600020540361358e57600454811461358d578460086000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46135fa8360008860016133bc565b600560008154809291906001019190505550505050505050565b61361e8383613862565b60008373ffffffffffffffffffffffffffffffffffffffff163b146136ad5760006004549050600083820390505b61365f6000868380600101945086613709565b613695576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061364c5781600454146136aa57600080fd5b50505b505050565b6000816040516020016136c591906151e1565b604051602081830303815290604052805190602001209050919050565b60008060006136f18585613a1e565b915091506136fe81613a6f565b819250505092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261372f6132f0565b8786866040518563ffffffff1660e01b8152600401613751949392919061525c565b6020604051808303816000875af192505050801561378d57506040513d601f19601f8201168201806040525081019061378a91906152bd565b60015b613806573d80600081146137bd576040519150601f19603f3d011682016040523d82523d6000602084013e6137c2565b606091505b5060008151036137fe576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b60006004549050600082036138a3576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6138b06000848385613363565b600160406001901b178202600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613927836139186000866000613369565b61392185613bd5565b17613391565b6008600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b8181146139c857808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460018101905061398d565b5060008203613a03576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806004819055505050613a1960008483856133bc565b505050565b6000806041835103613a5f5760008060006020860151925060408601519150606086015160001a9050613a5387828585613be5565b94509450505050613a68565b60006002915091505b9250929050565b60006004811115613a8357613a826152ea565b5b816004811115613a9657613a956152ea565b5b0315613bd25760016004811115613ab057613aaf6152ea565b5b816004811115613ac357613ac26152ea565b5b03613b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613afa90615365565b60405180910390fd5b60026004811115613b1757613b166152ea565b5b816004811115613b2a57613b296152ea565b5b03613b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b61906153d1565b60405180910390fd5b60036004811115613b7e57613b7d6152ea565b5b816004811115613b9157613b906152ea565b5b03613bd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bc890615463565b60405180910390fd5b5b50565b60006001821460e11b9050919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613c20576000600391509150613cbe565b600060018787878760405160008152602001604052604051613c4594939291906154ae565b6020604051602081039080840390855afa158015613c67573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613cb557600060019250925050613cbe565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613d1081613cdb565b8114613d1b57600080fd5b50565b600081359050613d2d81613d07565b92915050565b600060208284031215613d4957613d48613cd1565b5b6000613d5784828501613d1e565b91505092915050565b60008115159050919050565b613d7581613d60565b82525050565b6000602082019050613d906000830184613d6c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613dc182613d96565b9050919050565b613dd181613db6565b8114613ddc57600080fd5b50565b600081359050613dee81613dc8565b92915050565b60006bffffffffffffffffffffffff82169050919050565b613e1581613df4565b8114613e2057600080fd5b50565b600081359050613e3281613e0c565b92915050565b60008060408385031215613e4f57613e4e613cd1565b5b6000613e5d85828601613ddf565b9250506020613e6e85828601613e23565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613eb2578082015181840152602081019050613e97565b60008484015250505050565b6000601f19601f8301169050919050565b6000613eda82613e78565b613ee48185613e83565b9350613ef4818560208601613e94565b613efd81613ebe565b840191505092915050565b60006020820190508181036000830152613f228184613ecf565b905092915050565b600060208284031215613f4057613f3f613cd1565b5b6000613f4e84828501613ddf565b91505092915050565b6000819050919050565b613f6a81613f57565b82525050565b6000602082019050613f856000830184613f61565b92915050565b613f9481613f57565b8114613f9f57600080fd5b50565b600081359050613fb181613f8b565b92915050565b600060208284031215613fcd57613fcc613cd1565b5b6000613fdb84828501613fa2565b91505092915050565b613fed81613db6565b82525050565b60006020820190506140086000830184613fe4565b92915050565b6000806040838503121561402557614024613cd1565b5b600061403385828601613ddf565b925050602061404485828601613fa2565b9150509250929050565b600061ffff82169050919050565b6140658161404e565b82525050565b6000602082019050614080600083018461405c565b92915050565b60008060006060848603121561409f5761409e613cd1565b5b60006140ad86828701613ddf565b93505060206140be86828701613ddf565b92505060406140cf86828701613fa2565b9150509250925092565b600080604083850312156140f0576140ef613cd1565b5b60006140fe85828601613fa2565b925050602061410f85828601613fa2565b9150509250929050565b600060408201905061412e6000830185613fe4565b61413b6020830184613f61565b9392505050565b6000819050919050565b600061416761416261415d84613d96565b614142565b613d96565b9050919050565b60006141798261414c565b9050919050565b600061418b8261416e565b9050919050565b61419b81614180565b82525050565b60006020820190506141b66000830184614192565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6141fe82613ebe565b810181811067ffffffffffffffff8211171561421d5761421c6141c6565b5b80604052505050565b6000614230613cc7565b905061423c82826141f5565b919050565b600067ffffffffffffffff82111561425c5761425b6141c6565b5b61426582613ebe565b9050602081019050919050565b82818337600083830152505050565b600061429461428f84614241565b614226565b9050828152602081018484840111156142b0576142af6141c1565b5b6142bb848285614272565b509392505050565b600082601f8301126142d8576142d76141bc565b5b81356142e8848260208601614281565b91505092915050565b60006020828403121561430757614306613cd1565b5b600082013567ffffffffffffffff81111561432557614324613cd6565b5b614331848285016142c3565b91505092915050565b600067ffffffffffffffff821115614355576143546141c6565b5b61435e82613ebe565b9050602081019050919050565b600061437e6143798461433a565b614226565b90508281526020810184848401111561439a576143996141c1565b5b6143a5848285614272565b509392505050565b600082601f8301126143c2576143c16141bc565b5b81356143d284826020860161436b565b91505092915050565b6000806000606084860312156143f4576143f3613cd1565b5b600061440286828701613fa2565b935050602061441386828701613fa2565b925050604084013567ffffffffffffffff81111561443457614433613cd6565b5b614440868287016143ad565b9150509250925092565b61445381613d60565b811461445e57600080fd5b50565b6000813590506144708161444a565b92915050565b6000806040838503121561448d5761448c613cd1565b5b600061449b85828601613ddf565b92505060206144ac85828601614461565b9150509250929050565b600080600080608085870312156144d0576144cf613cd1565b5b60006144de87828801613ddf565b94505060206144ef87828801613ddf565b935050604061450087828801613fa2565b925050606085013567ffffffffffffffff81111561452157614520613cd6565b5b61452d878288016143ad565b91505092959194509250565b600080604083850312156145505761454f613cd1565b5b600061455e85828601613fa2565b925050602083013567ffffffffffffffff81111561457f5761457e613cd6565b5b61458b858286016143ad565b9150509250929050565b600080604083850312156145ac576145ab613cd1565b5b60006145ba85828601613ddf565b92505060206145cb85828601613ddf565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061461c57607f821691505b60208210810361462f5761462e6145d5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061466f82613f57565b915061467a83613f57565b925082820261468881613f57565b9150828204841483151761469f5761469e614635565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006146e082613f57565b91506146eb83613f57565b9250826146fb576146fa6146a6565b5b828204905092915050565b600081905092915050565b50565b6000614721600083614706565b915061472c82614711565b600082019050919050565b600061474282614714565b9150819050919050565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b6000614782601083613e83565b915061478d8261474c565b602082019050919050565b600060208201905081810360008301526147b181614775565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261481a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826147dd565b61482486836147dd565b95508019841693508086168417925050509392505050565b600061485761485261484d84613f57565b614142565b613f57565b9050919050565b6000819050919050565b6148718361483c565b61488561487d8261485e565b8484546147ea565b825550505050565b600090565b61489a61488d565b6148a5818484614868565b505050565b5b818110156148c9576148be600082614892565b6001810190506148ab565b5050565b601f82111561490e576148df816147b8565b6148e8846147cd565b810160208510156148f7578190505b61490b614903856147cd565b8301826148aa565b50505b505050565b600082821c905092915050565b600061493160001984600802614913565b1980831691505092915050565b600061494a8383614920565b9150826002028217905092915050565b61496382613e78565b67ffffffffffffffff81111561497c5761497b6141c6565b5b6149868254614604565b6149918282856148cd565b600060209050601f8311600181146149c457600084156149b2578287015190505b6149bc858261493e565b865550614a24565b601f1984166149d2866147b8565b60005b828110156149fa578489015182556001820191506020850194506020810190506149d5565b86831015614a175784890151614a13601f891682614920565b8355505b6001600288020188555050505b505050505050565b7f4578636565642063617000000000000000000000000000000000000000000000600082015250565b6000614a62600a83613e83565b9150614a6d82614a2c565b602082019050919050565b60006020820190508181036000830152614a9181614a55565b9050919050565b6000614aa382613f57565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614ad557614ad4614635565b5b600182019050919050565b7f4e4f545f494e5f465245455f4c49535400000000000000000000000000000000600082015250565b6000614b16601083613e83565b9150614b2182614ae0565b602082019050919050565b60006020820190508181036000830152614b4581614b09565b9050919050565b7f4578636565642071756f74610000000000000000000000000000000000000000600082015250565b6000614b82600c83613e83565b9150614b8d82614b4c565b602082019050919050565b60006020820190508181036000830152614bb181614b75565b9050919050565b600081905092915050565b6000614bce82613e78565b614bd88185614bb8565b9350614be8818560208601613e94565b80840191505092915050565b6000614c008285614bc3565b9150614c0c8284614bc3565b91508190509392505050565b7f596f752063616e277420757365206f7468657220636f6e74726163742e000000600082015250565b6000614c4e601d83613e83565b9150614c5982614c18565b602082019050919050565b60006020820190508181036000830152614c7d81614c41565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614ce0602683613e83565b9150614ceb82614c84565b604082019050919050565b60006020820190508181036000830152614d0f81614cd3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614d4c602083613e83565b9150614d5782614d16565b602082019050919050565b60006020820190508181036000830152614d7b81614d3f565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614dde602a83613e83565b9150614de982614d82565b604082019050919050565b60006020820190508181036000830152614e0d81614dd1565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614e4a601983613e83565b9150614e5582614e14565b602082019050919050565b60006020820190508181036000830152614e7981614e3d565b9050919050565b6000604082019050614e956000830185613fe4565b614ea26020830184613fe4565b9392505050565b600081519050614eb88161444a565b92915050565b600060208284031215614ed457614ed3613cd1565b5b6000614ee284828501614ea9565b91505092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614f21601f83613e83565b9150614f2c82614eeb565b602082019050919050565b60006020820190508181036000830152614f5081614f14565b9050919050565b60008160601b9050919050565b6000614f6f82614f57565b9050919050565b6000614f8182614f64565b9050919050565b614f99614f9482613db6565b614f76565b82525050565b6000614fab8284614f88565b60148201915081905092915050565b7f4e4f545f494e5f484f4c444552535f4c49535400000000000000000000000000600082015250565b6000614ff0601383613e83565b9150614ffb82614fba565b602082019050919050565b6000602082019050818103600083015261501f81614fe3565b9050919050565b7f4e6f7420656e6f7567682066756e64732e000000000000000000000000000000600082015250565b600061505c601183613e83565b915061506782615026565b602082019050919050565b6000602082019050818103600083015261508b8161504f565b9050919050565b7f4e4f545f494e5f57484954455f4c495354000000000000000000000000000000600082015250565b60006150c8601183613e83565b91506150d382615092565b602082019050919050565b600060208201905081810360008301526150f7816150bb565b9050919050565b7f5472616e7366657220746f20627569646c6572206661696c65642e0000000000600082015250565b6000615134601b83613e83565b915061513f826150fe565b602082019050919050565b6000602082019050818103600083015261516381615127565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b60006151a0601c83614bb8565b91506151ab8261516a565b601c82019050919050565b6000819050919050565b6000819050919050565b6151db6151d6826151b6565b6151c0565b82525050565b60006151ec82615193565b91506151f882846151ca565b60208201915081905092915050565b600081519050919050565b600082825260208201905092915050565b600061522e82615207565b6152388185615212565b9350615248818560208601613e94565b61525181613ebe565b840191505092915050565b60006080820190506152716000830187613fe4565b61527e6020830186613fe4565b61528b6040830185613f61565b818103606083015261529d8184615223565b905095945050505050565b6000815190506152b781613d07565b92915050565b6000602082840312156152d3576152d2613cd1565b5b60006152e1848285016152a8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061534f601883613e83565b915061535a82615319565b602082019050919050565b6000602082019050818103600083015261537e81615342565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006153bb601f83613e83565b91506153c682615385565b602082019050919050565b600060208201905081810360008301526153ea816153ae565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061544d602283613e83565b9150615458826153f1565b604082019050919050565b6000602082019050818103600083015261547c81615440565b9050919050565b61548c816151b6565b82525050565b600060ff82169050919050565b6154a881615492565b82525050565b60006080820190506154c36000830187615483565b6154d0602083018661549f565b6154dd6040830185615483565b6154ea6060830184615483565b9594505050505056fe68747470733a2f2f627569646c65722e69742f6d696e746572732f63772f76312f6a736f6e2f636f6e74726163746d65746164617461a2646970667358221220c28fd04158fa4e79aad0a6ecfc2389e942ab51a767026c59f9df514d5b759b3c64736f6c6343000811003368747470733a2f2f627569646c65722e69742f6d696e746572732f63772f76312f6a736f6e2f
Deployed Bytecode
0x6080604052600436106103765760003560e01c8063715018a6116101d1578063c87b56dd11610102578063e46bce59116100a0578063f2fde38b1161006f578063f2fde38b14610c8e578063f364d82f14610cb7578063f9502a7214610ce2578063fe06634114610d1f57610376565b8063e46bce5914610bac578063e8a3d48514610be9578063e985e9c514610c14578063eddae94c14610c5157610376565b8063d3cd4ec3116100dc578063d3cd4ec314610b11578063d7dbe00714610b28578063db7fd40814610b65578063e2075df014610b8157610376565b8063c87b56dd14610a6c578063c932a3dc14610aa9578063c9dbfbd414610ad457610376565b806395d89b411161016f578063af07145f11610149578063af07145f146109e3578063b6498c8214610a0e578063b88d4fde14610a25578063badb2e0514610a4157610376565b806395d89b4114610964578063a0da40651461098f578063a22cb465146109ba57610376565b80638da5cb5b116101ab5780638da5cb5b146108b85780638f770ad0146108e3578063932652261461090e5780639414760e1461093957610376565b8063715018a6146108395780637a0d2302146108505780638940dd6b1461087b57610376565b80633f48773e116102ab57806355f804b3116102495780636352211e116102235780636352211e1461077f5780636c502c2d146107bc5780636e8c15f3146107d357806370a08231146107fc57610376565b806355f804b3146107025780635950ae201461072b5780635b92ac0d1461075457610376565b806342966c681161028557806342966c681461066e5780634565b4431461069757806345f7e06e146106d4578063557d694c146106eb57610376565b80633f48773e146105fc57806341f434341461062757806342842e0e1461065257610376565b806318160ddd1161031857806323b872dd116102f257806323b872dd1461056057806327ee23e61461057c5780632a55205a146105a75780633ccfd60b146105e557610376565b806318160ddd146104cd5780631d3ce40c146104f8578063214ceca81461052357610376565b8063072d26c511610354578063072d26c51461040c578063081812fc14610449578063095ea7b3146104865780631595fe50146104a257610376565b806301ffc9a71461037b57806304634d8d146103b857806306fdde03146103e1575b600080fd5b34801561038757600080fd5b506103a2600480360381019061039d9190613d33565b610d36565b6040516103af9190613d7b565b60405180910390f35b3480156103c457600080fd5b506103df60048036038101906103da9190613e38565b610d48565b005b3480156103ed57600080fd5b506103f6610d5e565b6040516104039190613f08565b60405180910390f35b34801561041857600080fd5b50610433600480360381019061042e9190613f2a565b610df0565b6040516104409190613f70565b60405180910390f35b34801561045557600080fd5b50610470600480360381019061046b9190613fb7565b610e08565b60405161047d9190613ff3565b60405180910390f35b6104a0600480360381019061049b919061400e565b610e87565b005b3480156104ae57600080fd5b506104b7610ea0565b6040516104c4919061406b565b60405180910390f35b3480156104d957600080fd5b506104e2610ec4565b6040516104ef9190613f70565b60405180910390f35b34801561050457600080fd5b5061050d610edb565b60405161051a9190613f70565b60405180910390f35b34801561052f57600080fd5b5061054a60048036038101906105459190613f2a565b610ee1565b6040516105579190613f70565b60405180910390f35b61057a60048036038101906105759190614086565b610ef9565b005b34801561058857600080fd5b50610591610f48565b60405161059e9190613f70565b60405180910390f35b3480156105b357600080fd5b506105ce60048036038101906105c991906140d9565b610f6c565b6040516105dc929190614119565b60405180910390f35b3480156105f157600080fd5b506105fa611156565b005b34801561060857600080fd5b50610611611223565b60405161061e9190613f70565b60405180910390f35b34801561063357600080fd5b5061063c611229565b60405161064991906141a1565b60405180910390f35b61066c60048036038101906106679190614086565b61123b565b005b34801561067a57600080fd5b5061069560048036038101906106909190613fb7565b61128a565b005b3480156106a357600080fd5b506106be60048036038101906106b99190613f2a565b6112de565b6040516106cb9190613f70565b60405180910390f35b3480156106e057600080fd5b506106e96112f6565b005b3480156106f757600080fd5b5061070061131b565b005b34801561070e57600080fd5b50610729600480360381019061072491906142f1565b611340565b005b34801561073757600080fd5b50610752600480360381019061074d9190613fb7565b61135b565b005b34801561076057600080fd5b50610769611490565b6040516107769190613d7b565b60405180910390f35b34801561078b57600080fd5b506107a660048036038101906107a19190613fb7565b6114a7565b6040516107b39190613ff3565b60405180910390f35b3480156107c857600080fd5b506107d16114b9565b005b3480156107df57600080fd5b506107fa60048036038101906107f591906143db565b6114de565b005b34801561080857600080fd5b50610823600480360381019061081e9190613f2a565b6116a0565b6040516108309190613f70565b60405180910390f35b34801561084557600080fd5b5061084e611758565b005b34801561085c57600080fd5b5061086561176c565b6040516108729190613f70565b60405180910390f35b34801561088757600080fd5b506108a2600480360381019061089d9190613f2a565b61177d565b6040516108af9190613f70565b60405180910390f35b3480156108c457600080fd5b506108cd611795565b6040516108da9190613ff3565b60405180910390f35b3480156108ef57600080fd5b506108f86117be565b6040516109059190613f70565b60405180910390f35b34801561091a57600080fd5b506109236117e2565b6040516109309190613d7b565b60405180910390f35b34801561094557600080fd5b5061094e6117f5565b60405161095b9190613f70565b60405180910390f35b34801561097057600080fd5b506109796117fb565b6040516109869190613f08565b60405180910390f35b34801561099b57600080fd5b506109a461188d565b6040516109b19190613d7b565b60405180910390f35b3480156109c657600080fd5b506109e160048036038101906109dc9190614476565b6118a0565b005b3480156109ef57600080fd5b506109f86118b9565b604051610a059190613d7b565b60405180910390f35b348015610a1a57600080fd5b50610a236118cc565b005b610a3f6004803603810190610a3a91906144b6565b6118f1565b005b348015610a4d57600080fd5b50610a56611942565b604051610a63919061406b565b60405180910390f35b348015610a7857600080fd5b50610a936004803603810190610a8e9190613fb7565b611966565b604051610aa09190613f08565b60405180910390f35b348015610ab557600080fd5b50610abe611a04565b604051610acb919061406b565b60405180910390f35b348015610ae057600080fd5b50610afb6004803603810190610af69190613f2a565b611a28565b604051610b089190613d7b565b60405180910390f35b348015610b1d57600080fd5b50610b26611a48565b005b348015610b3457600080fd5b50610b4f6004803603810190610b4a9190613f2a565b611a6d565b604051610b5c9190613d7b565b60405180910390f35b610b7f6004803603810190610b7a9190614539565b611a8d565b005b348015610b8d57600080fd5b50610b96611bfb565b604051610ba39190613f70565b60405180910390f35b348015610bb857600080fd5b50610bd36004803603810190610bce9190613f2a565b611c1f565b604051610be09190613f70565b60405180910390f35b348015610bf557600080fd5b50610bfe611c37565b604051610c0b9190613f08565b60405180910390f35b348015610c2057600080fd5b50610c3b6004803603810190610c369190614595565b611c57565b604051610c489190613d7b565b60405180910390f35b348015610c5d57600080fd5b50610c786004803603810190610c739190613f2a565b611ceb565b604051610c859190613f70565b60405180910390f35b348015610c9a57600080fd5b50610cb56004803603810190610cb09190613f2a565b611d03565b005b348015610cc357600080fd5b50610ccc611d86565b604051610cd99190613f70565b60405180910390f35b348015610cee57600080fd5b50610d096004803603810190610d049190613f2a565b611d8c565b604051610d169190613d7b565b60405180910390f35b348015610d2b57600080fd5b50610d34611dac565b005b6000610d4182611dd1565b9050919050565b610d50611e63565b610d5a8282611ee1565b5050565b606060068054610d6d90614604565b80601f0160208091040260200160405190810160405280929190818152602001828054610d9990614604565b8015610de65780601f10610dbb57610100808354040283529160200191610de6565b820191906000526020600020905b815481529060010190602001808311610dc957829003601f168201915b5050505050905090565b601a6020528060005260406000206000915090505481565b6000610e1382612076565b610e49576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610e91816120d5565b610e9b83836121d2565b505050565b7f000000000000000000000000000000000000000000000000000000000000138881565b6000610ece612316565b6005546004540303905090565b60115481565b601c6020528060005260406000206000915090505481565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f3757610f36336120d5565b5b610f4284848461231b565b50505050565b7f000000000000000000000000000000000000000000000000000000000000020881565b6000806000600360008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff16036111015760026040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b600061110b61263d565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff16866111379190614664565b61114191906146d5565b90508160000151819350935050509250929050565b61115e611e63565b611166612647565b600047905060003373ffffffffffffffffffffffffffffffffffffffff168260405161119190614737565b60006040518083038185875af1925050503d80600081146111ce576040519150601f19603f3d011682016040523d82523d6000602084013e6111d3565b606091505b5050905080611217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120e90614798565b60405180910390fd5b5050611221612696565b565b60125481565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461127957611278336120d5565b5b61128484848461269f565b50505050565b611292611e63565b3373ffffffffffffffffffffffffffffffffffffffff166112b2826114a7565b73ffffffffffffffffffffffffffffffffffffffff16146112d257600080fd5b6112db816126bf565b50565b601e6020528060005260406000206000915090505481565b6112fe611e63565b6001600f60006101000a81548160ff021916908315150217905550565b611323611e63565b6000600f60006101000a81548160ff021916908315150217905550565b611348611e63565b80600c9081611357919061495a565b5050565b611363611e63565b60005b8181101561148c577f0000000000000000000000000000000000000000000000000000000000000208601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061140f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140690614a78565b60405180910390fd5b601f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061145f90614a98565b919050555061146f3360016126cd565b611479600d6126eb565b808061148490614a98565b915050611366565b5050565b6000600f60009054906101000a900460ff16905090565b60006114b282612701565b9050919050565b6114c1611e63565b6001600f60026101000a81548160ff021916908315150217905550565b6114e7816127cd565b611526576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151d90614b2c565b60405180910390fd5b60005b8381101561169a5782601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106115b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a990614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000a146115dd600e61286c565b1061161d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161490614a78565b60405180910390fd5b601e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919061166d90614a98565b919050555061167d3360016126cd565b611687600e6126eb565b808061169290614a98565b915050611529565b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611707576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611760611e63565b61176a600061287a565b565b6000611778600d61286c565b905090565b601b6020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f0000000000000000000000000000000000000000000000000000000000001af481565b600f60029054906101000a900460ff1681565b60105481565b60606007805461180a90614604565b80601f016020809104026020016040519081016040528092919081815260200182805461183690614604565b80156118835780601f1061185857610100808354040283529160200191611883565b820191906000526020600020905b81548152906001019060200180831161186657829003601f168201915b5050505050905090565b600f60009054906101000a900460ff1681565b816118aa816120d5565b6118b4838361293e565b505050565b600f60019054906101000a900460ff1681565b6118d4611e63565b6000600f60016101000a81548160ff021916908315150217905550565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461192f5761192e336120d5565b5b61193b85858585612a49565b5050505050565b7f000000000000000000000000000000000000000000000000000000000000000681565b606061197182612076565b6119a7576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119b1612abc565b905060008151036119d157604051806020016040528060008152506119fc565b806119db84612b4e565b6040516020016119ec929190614bf4565b6040516020818303038152906040525b915050919050565b7f000000000000000000000000000000000000000000000000000000000000138881565b60186020528060005260406000206000915054906101000a900460ff1681565b611a50611e63565b6001600f60016101000a81548160ff021916908315150217905550565b60176020528060005260406000206000915054906101000a900460ff1681565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611af290614c64565b60405180910390fd5b6010544210158015611b0f57506011544211155b15611b2357611b1e8282612b9e565b611bee565b60115442118015611b3657506012544211155b15611b4a57611b458282612dd3565b611bed565b60125442118015611b5d57506013544211155b15611b7057611b6b82613008565b611bec565b60011515600f60029054906101000a900460ff16151503611b9a57611b958282612b9e565b611beb565b60011515600f60019054906101000a900460ff16151503611bc457611bbf8282612dd3565b611bea565b60011515600f60009054906101000a900460ff16151503611be957611be882613008565b5b5b5b5b5b5b611bf7346131f4565b5050565b7f0000000000000000000000000000000000000000000000000000000000000a1481565b601f6020528060005260406000206000915090505481565b60606040518060600160405280603681526020016154f460369139905090565b6000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b601d6020528060005260406000206000915090505481565b611d0b611e63565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611d7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7190614cf6565b60405180910390fd5b611d838161287a565b50565b60135481565b60196020528060005260406000206000915054906101000a900460ff1681565b611db4611e63565b6000600f60026101000a81548160ff021916908315150217905550565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611e2c57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611e5c5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b611e6b6132e8565b73ffffffffffffffffffffffffffffffffffffffff16611e89611795565b73ffffffffffffffffffffffffffffffffffffffff1614611edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ed690614d62565b60405180910390fd5b565b611ee961263d565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115611f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3e90614df4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611fb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fad90614e60565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600260008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600081612081612316565b11158015612090575060045482105b80156120ce575060007c0100000000000000000000000000000000000000000000000000000000600860008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b11156121cf576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b815260040161214c929190614e80565b602060405180830381865afa158015612169573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218d9190614ebe565b6121ce57806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016121c59190613ff3565b60405180910390fd5b5b50565b60006121dd826114a7565b90508073ffffffffffffffffffffffffffffffffffffffff166121fe6132f0565b73ffffffffffffffffffffffffffffffffffffffff16146122615761222a816122256132f0565b611c57565b612260576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b82600a600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600090565b600061232682612701565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461238d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612399846132f8565b915091506123af81876123aa6132f0565b61331f565b6123fb576123c4866123bf6132f0565b611c57565b6123fa576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612461576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61246e8686866001613363565b801561247957600082555b600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001019190508190555061254785612523888887613369565b7c020000000000000000000000000000000000000000000000000000000017613391565b600860008681526020019081526020016000208190555060007c02000000000000000000000000000000000000000000000000000000008416036125cd57600060018501905060006008600083815260200190815260200160002054036125cb5760045481146125ca578360086000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461263586868660016133bc565b505050505050565b6000612710905090565b60026001540361268c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268390614f37565b60405180910390fd5b6002600181905550565b60018081905550565b6126ba838383604051806020016040528060008152506118f1565b505050565b6126ca8160006133c2565b50565b6126e7828260405180602001604052806000815250613614565b5050565b6001816000016000828254019250508190555050565b60008082905080612710612316565b11612796576004548110156127955760006008600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612793575b6000810361278957600860008360019003935083815260200190815260200160002054905061275f565b80925050506127c8565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600080336040516020016127e19190614f9f565b60405160208183030381529060405280519060200120905061281483612806836136b2565b6136e290919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff16602060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614915050919050565b600081600001549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b80600b600061294b6132f0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff166129f86132f0565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612a3d9190613d7b565b60405180910390a35050565b612a54848484610ef9565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612ab657612a7f84848484613709565b612ab5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6060600c8054612acb90614604565b80601f0160208091040260200160405190810160405280929190818152602001828054612af790614604565b8015612b445780601f10612b1957610100808354040283529160200191612b44565b820191906000526020600020905b815481529060010190602001808311612b2757829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612b8957600184039350600a81066030018453600a8104905080612b67575b50828103602084039350808452505050919050565b612ba7816127cd565b612be6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bdd90615006565b60405180910390fd5b60145482612bf49190614664565b341015612c36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2d90615072565b60405180910390fd5b60005b82811015612dce577f000000000000000000000000000000000000000000000000000000000000000661ffff16601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410612ce6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cdd90614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000001af4612d11600d61286c565b10612d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4890614a78565b60405180910390fd5b601b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190612da190614a98565b9190505550612db13360016126cd565b612dbb600d6126eb565b8080612dc690614a98565b915050612c39565b505050565b612ddc816127cd565b612e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e12906150de565b60405180910390fd5b60155482612e299190614664565b341015612e6b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e6290615072565b60405180910390fd5b60005b82811015613003577f000000000000000000000000000000000000000000000000000000000000138861ffff16601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410612f1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f1290614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000001af4612f46600d61286c565b10612f86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f7d90614a78565b60405180910390fd5b601c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190612fd690614a98565b9190505550612fe63360016126cd565b612ff0600d6126eb565b8080612ffb90614a98565b915050612e6e565b505050565b601654816130169190614664565b341015613058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161304f90615072565b60405180910390fd5b60005b818110156131f0577f000000000000000000000000000000000000000000000000000000000000138861ffff16601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410613108576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ff90614b98565b60405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000001af4613133600d61286c565b10613173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161316a90614a78565b60405180910390fd5b601d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906131c390614a98565b91905055506131d33360016126cd565b6131dd600d6126eb565b80806131e890614a98565b91505061305b565b5050565b600073cc3714049ed0a6ee7c013808c8e6c255a07d846690506000606460026003856132209190614664565b61322a91906146d5565b61323491906146d5565b905060008273ffffffffffffffffffffffffffffffffffffffff168260405161325c90614737565b60006040518083038185875af1925050503d8060008114613299576040519150601f19603f3d011682016040523d82523d6000602084013e61329e565b606091505b50509050806132e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132d99061514a565b60405180910390fd5b50505050565b600033905090565b600033905090565b6000806000600a600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613380868684613859565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006133cd83612701565b905060008190506000806133e0866132f8565b915091508415613449576133fc81846133f76132f0565b61331f565b613448576134118361340c6132f0565b611c57565b613447576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b613457836000886001613363565b801561346257600082555b600160806001901b03600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061350a836134c785600088613369565b7c02000000000000000000000000000000000000000000000000000000007c01000000000000000000000000000000000000000000000000000000001717613391565b600860008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603613590576000600187019050600060086000838152602001908152602001600020540361358e57600454811461358d578460086000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46135fa8360008860016133bc565b600560008154809291906001019190505550505050505050565b61361e8383613862565b60008373ffffffffffffffffffffffffffffffffffffffff163b146136ad5760006004549050600083820390505b61365f6000868380600101945086613709565b613695576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061364c5781600454146136aa57600080fd5b50505b505050565b6000816040516020016136c591906151e1565b604051602081830303815290604052805190602001209050919050565b60008060006136f18585613a1e565b915091506136fe81613a6f565b819250505092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261372f6132f0565b8786866040518563ffffffff1660e01b8152600401613751949392919061525c565b6020604051808303816000875af192505050801561378d57506040513d601f19601f8201168201806040525081019061378a91906152bd565b60015b613806573d80600081146137bd576040519150601f19603f3d011682016040523d82523d6000602084013e6137c2565b606091505b5060008151036137fe576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b60006004549050600082036138a3576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6138b06000848385613363565b600160406001901b178202600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613927836139186000866000613369565b61392185613bd5565b17613391565b6008600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b8181146139c857808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460018101905061398d565b5060008203613a03576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806004819055505050613a1960008483856133bc565b505050565b6000806041835103613a5f5760008060006020860151925060408601519150606086015160001a9050613a5387828585613be5565b94509450505050613a68565b60006002915091505b9250929050565b60006004811115613a8357613a826152ea565b5b816004811115613a9657613a956152ea565b5b0315613bd25760016004811115613ab057613aaf6152ea565b5b816004811115613ac357613ac26152ea565b5b03613b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613afa90615365565b60405180910390fd5b60026004811115613b1757613b166152ea565b5b816004811115613b2a57613b296152ea565b5b03613b6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b61906153d1565b60405180910390fd5b60036004811115613b7e57613b7d6152ea565b5b816004811115613b9157613b906152ea565b5b03613bd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613bc890615463565b60405180910390fd5b5b50565b60006001821460e11b9050919050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613c20576000600391509150613cbe565b600060018787878760405160008152602001604052604051613c4594939291906154ae565b6020604051602081039080840390855afa158015613c67573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613cb557600060019250925050613cbe565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613d1081613cdb565b8114613d1b57600080fd5b50565b600081359050613d2d81613d07565b92915050565b600060208284031215613d4957613d48613cd1565b5b6000613d5784828501613d1e565b91505092915050565b60008115159050919050565b613d7581613d60565b82525050565b6000602082019050613d906000830184613d6c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613dc182613d96565b9050919050565b613dd181613db6565b8114613ddc57600080fd5b50565b600081359050613dee81613dc8565b92915050565b60006bffffffffffffffffffffffff82169050919050565b613e1581613df4565b8114613e2057600080fd5b50565b600081359050613e3281613e0c565b92915050565b60008060408385031215613e4f57613e4e613cd1565b5b6000613e5d85828601613ddf565b9250506020613e6e85828601613e23565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613eb2578082015181840152602081019050613e97565b60008484015250505050565b6000601f19601f8301169050919050565b6000613eda82613e78565b613ee48185613e83565b9350613ef4818560208601613e94565b613efd81613ebe565b840191505092915050565b60006020820190508181036000830152613f228184613ecf565b905092915050565b600060208284031215613f4057613f3f613cd1565b5b6000613f4e84828501613ddf565b91505092915050565b6000819050919050565b613f6a81613f57565b82525050565b6000602082019050613f856000830184613f61565b92915050565b613f9481613f57565b8114613f9f57600080fd5b50565b600081359050613fb181613f8b565b92915050565b600060208284031215613fcd57613fcc613cd1565b5b6000613fdb84828501613fa2565b91505092915050565b613fed81613db6565b82525050565b60006020820190506140086000830184613fe4565b92915050565b6000806040838503121561402557614024613cd1565b5b600061403385828601613ddf565b925050602061404485828601613fa2565b9150509250929050565b600061ffff82169050919050565b6140658161404e565b82525050565b6000602082019050614080600083018461405c565b92915050565b60008060006060848603121561409f5761409e613cd1565b5b60006140ad86828701613ddf565b93505060206140be86828701613ddf565b92505060406140cf86828701613fa2565b9150509250925092565b600080604083850312156140f0576140ef613cd1565b5b60006140fe85828601613fa2565b925050602061410f85828601613fa2565b9150509250929050565b600060408201905061412e6000830185613fe4565b61413b6020830184613f61565b9392505050565b6000819050919050565b600061416761416261415d84613d96565b614142565b613d96565b9050919050565b60006141798261414c565b9050919050565b600061418b8261416e565b9050919050565b61419b81614180565b82525050565b60006020820190506141b66000830184614192565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6141fe82613ebe565b810181811067ffffffffffffffff8211171561421d5761421c6141c6565b5b80604052505050565b6000614230613cc7565b905061423c82826141f5565b919050565b600067ffffffffffffffff82111561425c5761425b6141c6565b5b61426582613ebe565b9050602081019050919050565b82818337600083830152505050565b600061429461428f84614241565b614226565b9050828152602081018484840111156142b0576142af6141c1565b5b6142bb848285614272565b509392505050565b600082601f8301126142d8576142d76141bc565b5b81356142e8848260208601614281565b91505092915050565b60006020828403121561430757614306613cd1565b5b600082013567ffffffffffffffff81111561432557614324613cd6565b5b614331848285016142c3565b91505092915050565b600067ffffffffffffffff821115614355576143546141c6565b5b61435e82613ebe565b9050602081019050919050565b600061437e6143798461433a565b614226565b90508281526020810184848401111561439a576143996141c1565b5b6143a5848285614272565b509392505050565b600082601f8301126143c2576143c16141bc565b5b81356143d284826020860161436b565b91505092915050565b6000806000606084860312156143f4576143f3613cd1565b5b600061440286828701613fa2565b935050602061441386828701613fa2565b925050604084013567ffffffffffffffff81111561443457614433613cd6565b5b614440868287016143ad565b9150509250925092565b61445381613d60565b811461445e57600080fd5b50565b6000813590506144708161444a565b92915050565b6000806040838503121561448d5761448c613cd1565b5b600061449b85828601613ddf565b92505060206144ac85828601614461565b9150509250929050565b600080600080608085870312156144d0576144cf613cd1565b5b60006144de87828801613ddf565b94505060206144ef87828801613ddf565b935050604061450087828801613fa2565b925050606085013567ffffffffffffffff81111561452157614520613cd6565b5b61452d878288016143ad565b91505092959194509250565b600080604083850312156145505761454f613cd1565b5b600061455e85828601613fa2565b925050602083013567ffffffffffffffff81111561457f5761457e613cd6565b5b61458b858286016143ad565b9150509250929050565b600080604083850312156145ac576145ab613cd1565b5b60006145ba85828601613ddf565b92505060206145cb85828601613ddf565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061461c57607f821691505b60208210810361462f5761462e6145d5565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061466f82613f57565b915061467a83613f57565b925082820261468881613f57565b9150828204841483151761469f5761469e614635565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006146e082613f57565b91506146eb83613f57565b9250826146fb576146fa6146a6565b5b828204905092915050565b600081905092915050565b50565b6000614721600083614706565b915061472c82614711565b600082019050919050565b600061474282614714565b9150819050919050565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b6000614782601083613e83565b915061478d8261474c565b602082019050919050565b600060208201905081810360008301526147b181614775565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261481a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826147dd565b61482486836147dd565b95508019841693508086168417925050509392505050565b600061485761485261484d84613f57565b614142565b613f57565b9050919050565b6000819050919050565b6148718361483c565b61488561487d8261485e565b8484546147ea565b825550505050565b600090565b61489a61488d565b6148a5818484614868565b505050565b5b818110156148c9576148be600082614892565b6001810190506148ab565b5050565b601f82111561490e576148df816147b8565b6148e8846147cd565b810160208510156148f7578190505b61490b614903856147cd565b8301826148aa565b50505b505050565b600082821c905092915050565b600061493160001984600802614913565b1980831691505092915050565b600061494a8383614920565b9150826002028217905092915050565b61496382613e78565b67ffffffffffffffff81111561497c5761497b6141c6565b5b6149868254614604565b6149918282856148cd565b600060209050601f8311600181146149c457600084156149b2578287015190505b6149bc858261493e565b865550614a24565b601f1984166149d2866147b8565b60005b828110156149fa578489015182556001820191506020850194506020810190506149d5565b86831015614a175784890151614a13601f891682614920565b8355505b6001600288020188555050505b505050505050565b7f4578636565642063617000000000000000000000000000000000000000000000600082015250565b6000614a62600a83613e83565b9150614a6d82614a2c565b602082019050919050565b60006020820190508181036000830152614a9181614a55565b9050919050565b6000614aa382613f57565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614ad557614ad4614635565b5b600182019050919050565b7f4e4f545f494e5f465245455f4c49535400000000000000000000000000000000600082015250565b6000614b16601083613e83565b9150614b2182614ae0565b602082019050919050565b60006020820190508181036000830152614b4581614b09565b9050919050565b7f4578636565642071756f74610000000000000000000000000000000000000000600082015250565b6000614b82600c83613e83565b9150614b8d82614b4c565b602082019050919050565b60006020820190508181036000830152614bb181614b75565b9050919050565b600081905092915050565b6000614bce82613e78565b614bd88185614bb8565b9350614be8818560208601613e94565b80840191505092915050565b6000614c008285614bc3565b9150614c0c8284614bc3565b91508190509392505050565b7f596f752063616e277420757365206f7468657220636f6e74726163742e000000600082015250565b6000614c4e601d83613e83565b9150614c5982614c18565b602082019050919050565b60006020820190508181036000830152614c7d81614c41565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614ce0602683613e83565b9150614ceb82614c84565b604082019050919050565b60006020820190508181036000830152614d0f81614cd3565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614d4c602083613e83565b9150614d5782614d16565b602082019050919050565b60006020820190508181036000830152614d7b81614d3f565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614dde602a83613e83565b9150614de982614d82565b604082019050919050565b60006020820190508181036000830152614e0d81614dd1565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614e4a601983613e83565b9150614e5582614e14565b602082019050919050565b60006020820190508181036000830152614e7981614e3d565b9050919050565b6000604082019050614e956000830185613fe4565b614ea26020830184613fe4565b9392505050565b600081519050614eb88161444a565b92915050565b600060208284031215614ed457614ed3613cd1565b5b6000614ee284828501614ea9565b91505092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000614f21601f83613e83565b9150614f2c82614eeb565b602082019050919050565b60006020820190508181036000830152614f5081614f14565b9050919050565b60008160601b9050919050565b6000614f6f82614f57565b9050919050565b6000614f8182614f64565b9050919050565b614f99614f9482613db6565b614f76565b82525050565b6000614fab8284614f88565b60148201915081905092915050565b7f4e4f545f494e5f484f4c444552535f4c49535400000000000000000000000000600082015250565b6000614ff0601383613e83565b9150614ffb82614fba565b602082019050919050565b6000602082019050818103600083015261501f81614fe3565b9050919050565b7f4e6f7420656e6f7567682066756e64732e000000000000000000000000000000600082015250565b600061505c601183613e83565b915061506782615026565b602082019050919050565b6000602082019050818103600083015261508b8161504f565b9050919050565b7f4e4f545f494e5f57484954455f4c495354000000000000000000000000000000600082015250565b60006150c8601183613e83565b91506150d382615092565b602082019050919050565b600060208201905081810360008301526150f7816150bb565b9050919050565b7f5472616e7366657220746f20627569646c6572206661696c65642e0000000000600082015250565b6000615134601b83613e83565b915061513f826150fe565b602082019050919050565b6000602082019050818103600083015261516381615127565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b60006151a0601c83614bb8565b91506151ab8261516a565b601c82019050919050565b6000819050919050565b6000819050919050565b6151db6151d6826151b6565b6151c0565b82525050565b60006151ec82615193565b91506151f882846151ca565b60208201915081905092915050565b600081519050919050565b600082825260208201905092915050565b600061522e82615207565b6152388185615212565b9350615248818560208601613e94565b61525181613ebe565b840191505092915050565b60006080820190506152716000830187613fe4565b61527e6020830186613fe4565b61528b6040830185613f61565b818103606083015261529d8184615223565b905095945050505050565b6000815190506152b781613d07565b92915050565b6000602082840312156152d3576152d2613cd1565b5b60006152e1848285016152a8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061534f601883613e83565b915061535a82615319565b602082019050919050565b6000602082019050818103600083015261537e81615342565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006153bb601f83613e83565b91506153c682615385565b602082019050919050565b600060208201905081810360008301526153ea816153ae565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b600061544d602283613e83565b9150615458826153f1565b604082019050919050565b6000602082019050818103600083015261547c81615440565b9050919050565b61548c816151b6565b82525050565b600060ff82169050919050565b6154a881615492565b82525050565b60006080820190506154c36000830187615483565b6154d0602083018661549f565b6154dd6040830185615483565b6154ea6060830184615483565b9594505050505056fe68747470733a2f2f627569646c65722e69742f6d696e746572732f63772f76312f6a736f6e2f636f6e74726163746d65746164617461a2646970667358221220c28fd04158fa4e79aad0a6ecfc2389e942ab51a767026c59f9df514d5b759b3c64736f6c63430008110033
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.