Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
444 HYPR
Holders
251
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 HYPRLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Hyperion
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: MIT pragma solidity ^0.8.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {OperatorFilterer} from "closedsea/src/OperatorFilterer.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; error Paused(); error SoldOut(); error SaleNotStarted(); error MintingTooMany(); error NotWhitelisted(); error Underpriced(); error MintedOut(); error MaxMints(); error ArraysDontMatch(); contract Hyperion is ERC721AQueryable, Ownable,OperatorFilterer,ERC2981{ using ECDSA for bytes32; /*/////////////////////////////////////////////////////////////// VARIABLES //////////////////////////////////////////////////////////////*/ uint constant public maxSupply = 444; string public baseURI; string public notRevealedUri; string public uriSuffix = ".json"; //0 -> whitelist :: 1->public address private signer = 0x44DC5eC08715A70AD4b7FA97DDba41130867074f; bool public revealed = true; bool operatorFilteringEnabled; //False on mainnet enum SaleStatus {INACTIVE,GROUP1,GROUP2} SaleStatus public saleStatus = SaleStatus.INACTIVE; /*/////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor() ERC721A("Hyperion", "HYPR") { setNotRevealedURI("ipfs://QmRRQrJPnyK6wxSvBPu64Pb7PCdCKKx72mTvfUr5omrPJg"); _registerForOperatorFiltering(); operatorFilteringEnabled = true; // Set royalty receiver to the contract creator, // at 5% (default denominator is 10000). _setDefaultRoyalty(msg.sender, 500); //First 200 Go To Treasury } function airdrop(address[] calldata accounts,uint[] calldata amounts) external onlyOwner{ if(accounts.length != amounts.length) revert ArraysDontMatch(); uint supply = totalSupply(); for(uint i; i<accounts.length;i++) { if(supply + amounts[i] > maxSupply) revert SoldOut(); supply += amounts[i]; _mint(accounts[i],amounts[i]); } } /*/////////////////////////////////////////////////////////////// MINT FUNCTIONS //////////////////////////////////////////////////////////////*/ function group1Mint(uint amount,uint max, bytes memory signature) external { if(saleStatus != SaleStatus.GROUP1) revert SaleNotStarted(); if(totalSupply() + amount > maxSupply) revert SoldOut(); bytes32 hash = keccak256(abi.encodePacked("G1",max,_msgSender())); if(hash.toEthSignedMessageHash().recover(signature)!=signer) revert NotWhitelisted(); if(getNumMintedGroup1(_msgSender()) + amount > max) revert MaxMints(); _mint(_msgSender(),amount); } function group2Mint(uint amount,uint max, bytes memory signature) external { if(saleStatus != SaleStatus.GROUP2) revert SaleNotStarted(); if(totalSupply() + amount > maxSupply) revert SoldOut(); bytes32 hash = keccak256(abi.encodePacked("G2",max,_msgSender())); if(hash.toEthSignedMessageHash().recover(signature)!=signer) revert NotWhitelisted(); if(getNumMintedGroup2(_msgSender()) + amount > max) revert MaxMints(); _mint(_msgSender(),amount); } function getNumMintedGroup1(address account) public view returns(uint){ return _numberMinted(account); } function getNumMintedGroup2(address account) public view returns(uint){ return uint(_getAux(account)); } /*/////////////////////////////////////////////////////////////// MINTING UTILITIES //////////////////////////////////////////////////////////////*/ function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { notRevealedUri = _notRevealedURI; } function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; } function setGroup1On() external onlyOwner { saleStatus = SaleStatus.GROUP1; } function setGroup2On() external onlyOwner { saleStatus = SaleStatus.GROUP2; } function turnSalesOff() external onlyOwner{ saleStatus = SaleStatus.INACTIVE; } function switchReveal() public onlyOwner { revealed = !revealed; } function setUriSuffix(string memory _uriSuffix) public onlyOwner { uriSuffix = _uriSuffix; } function setSigner(address _signer) external onlyOwner{ signer = _signer; } /*/////////////////////////////////////////////////////////////// METADATA //////////////////////////////////////////////////////////////*/ function tokenURI(uint256 tokenId) public view override(IERC721A,ERC721A) returns (string memory) { if (revealed == false) { return notRevealedUri; } string memory currentBaseURI = baseURI; return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _toString(tokenId),uriSuffix)) : ""; } /*/////////////////////////////////////////////////////////////// WITHDRAWAL LOGIC //////////////////////////////////////////////////////////////*/ function withdraw() public payable onlyOwner { (bool os, ) = payable(owner()).call{value: address(this).balance}(""); require(os); } //----ClosedSea Functions ---------------- function setApprovalForAll(address operator, bool approved) public override(IERC721A,ERC721A) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public payable override(IERC721A,ERC721A) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public payable override (IERC721A, ERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override (IERC721A, ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override (IERC721A, ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function supportsInterface(bytes4 interfaceId) public view virtual override (IERC721A, ERC721A, ERC2981) returns (bool) { // Supports the following `interfaceId`s: // - IERC165: 0x01ffc9a7 // - IERC721: 0x80ac58cd // - IERC721Metadata: 0x5b5e139f // - IERC2981: 0x2a55205a return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function setOperatorFilteringEnabled(bool value) public onlyOwner { operatorFilteringEnabled = value; } function _operatorFilteringEnabled() internal view override returns (bool) { return operatorFilteringEnabled; } function _isPriorityOperator(address operator) internal pure override returns (bool) { // OpenSea Seaport Conduit: // https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71 // https://goerli.etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71 return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71); } }
// 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.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 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.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 // 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 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); } } }
// 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 pragma solidity ^0.8.4; /// @notice Optimized and flexible operator filterer to abide to OpenSea's /// mandatory on-chain royalty enforcement in order for new collections to /// receive royalties. /// For more information, see: /// See: https://github.com/ProjectOpenSea/operator-filter-registry abstract contract OperatorFilterer { /// @dev The default OpenSea operator blocklist subscription. address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; /// @dev The OpenSea operator filter registry. address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E; /// @dev Registers the current contract to OpenSea's operator filter, /// and subscribe to the default OpenSea operator blocklist. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering() internal virtual { _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true); } /// @dev Registers the current contract to OpenSea's operator filter. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe) internal virtual { /// @solidity memory-safe-assembly assembly { let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`. // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty. subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy)) for {} iszero(subscribe) {} { if iszero(subscriptionOrRegistrantToCopy) { functionSelector := 0x4420e486 // `register(address)`. break } functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`. break } // Store the function selector. mstore(0x00, shl(224, functionSelector)) // Store the `address(this)`. mstore(0x04, address()) // Store the `subscriptionOrRegistrantToCopy`. mstore(0x24, subscriptionOrRegistrantToCopy) // Register into the registry. if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) { // If the function selector has not been overwritten, // it is an out-of-gas error. if eq(shr(224, mload(0x00)), functionSelector) { // To prevent gas under-estimation. revert(0, 0) } } // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, because of Solidity's memory size limits. mstore(0x24, 0) } } /// @dev Modifier to guard a function and revert if the caller is a blocked operator. modifier onlyAllowedOperator(address from) virtual { if (from != msg.sender) { if (!_isPriorityOperator(msg.sender)) { if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender); } } _; } /// @dev Modifier to guard a function from approving a blocked operator.. modifier onlyAllowedOperatorApproval(address operator) virtual { if (!_isPriorityOperator(operator)) { if (_operatorFilteringEnabled()) _revertIfBlocked(operator); } _; } /// @dev Helper function that reverts if the `operator` is blocked by the registry. function _revertIfBlocked(address operator) private view { /// @solidity memory-safe-assembly assembly { // Store the function selector of `isOperatorAllowed(address,address)`, // shifted left by 6 bytes, which is enough for 8tb of memory. // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL). mstore(0x00, 0xc6171134001122334455) // Store the `address(this)`. mstore(0x1a, address()) // Store the `operator`. mstore(0x3a, operator) // `isOperatorAllowed` always returns true if it does not revert. if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) { // Bubble up the revert if the staticcall reverts. returndatacopy(0x00, 0x00, returndatasize()) revert(0x00, returndatasize()) } // We'll skip checking if `from` is inside the blacklist. // Even though that can block transferring out of wrapper contracts, // we don't want tokens to be stuck. // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, if less than 8tb of memory is used. mstore(0x3a, 0) } } /// @dev For deriving contracts to override, so that operator filtering /// can be turned on / off. /// Returns true by default. function _operatorFilteringEnabled() internal view virtual returns (bool) { return true; } /// @dev For deriving contracts to override, so that preferred marketplaces can /// skip operator filtering, helping users save gas. /// Returns false for all inputs by default. function _isPriorityOperator(address) internal view virtual returns (bool) { return false; } }
// 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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // 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); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ArraysDontMatch","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MaxMints","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotWhitelisted","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"SaleNotStarted","type":"error"},{"inputs":[],"name":"SoldOut","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":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getNumMintedGroup1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getNumMintedGroup2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"group1Mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"group2Mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[],"name":"saleStatus","outputs":[{"internalType":"enum Hyperion.SaleStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","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":"setGroup1On","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setGroup2On","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uriSuffix","type":"string"}],"name":"setUriSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"switchReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"turnSalesOff","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uriSuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60806040526040518060400160405280600581526020017f2e6a736f6e000000000000000000000000000000000000000000000000000000815250600d90816200004a9190620008ab565b507344dc5ec08715a70ad4b7fa97ddba41130867074f600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600e60146101000a81548160ff0219169083151502179055506000600e60166101000a81548160ff02191690836002811115620000e457620000e362000992565b5b0217905550348015620000f657600080fd5b506040518060400160405280600881526020017f4879706572696f6e0000000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f48595052000000000000000000000000000000000000000000000000000000008152508160029081620001749190620008ab565b508060039081620001869190620008ab565b50620001976200022e60201b60201c565b6000819055505050620001bf620001b36200023360201b60201c565b6200023b60201b60201c565b620001e960405180606001604052806035815260200162005bc1603591396200030160201b60201c565b620001f96200032660201b60201c565b6001600e60156101000a81548160ff02191690831515021790555062000228336101f46200034f60201b60201c565b62000b4e565b600090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b62000311620004f260201b60201c565b80600c9081620003229190620008ab565b5050565b6200034d733cc6cdda760b79bafa08df41ecfa224f810dceb660016200058360201b60201c565b565b6200035f620005fd60201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115620003c0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003b79062000a48565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160362000432576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004299062000aba565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b620005026200023360201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620005286200060760201b60201c565b73ffffffffffffffffffffffffffffffffffffffff161462000581576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005789062000b2c565b60405180910390fd5b565b637d3e3dbe8260601b60601c925081620005b25782620005aa57634420e4869050620005b2565b63a0af290390505b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af1620005f3578060005160e01c03620005f257600080fd5b5b6000602452505050565b6000612710905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620006b357607f821691505b602082108103620006c957620006c86200066b565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620007337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620006f4565b6200073f8683620006f4565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200078c62000786620007808462000757565b62000761565b62000757565b9050919050565b6000819050919050565b620007a8836200076b565b620007c0620007b78262000793565b84845462000701565b825550505050565b600090565b620007d7620007c8565b620007e48184846200079d565b505050565b5b818110156200080c5762000800600082620007cd565b600181019050620007ea565b5050565b601f8211156200085b576200082581620006cf565b6200083084620006e4565b8101602085101562000840578190505b620008586200084f85620006e4565b830182620007e9565b50505b505050565b600082821c905092915050565b6000620008806000198460080262000860565b1980831691505092915050565b60006200089b83836200086d565b9150826002028217905092915050565b620008b68262000631565b67ffffffffffffffff811115620008d257620008d16200063c565b5b620008de82546200069a565b620008eb82828562000810565b600060209050601f8311600181146200092357600084156200090e578287015190505b6200091a85826200088d565b8655506200098a565b601f1984166200093386620006cf565b60005b828110156200095d5784890151825560018201915060208501945060208101905062000936565b868310156200097d578489015162000979601f8916826200086d565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600082825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000a30602a83620009c1565b915062000a3d82620009d2565b604082019050919050565b6000602082019050818103600083015262000a638162000a21565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000aa2601983620009c1565b915062000aaf8262000a6a565b602082019050919050565b6000602082019050818103600083015262000ad58162000a93565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000b14602083620009c1565b915062000b218262000adc565b602082019050919050565b6000602082019050818103600083015262000b478162000b05565b9050919050565b6150638062000b5e6000396000f3fe6080604052600436106102675760003560e01c80636c19e78311610144578063b7c0b8e8116100b6578063e985e9c51161007a578063e985e9c5146108fc578063ec5a2d4514610939578063efedcd0114610950578063f2c4ce1e14610967578063f2fde38b14610990578063f9020e33146109b957610267565b8063b7c0b8e814610812578063b88d4fde1461083b578063c23dc68f14610857578063c87b56dd14610894578063d5abeb01146108d157610267565b806385271cf01161010857806385271cf0146107045780638da5cb5b1461072d57806395d89b411461075857806399a2557a1461078357806399b092d6146107c0578063a22cb465146107e957610267565b80636c19e7831461063357806370a082311461065c578063715018a61461069957806376a7e07c146106b05780638462151c146106c757610267565b80633ccfd60b116101dd57806355f804b3116101a157806355f804b3146105255780635bbb21771461054e5780636352211e1461058b57806367243482146105c8578063678c4655146105f15780636c0360eb1461060857610267565b80633ccfd60b1461046c57806342842e0e146104765780634bbece2c1461049257806351830227146104cf5780635503a0e8146104fa57610267565b8063095ea7b31161022f578063095ea7b31461036557806316ba10e01461038157806318160ddd146103aa57806323b872dd146103d55780632a55205a146103f157806338a5956a1461042f57610267565b806301ffc9a71461026c57806304634d8d146102a957806306fdde03146102d2578063081812fc146102fd578063081c8c441461033a575b600080fd5b34801561027857600080fd5b50610293600480360381019061028e91906136d9565b6109e4565b6040516102a09190613721565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb91906137de565b610a06565b005b3480156102de57600080fd5b506102e7610a1c565b6040516102f491906138ae565b60405180910390f35b34801561030957600080fd5b50610324600480360381019061031f9190613906565b610aae565b6040516103319190613942565b60405180910390f35b34801561034657600080fd5b5061034f610b2d565b60405161035c91906138ae565b60405180910390f35b61037f600480360381019061037a919061395d565b610bbb565b005b34801561038d57600080fd5b506103a860048036038101906103a39190613ad2565b610bf0565b005b3480156103b657600080fd5b506103bf610c0b565b6040516103cc9190613b2a565b60405180910390f35b6103ef60048036038101906103ea9190613b45565b610c22565b005b3480156103fd57600080fd5b5061041860048036038101906104139190613b98565b610c8d565b604051610426929190613bd8565b60405180910390f35b34801561043b57600080fd5b5061045660048036038101906104519190613c01565b610e77565b6040516104639190613b2a565b60405180910390f35b610474610e93565b005b610490600480360381019061048b9190613b45565b610f1b565b005b34801561049e57600080fd5b506104b960048036038101906104b49190613c01565b610f86565b6040516104c69190613b2a565b60405180910390f35b3480156104db57600080fd5b506104e4610f98565b6040516104f19190613721565b60405180910390f35b34801561050657600080fd5b5061050f610fab565b60405161051c91906138ae565b60405180910390f35b34801561053157600080fd5b5061054c60048036038101906105479190613ad2565b611039565b005b34801561055a57600080fd5b5061057560048036038101906105709190613c8e565b611054565b6040516105829190613e3e565b60405180910390f35b34801561059757600080fd5b506105b260048036038101906105ad9190613906565b611117565b6040516105bf9190613942565b60405180910390f35b3480156105d457600080fd5b506105ef60048036038101906105ea9190613eb6565b611129565b005b3480156105fd57600080fd5b50610606611276565b005b34801561061457600080fd5b5061061d6112ab565b60405161062a91906138ae565b60405180910390f35b34801561063f57600080fd5b5061065a60048036038101906106559190613c01565b611339565b005b34801561066857600080fd5b50610683600480360381019061067e9190613c01565b611385565b6040516106909190613b2a565b60405180910390f35b3480156106a557600080fd5b506106ae61143d565b005b3480156106bc57600080fd5b506106c5611451565b005b3480156106d357600080fd5b506106ee60048036038101906106e99190613c01565b611486565b6040516106fb9190613ff5565b60405180910390f35b34801561071057600080fd5b5061072b600480360381019061072691906140b8565b6115c9565b005b34801561073957600080fd5b506107426117c4565b60405161074f9190613942565b60405180910390f35b34801561076457600080fd5b5061076d6117ee565b60405161077a91906138ae565b60405180910390f35b34801561078f57600080fd5b506107aa60048036038101906107a59190614127565b611880565b6040516107b79190613ff5565b60405180910390f35b3480156107cc57600080fd5b506107e760048036038101906107e291906140b8565b611a8c565b005b3480156107f557600080fd5b50610810600480360381019061080b91906141a6565b611c86565b005b34801561081e57600080fd5b50610839600480360381019061083491906141e6565b611cbb565b005b61085560048036038101906108509190614213565b611ce0565b005b34801561086357600080fd5b5061087e60048036038101906108799190613906565b611d4d565b60405161088b91906142eb565b60405180910390f35b3480156108a057600080fd5b506108bb60048036038101906108b69190613906565b611db7565b6040516108c891906138ae565b60405180910390f35b3480156108dd57600080fd5b506108e6611f4a565b6040516108f39190613b2a565b60405180910390f35b34801561090857600080fd5b50610923600480360381019061091e9190614306565b611f50565b6040516109309190613721565b60405180910390f35b34801561094557600080fd5b5061094e611fe4565b005b34801561095c57600080fd5b50610965612018565b005b34801561097357600080fd5b5061098e60048036038101906109899190613ad2565b61204d565b005b34801561099c57600080fd5b506109b760048036038101906109b29190613c01565b612068565b005b3480156109c557600080fd5b506109ce6120eb565b6040516109db91906143bd565b60405180910390f35b60006109ef826120fe565b806109ff57506109fe82612190565b5b9050919050565b610a0e61220a565b610a188282612288565b5050565b606060028054610a2b90614407565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5790614407565b8015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b6000610ab98261241d565b610aef576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600c8054610b3a90614407565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6690614407565b8015610bb35780601f10610b8857610100808354040283529160200191610bb3565b820191906000526020600020905b815481529060010190602001808311610b9657829003601f168201915b505050505081565b81610bc58161247c565b610be157610bd16124c8565b15610be057610bdf816124df565b5b5b610beb8383612523565b505050565b610bf861220a565b80600d9081610c0791906145e4565b5050565b6000610c15612667565b6001546000540303905090565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c7c57610c5f3361247c565b610c7b57610c6b6124c8565b15610c7a57610c79336124df565b5b5b5b610c8784848461266c565b50505050565b6000806000600a60008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610e225760096040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610e2c61298e565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610e5891906146e5565b610e629190614756565b90508160000151819350935050509250929050565b6000610e8282612998565b67ffffffffffffffff169050919050565b610e9b61220a565b6000610ea56117c4565b73ffffffffffffffffffffffffffffffffffffffff1647604051610ec8906147b8565b60006040518083038185875af1925050503d8060008114610f05576040519150601f19603f3d011682016040523d82523d6000602084013e610f0a565b606091505b5050905080610f1857600080fd5b50565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f7557610f583361247c565b610f7457610f646124c8565b15610f7357610f72336124df565b5b5b5b610f808484846129e5565b50505050565b6000610f9182612a05565b9050919050565b600e60149054906101000a900460ff1681565b600d8054610fb890614407565b80601f0160208091040260200160405190810160405280929190818152602001828054610fe490614407565b80156110315780601f1061100657610100808354040283529160200191611031565b820191906000526020600020905b81548152906001019060200180831161101457829003601f168201915b505050505081565b61104161220a565b80600b908161105091906145e4565b5050565b6060600083839050905060008167ffffffffffffffff81111561107a576110796139a7565b5b6040519080825280602002602001820160405280156110b357816020015b6110a061361e565b8152602001906001900390816110985790505b50905060005b82811461110b576110e28686838181106110d6576110d56147cd565b5b90506020020135611d4d565b8282815181106110f5576110f46147cd565b5b60200260200101819052508060010190506110b9565b50809250505092915050565b600061112282612a5c565b9050919050565b61113161220a565b818190508484905014611170576040517fe6bbb3c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061117a610c0b565b905060005b8585905081101561126e576101bc8484838181106111a05761119f6147cd565b5b90506020020135836111b291906147fc565b11156111ea576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383828181106111fd576111fc6147cd565b5b905060200201358261120f91906147fc565b915061125b868683818110611227576112266147cd565b5b905060200201602081019061123c9190613c01565b85858481811061124f5761124e6147cd565b5b90506020020135612b28565b808061126690614830565b91505061117f565b505050505050565b61127e61220a565b6002600e60166101000a81548160ff021916908360028111156112a4576112a3614346565b5b0217905550565b600b80546112b890614407565b80601f01602080910402602001604051908101604052809291908181526020018280546112e490614407565b80156113315780601f1061130657610100808354040283529160200191611331565b820191906000526020600020905b81548152906001019060200180831161131457829003601f168201915b505050505081565b61134161220a565b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113ec576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61144561220a565b61144f6000612ce3565b565b61145961220a565b6000600e60166101000a81548160ff0219169083600281111561147f5761147e614346565b5b0217905550565b6060600080600061149685611385565b905060008167ffffffffffffffff8111156114b4576114b36139a7565b5b6040519080825280602002602001820160405280156114e25781602001602082028036833780820191505090505b5090506114ed61361e565b60006114f7612667565b90505b8386146115bb5761150a81612da9565b915081604001516115b057600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461155557816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115af57808387806001019850815181106115a2576115a16147cd565b5b6020026020010181815250505b5b8060010190506114fa565b508195505050505050919050565b600160028111156115dd576115dc614346565b5b600e60169054906101000a900460ff1660028111156115ff576115fe614346565b5b14611636576040517f2d0a346e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101bc83611642610c0b565b61164c91906147fc565b1115611684576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008261168f612dd4565b6040516020016116a0929190614938565b604051602081830303815290604052805190602001209050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661170c836116fe84612ddc565b612e0c90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1614611759576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828461176b611766612dd4565b610f86565b61177591906147fc565b11156117ad576040517fc3b708de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117be6117b8612dd4565b85612b28565b50505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546117fd90614407565b80601f016020809104026020016040519081016040528092919081815260200182805461182990614407565b80156118765780601f1061184b57610100808354040283529160200191611876565b820191906000526020600020905b81548152906001019060200180831161185957829003601f168201915b5050505050905090565b60608183106118bb576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806118c6612e33565b90506118d0612667565b8510156118e2576118df612667565b94505b808411156118ee578093505b60006118f987611385565b90508486101561191c576000868603905081811015611916578091505b50611921565b600090505b60008167ffffffffffffffff81111561193d5761193c6139a7565b5b60405190808252806020026020018201604052801561196b5781602001602082028036833780820191505090505b509050600082036119825780945050505050611a85565b600061198d88611d4d565b9050600081604001516119a257816000015190505b60008990505b8881141580156119b85750848714155b15611a77576119c681612da9565b92508260400151611a6c57600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611a1157826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a6b5780848880600101995081518110611a5e57611a5d6147cd565b5b6020026020010181815250505b5b8060010190506119a8565b508583528296505050505050505b9392505050565b600280811115611a9f57611a9e614346565b5b600e60169054906101000a900460ff166002811115611ac157611ac0614346565b5b14611af8576040517f2d0a346e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101bc83611b04610c0b565b611b0e91906147fc565b1115611b46576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082611b51612dd4565b604051602001611b629291906149bb565b604051602081830303815290604052805190602001209050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611bce83611bc084612ddc565b612e0c90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1614611c1b576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8284611c2d611c28612dd4565b610e77565b611c3791906147fc565b1115611c6f576040517fc3b708de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c80611c7a612dd4565b85612b28565b50505050565b81611c908161247c565b611cac57611c9c6124c8565b15611cab57611caa816124df565b5b5b611cb68383612e3c565b505050565b611cc361220a565b80600e60156101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d3a57611d1d3361247c565b611d3957611d296124c8565b15611d3857611d37336124df565b5b5b5b611d4685858585612f47565b5050505050565b611d5561361e565b611d5d61361e565b611d65612667565b831080611d795750611d75612e33565b8310155b15611d875780915050611db2565b611d9083612da9565b9050806040015115611da55780915050611db2565b611dae83612fba565b9150505b919050565b606060001515600e60149054906101000a900460ff16151503611e6657600c8054611de190614407565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0d90614407565b8015611e5a5780601f10611e2f57610100808354040283529160200191611e5a565b820191906000526020600020905b815481529060010190602001808311611e3d57829003601f168201915b50505050509050611f45565b6000600b8054611e7590614407565b80601f0160208091040260200160405190810160405280929190818152602001828054611ea190614407565b8015611eee5780601f10611ec357610100808354040283529160200191611eee565b820191906000526020600020905b815481529060010190602001808311611ed157829003601f168201915b505050505090506000815111611f135760405180602001604052806000815250611f41565b80611f1d84612fda565b600d604051602001611f3193929190614aa6565b6040516020818303038152906040525b9150505b919050565b6101bc81565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611fec61220a565b600e60149054906101000a900460ff1615600e60146101000a81548160ff021916908315150217905550565b61202061220a565b6001600e60166101000a81548160ff0219169083600281111561204657612045614346565b5b0217905550565b61205561220a565b80600c908161206491906145e4565b5050565b61207061220a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036120df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d690614b49565b60405180910390fd5b6120e881612ce3565b50565b600e60169054906101000a900460ff1681565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061215957506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806121895750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061220357506122028261302a565b5b9050919050565b612212612dd4565b73ffffffffffffffffffffffffffffffffffffffff166122306117c4565b73ffffffffffffffffffffffffffffffffffffffff1614612286576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227d90614bb5565b60405180910390fd5b565b61229061298e565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156122ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e590614c47565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361235d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235490614cb3565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600081612428612667565b11158015612437575060005482105b8015612475575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b6000731e0049783f008a0085193e00003d00cd54003c7173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000600e60159054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa61251b573d6000803e3d6000fd5b6000603a5250565b600061252e82611117565b90508073ffffffffffffffffffffffffffffffffffffffff1661254f613094565b73ffffffffffffffffffffffffffffffffffffffff16146125b25761257b81612576613094565b611f50565b6125b1576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600090565b600061267782612a5c565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146126de576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806126ea8461309c565b9150915061270081876126fb613094565b6130c3565b61274c5761271586612710613094565b611f50565b61274b576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036127b2576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127bf8686866001613107565b80156127ca57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506128988561287488888761310d565b7c020000000000000000000000000000000000000000000000000000000017613135565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361291e576000600185019050600060046000838152602001908152602001600020540361291c57600054811461291b578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46129868686866001613160565b505050505050565b6000612710905090565b600060c0600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c9050919050565b612a0083838360405180602001604052806000815250611ce0565b505050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b60008082905080612a6b612667565b11612af157600054811015612af05760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612aee575b60008103612ae4576004600083600190039350838152602001908152602001600020549050612aba565b8092505050612b23565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008054905060008203612b68576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612b756000848385613107565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612bec83612bdd600086600061310d565b612be685613166565b17613135565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612c8d57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612c52565b5060008203612cc8576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050612cde6000848385613160565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612db161361e565b612dcd6004600084815260200190815260200160002054613176565b9050919050565b600033905090565b600081604051602001612def9190614d4a565b604051602081830303815290604052805190602001209050919050565b6000806000612e1b858561322c565b91509150612e288161327d565b819250505092915050565b60008054905090565b8060076000612e49613094565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612ef6613094565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612f3b9190613721565b60405180910390a35050565b612f52848484610c22565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612fb457612f7d848484846133e3565b612fb3576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b612fc261361e565b612fd3612fce83612a5c565b613176565b9050919050565b606060a060405101806040526020810391506000825281835b60011561301557600184039350600a81066030018453600a8104905080612ff3575b50828103602084039350808452505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613124868684613533565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b61317e61361e565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b600080604183510361326d5760008060006020860151925060408601519150606086015160001a90506132618782858561353c565b94509450505050613276565b60006002915091505b9250929050565b6000600481111561329157613290614346565b5b8160048111156132a4576132a3614346565b5b03156133e057600160048111156132be576132bd614346565b5b8160048111156132d1576132d0614346565b5b03613311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161330890614dbc565b60405180910390fd5b6002600481111561332557613324614346565b5b81600481111561333857613337614346565b5b03613378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161336f90614e28565b60405180910390fd5b6003600481111561338c5761338b614346565b5b81600481111561339f5761339e614346565b5b036133df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133d690614eba565b60405180910390fd5b5b50565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613409613094565b8786866040518563ffffffff1660e01b815260040161342b9493929190614f2f565b6020604051808303816000875af192505050801561346757506040513d601f19601f820116820180604052508101906134649190614f90565b60015b6134e0573d8060008114613497576040519150601f19603f3d011682016040523d82523d6000602084013e61349c565b606091505b5060008151036134d8576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613577576000600391509150613615565b60006001878787876040516000815260200160405260405161359c9493929190614fe8565b6020604051602081039080840390855afa1580156135be573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361360c57600060019250925050613615565b80600092509250505b94509492505050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6136b681613681565b81146136c157600080fd5b50565b6000813590506136d3816136ad565b92915050565b6000602082840312156136ef576136ee613677565b5b60006136fd848285016136c4565b91505092915050565b60008115159050919050565b61371b81613706565b82525050565b60006020820190506137366000830184613712565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137678261373c565b9050919050565b6137778161375c565b811461378257600080fd5b50565b6000813590506137948161376e565b92915050565b60006bffffffffffffffffffffffff82169050919050565b6137bb8161379a565b81146137c657600080fd5b50565b6000813590506137d8816137b2565b92915050565b600080604083850312156137f5576137f4613677565b5b600061380385828601613785565b9250506020613814858286016137c9565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561385857808201518184015260208101905061383d565b60008484015250505050565b6000601f19601f8301169050919050565b60006138808261381e565b61388a8185613829565b935061389a81856020860161383a565b6138a381613864565b840191505092915050565b600060208201905081810360008301526138c88184613875565b905092915050565b6000819050919050565b6138e3816138d0565b81146138ee57600080fd5b50565b600081359050613900816138da565b92915050565b60006020828403121561391c5761391b613677565b5b600061392a848285016138f1565b91505092915050565b61393c8161375c565b82525050565b60006020820190506139576000830184613933565b92915050565b6000806040838503121561397457613973613677565b5b600061398285828601613785565b9250506020613993858286016138f1565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6139df82613864565b810181811067ffffffffffffffff821117156139fe576139fd6139a7565b5b80604052505050565b6000613a1161366d565b9050613a1d82826139d6565b919050565b600067ffffffffffffffff821115613a3d57613a3c6139a7565b5b613a4682613864565b9050602081019050919050565b82818337600083830152505050565b6000613a75613a7084613a22565b613a07565b905082815260208101848484011115613a9157613a906139a2565b5b613a9c848285613a53565b509392505050565b600082601f830112613ab957613ab861399d565b5b8135613ac9848260208601613a62565b91505092915050565b600060208284031215613ae857613ae7613677565b5b600082013567ffffffffffffffff811115613b0657613b0561367c565b5b613b1284828501613aa4565b91505092915050565b613b24816138d0565b82525050565b6000602082019050613b3f6000830184613b1b565b92915050565b600080600060608486031215613b5e57613b5d613677565b5b6000613b6c86828701613785565b9350506020613b7d86828701613785565b9250506040613b8e868287016138f1565b9150509250925092565b60008060408385031215613baf57613bae613677565b5b6000613bbd858286016138f1565b9250506020613bce858286016138f1565b9150509250929050565b6000604082019050613bed6000830185613933565b613bfa6020830184613b1b565b9392505050565b600060208284031215613c1757613c16613677565b5b6000613c2584828501613785565b91505092915050565b600080fd5b600080fd5b60008083601f840112613c4e57613c4d61399d565b5b8235905067ffffffffffffffff811115613c6b57613c6a613c2e565b5b602083019150836020820283011115613c8757613c86613c33565b5b9250929050565b60008060208385031215613ca557613ca4613677565b5b600083013567ffffffffffffffff811115613cc357613cc261367c565b5b613ccf85828601613c38565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613d108161375c565b82525050565b600067ffffffffffffffff82169050919050565b613d3381613d16565b82525050565b613d4281613706565b82525050565b600062ffffff82169050919050565b613d6081613d48565b82525050565b608082016000820151613d7c6000850182613d07565b506020820151613d8f6020850182613d2a565b506040820151613da26040850182613d39565b506060820151613db56060850182613d57565b50505050565b6000613dc78383613d66565b60808301905092915050565b6000602082019050919050565b6000613deb82613cdb565b613df58185613ce6565b9350613e0083613cf7565b8060005b83811015613e31578151613e188882613dbb565b9750613e2383613dd3565b925050600181019050613e04565b5085935050505092915050565b60006020820190508181036000830152613e588184613de0565b905092915050565b60008083601f840112613e7657613e7561399d565b5b8235905067ffffffffffffffff811115613e9357613e92613c2e565b5b602083019150836020820283011115613eaf57613eae613c33565b5b9250929050565b60008060008060408587031215613ed057613ecf613677565b5b600085013567ffffffffffffffff811115613eee57613eed61367c565b5b613efa87828801613e60565b9450945050602085013567ffffffffffffffff811115613f1d57613f1c61367c565b5b613f2987828801613c38565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613f6c816138d0565b82525050565b6000613f7e8383613f63565b60208301905092915050565b6000602082019050919050565b6000613fa282613f37565b613fac8185613f42565b9350613fb783613f53565b8060005b83811015613fe8578151613fcf8882613f72565b9750613fda83613f8a565b925050600181019050613fbb565b5085935050505092915050565b6000602082019050818103600083015261400f8184613f97565b905092915050565b600067ffffffffffffffff821115614032576140316139a7565b5b61403b82613864565b9050602081019050919050565b600061405b61405684614017565b613a07565b905082815260208101848484011115614077576140766139a2565b5b614082848285613a53565b509392505050565b600082601f83011261409f5761409e61399d565b5b81356140af848260208601614048565b91505092915050565b6000806000606084860312156140d1576140d0613677565b5b60006140df868287016138f1565b93505060206140f0868287016138f1565b925050604084013567ffffffffffffffff8111156141115761411061367c565b5b61411d8682870161408a565b9150509250925092565b6000806000606084860312156141405761413f613677565b5b600061414e86828701613785565b935050602061415f868287016138f1565b9250506040614170868287016138f1565b9150509250925092565b61418381613706565b811461418e57600080fd5b50565b6000813590506141a08161417a565b92915050565b600080604083850312156141bd576141bc613677565b5b60006141cb85828601613785565b92505060206141dc85828601614191565b9150509250929050565b6000602082840312156141fc576141fb613677565b5b600061420a84828501614191565b91505092915050565b6000806000806080858703121561422d5761422c613677565b5b600061423b87828801613785565b945050602061424c87828801613785565b935050604061425d878288016138f1565b925050606085013567ffffffffffffffff81111561427e5761427d61367c565b5b61428a8782880161408a565b91505092959194509250565b6080820160008201516142ac6000850182613d07565b5060208201516142bf6020850182613d2a565b5060408201516142d26040850182613d39565b5060608201516142e56060850182613d57565b50505050565b60006080820190506143006000830184614296565b92915050565b6000806040838503121561431d5761431c613677565b5b600061432b85828601613785565b925050602061433c85828601613785565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6003811061438657614385614346565b5b50565b600081905061439782614375565b919050565b60006143a782614389565b9050919050565b6143b78161439c565b82525050565b60006020820190506143d260008301846143ae565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061441f57607f821691505b602082108103614432576144316143d8565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261449a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261445d565b6144a4868361445d565b95508019841693508086168417925050509392505050565b6000819050919050565b60006144e16144dc6144d7846138d0565b6144bc565b6138d0565b9050919050565b6000819050919050565b6144fb836144c6565b61450f614507826144e8565b84845461446a565b825550505050565b600090565b614524614517565b61452f8184846144f2565b505050565b5b818110156145535761454860008261451c565b600181019050614535565b5050565b601f8211156145985761456981614438565b6145728461444d565b81016020851015614581578190505b61459561458d8561444d565b830182614534565b50505b505050565b600082821c905092915050565b60006145bb6000198460080261459d565b1980831691505092915050565b60006145d483836145aa565b9150826002028217905092915050565b6145ed8261381e565b67ffffffffffffffff811115614606576146056139a7565b5b6146108254614407565b61461b828285614557565b600060209050601f83116001811461464e576000841561463c578287015190505b61464685826145c8565b8655506146ae565b601f19841661465c86614438565b60005b828110156146845784890151825560018201915060208501945060208101905061465f565b868310156146a1578489015161469d601f8916826145aa565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006146f0826138d0565b91506146fb836138d0565b9250828202614709816138d0565b915082820484148315176147205761471f6146b6565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614761826138d0565b915061476c836138d0565b92508261477c5761477b614727565b5b828204905092915050565b600081905092915050565b50565b60006147a2600083614787565b91506147ad82614792565b600082019050919050565b60006147c382614795565b9150819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614807826138d0565b9150614812836138d0565b925082820190508082111561482a576148296146b6565b5b92915050565b600061483b826138d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361486d5761486c6146b6565b5b600182019050919050565b600081905092915050565b7f4731000000000000000000000000000000000000000000000000000000000000600082015250565b60006148b9600283614878565b91506148c482614883565b600282019050919050565b6000819050919050565b6148ea6148e5826138d0565b6148cf565b82525050565b60008160601b9050919050565b6000614908826148f0565b9050919050565b600061491a826148fd565b9050919050565b61493261492d8261375c565b61490f565b82525050565b6000614943826148ac565b915061494f82856148d9565b60208201915061495f8284614921565b6014820191508190509392505050565b7f4732000000000000000000000000000000000000000000000000000000000000600082015250565b60006149a5600283614878565b91506149b08261496f565b600282019050919050565b60006149c682614998565b91506149d282856148d9565b6020820191506149e28284614921565b6014820191508190509392505050565b60006149fd8261381e565b614a078185614878565b9350614a1781856020860161383a565b80840191505092915050565b60008154614a3081614407565b614a3a8186614878565b94506001821660008114614a555760018114614a6a57614a9d565b60ff1983168652811515820286019350614a9d565b614a7385614438565b60005b83811015614a9557815481890152600182019150602081019050614a76565b838801955050505b50505092915050565b6000614ab282866149f2565b9150614abe82856149f2565b9150614aca8284614a23565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614b33602683613829565b9150614b3e82614ad7565b604082019050919050565b60006020820190508181036000830152614b6281614b26565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614b9f602083613829565b9150614baa82614b69565b602082019050919050565b60006020820190508181036000830152614bce81614b92565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614c31602a83613829565b9150614c3c82614bd5565b604082019050919050565b60006020820190508181036000830152614c6081614c24565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614c9d601983613829565b9150614ca882614c67565b602082019050919050565b60006020820190508181036000830152614ccc81614c90565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614d09601c83614878565b9150614d1482614cd3565b601c82019050919050565b6000819050919050565b6000819050919050565b614d44614d3f82614d1f565b614d29565b82525050565b6000614d5582614cfc565b9150614d618284614d33565b60208201915081905092915050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614da6601883613829565b9150614db182614d70565b602082019050919050565b60006020820190508181036000830152614dd581614d99565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000614e12601f83613829565b9150614e1d82614ddc565b602082019050919050565b60006020820190508181036000830152614e4181614e05565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ea4602283613829565b9150614eaf82614e48565b604082019050919050565b60006020820190508181036000830152614ed381614e97565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614f0182614eda565b614f0b8185614ee5565b9350614f1b81856020860161383a565b614f2481613864565b840191505092915050565b6000608082019050614f446000830187613933565b614f516020830186613933565b614f5e6040830185613b1b565b8181036060830152614f708184614ef6565b905095945050505050565b600081519050614f8a816136ad565b92915050565b600060208284031215614fa657614fa5613677565b5b6000614fb484828501614f7b565b91505092915050565b614fc681614d1f565b82525050565b600060ff82169050919050565b614fe281614fcc565b82525050565b6000608082019050614ffd6000830187614fbd565b61500a6020830186614fd9565b6150176040830185614fbd565b6150246060830184614fbd565b9594505050505056fea2646970667358221220b158384e251cb4696687bf6aa3e10bbca786f141210a1d0141a76f9487de215764736f6c63430008110033697066733a2f2f516d525251724a506e794b36777853764250753634506237504364434b4b7837326d5476665572356f6d72504a67
Deployed Bytecode
0x6080604052600436106102675760003560e01c80636c19e78311610144578063b7c0b8e8116100b6578063e985e9c51161007a578063e985e9c5146108fc578063ec5a2d4514610939578063efedcd0114610950578063f2c4ce1e14610967578063f2fde38b14610990578063f9020e33146109b957610267565b8063b7c0b8e814610812578063b88d4fde1461083b578063c23dc68f14610857578063c87b56dd14610894578063d5abeb01146108d157610267565b806385271cf01161010857806385271cf0146107045780638da5cb5b1461072d57806395d89b411461075857806399a2557a1461078357806399b092d6146107c0578063a22cb465146107e957610267565b80636c19e7831461063357806370a082311461065c578063715018a61461069957806376a7e07c146106b05780638462151c146106c757610267565b80633ccfd60b116101dd57806355f804b3116101a157806355f804b3146105255780635bbb21771461054e5780636352211e1461058b57806367243482146105c8578063678c4655146105f15780636c0360eb1461060857610267565b80633ccfd60b1461046c57806342842e0e146104765780634bbece2c1461049257806351830227146104cf5780635503a0e8146104fa57610267565b8063095ea7b31161022f578063095ea7b31461036557806316ba10e01461038157806318160ddd146103aa57806323b872dd146103d55780632a55205a146103f157806338a5956a1461042f57610267565b806301ffc9a71461026c57806304634d8d146102a957806306fdde03146102d2578063081812fc146102fd578063081c8c441461033a575b600080fd5b34801561027857600080fd5b50610293600480360381019061028e91906136d9565b6109e4565b6040516102a09190613721565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb91906137de565b610a06565b005b3480156102de57600080fd5b506102e7610a1c565b6040516102f491906138ae565b60405180910390f35b34801561030957600080fd5b50610324600480360381019061031f9190613906565b610aae565b6040516103319190613942565b60405180910390f35b34801561034657600080fd5b5061034f610b2d565b60405161035c91906138ae565b60405180910390f35b61037f600480360381019061037a919061395d565b610bbb565b005b34801561038d57600080fd5b506103a860048036038101906103a39190613ad2565b610bf0565b005b3480156103b657600080fd5b506103bf610c0b565b6040516103cc9190613b2a565b60405180910390f35b6103ef60048036038101906103ea9190613b45565b610c22565b005b3480156103fd57600080fd5b5061041860048036038101906104139190613b98565b610c8d565b604051610426929190613bd8565b60405180910390f35b34801561043b57600080fd5b5061045660048036038101906104519190613c01565b610e77565b6040516104639190613b2a565b60405180910390f35b610474610e93565b005b610490600480360381019061048b9190613b45565b610f1b565b005b34801561049e57600080fd5b506104b960048036038101906104b49190613c01565b610f86565b6040516104c69190613b2a565b60405180910390f35b3480156104db57600080fd5b506104e4610f98565b6040516104f19190613721565b60405180910390f35b34801561050657600080fd5b5061050f610fab565b60405161051c91906138ae565b60405180910390f35b34801561053157600080fd5b5061054c60048036038101906105479190613ad2565b611039565b005b34801561055a57600080fd5b5061057560048036038101906105709190613c8e565b611054565b6040516105829190613e3e565b60405180910390f35b34801561059757600080fd5b506105b260048036038101906105ad9190613906565b611117565b6040516105bf9190613942565b60405180910390f35b3480156105d457600080fd5b506105ef60048036038101906105ea9190613eb6565b611129565b005b3480156105fd57600080fd5b50610606611276565b005b34801561061457600080fd5b5061061d6112ab565b60405161062a91906138ae565b60405180910390f35b34801561063f57600080fd5b5061065a60048036038101906106559190613c01565b611339565b005b34801561066857600080fd5b50610683600480360381019061067e9190613c01565b611385565b6040516106909190613b2a565b60405180910390f35b3480156106a557600080fd5b506106ae61143d565b005b3480156106bc57600080fd5b506106c5611451565b005b3480156106d357600080fd5b506106ee60048036038101906106e99190613c01565b611486565b6040516106fb9190613ff5565b60405180910390f35b34801561071057600080fd5b5061072b600480360381019061072691906140b8565b6115c9565b005b34801561073957600080fd5b506107426117c4565b60405161074f9190613942565b60405180910390f35b34801561076457600080fd5b5061076d6117ee565b60405161077a91906138ae565b60405180910390f35b34801561078f57600080fd5b506107aa60048036038101906107a59190614127565b611880565b6040516107b79190613ff5565b60405180910390f35b3480156107cc57600080fd5b506107e760048036038101906107e291906140b8565b611a8c565b005b3480156107f557600080fd5b50610810600480360381019061080b91906141a6565b611c86565b005b34801561081e57600080fd5b50610839600480360381019061083491906141e6565b611cbb565b005b61085560048036038101906108509190614213565b611ce0565b005b34801561086357600080fd5b5061087e60048036038101906108799190613906565b611d4d565b60405161088b91906142eb565b60405180910390f35b3480156108a057600080fd5b506108bb60048036038101906108b69190613906565b611db7565b6040516108c891906138ae565b60405180910390f35b3480156108dd57600080fd5b506108e6611f4a565b6040516108f39190613b2a565b60405180910390f35b34801561090857600080fd5b50610923600480360381019061091e9190614306565b611f50565b6040516109309190613721565b60405180910390f35b34801561094557600080fd5b5061094e611fe4565b005b34801561095c57600080fd5b50610965612018565b005b34801561097357600080fd5b5061098e60048036038101906109899190613ad2565b61204d565b005b34801561099c57600080fd5b506109b760048036038101906109b29190613c01565b612068565b005b3480156109c557600080fd5b506109ce6120eb565b6040516109db91906143bd565b60405180910390f35b60006109ef826120fe565b806109ff57506109fe82612190565b5b9050919050565b610a0e61220a565b610a188282612288565b5050565b606060028054610a2b90614407565b80601f0160208091040260200160405190810160405280929190818152602001828054610a5790614407565b8015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b6000610ab98261241d565b610aef576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600c8054610b3a90614407565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6690614407565b8015610bb35780601f10610b8857610100808354040283529160200191610bb3565b820191906000526020600020905b815481529060010190602001808311610b9657829003601f168201915b505050505081565b81610bc58161247c565b610be157610bd16124c8565b15610be057610bdf816124df565b5b5b610beb8383612523565b505050565b610bf861220a565b80600d9081610c0791906145e4565b5050565b6000610c15612667565b6001546000540303905090565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c7c57610c5f3361247c565b610c7b57610c6b6124c8565b15610c7a57610c79336124df565b5b5b5b610c8784848461266c565b50505050565b6000806000600a60008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610e225760096040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610e2c61298e565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610e5891906146e5565b610e629190614756565b90508160000151819350935050509250929050565b6000610e8282612998565b67ffffffffffffffff169050919050565b610e9b61220a565b6000610ea56117c4565b73ffffffffffffffffffffffffffffffffffffffff1647604051610ec8906147b8565b60006040518083038185875af1925050503d8060008114610f05576040519150601f19603f3d011682016040523d82523d6000602084013e610f0a565b606091505b5050905080610f1857600080fd5b50565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f7557610f583361247c565b610f7457610f646124c8565b15610f7357610f72336124df565b5b5b5b610f808484846129e5565b50505050565b6000610f9182612a05565b9050919050565b600e60149054906101000a900460ff1681565b600d8054610fb890614407565b80601f0160208091040260200160405190810160405280929190818152602001828054610fe490614407565b80156110315780601f1061100657610100808354040283529160200191611031565b820191906000526020600020905b81548152906001019060200180831161101457829003601f168201915b505050505081565b61104161220a565b80600b908161105091906145e4565b5050565b6060600083839050905060008167ffffffffffffffff81111561107a576110796139a7565b5b6040519080825280602002602001820160405280156110b357816020015b6110a061361e565b8152602001906001900390816110985790505b50905060005b82811461110b576110e28686838181106110d6576110d56147cd565b5b90506020020135611d4d565b8282815181106110f5576110f46147cd565b5b60200260200101819052508060010190506110b9565b50809250505092915050565b600061112282612a5c565b9050919050565b61113161220a565b818190508484905014611170576040517fe6bbb3c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061117a610c0b565b905060005b8585905081101561126e576101bc8484838181106111a05761119f6147cd565b5b90506020020135836111b291906147fc565b11156111ea576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8383828181106111fd576111fc6147cd565b5b905060200201358261120f91906147fc565b915061125b868683818110611227576112266147cd565b5b905060200201602081019061123c9190613c01565b85858481811061124f5761124e6147cd565b5b90506020020135612b28565b808061126690614830565b91505061117f565b505050505050565b61127e61220a565b6002600e60166101000a81548160ff021916908360028111156112a4576112a3614346565b5b0217905550565b600b80546112b890614407565b80601f01602080910402602001604051908101604052809291908181526020018280546112e490614407565b80156113315780601f1061130657610100808354040283529160200191611331565b820191906000526020600020905b81548152906001019060200180831161131457829003601f168201915b505050505081565b61134161220a565b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113ec576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61144561220a565b61144f6000612ce3565b565b61145961220a565b6000600e60166101000a81548160ff0219169083600281111561147f5761147e614346565b5b0217905550565b6060600080600061149685611385565b905060008167ffffffffffffffff8111156114b4576114b36139a7565b5b6040519080825280602002602001820160405280156114e25781602001602082028036833780820191505090505b5090506114ed61361e565b60006114f7612667565b90505b8386146115bb5761150a81612da9565b915081604001516115b057600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461155557816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115af57808387806001019850815181106115a2576115a16147cd565b5b6020026020010181815250505b5b8060010190506114fa565b508195505050505050919050565b600160028111156115dd576115dc614346565b5b600e60169054906101000a900460ff1660028111156115ff576115fe614346565b5b14611636576040517f2d0a346e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101bc83611642610c0b565b61164c91906147fc565b1115611684576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008261168f612dd4565b6040516020016116a0929190614938565b604051602081830303815290604052805190602001209050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661170c836116fe84612ddc565b612e0c90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1614611759576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828461176b611766612dd4565b610f86565b61177591906147fc565b11156117ad576040517fc3b708de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117be6117b8612dd4565b85612b28565b50505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546117fd90614407565b80601f016020809104026020016040519081016040528092919081815260200182805461182990614407565b80156118765780601f1061184b57610100808354040283529160200191611876565b820191906000526020600020905b81548152906001019060200180831161185957829003601f168201915b5050505050905090565b60608183106118bb576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806118c6612e33565b90506118d0612667565b8510156118e2576118df612667565b94505b808411156118ee578093505b60006118f987611385565b90508486101561191c576000868603905081811015611916578091505b50611921565b600090505b60008167ffffffffffffffff81111561193d5761193c6139a7565b5b60405190808252806020026020018201604052801561196b5781602001602082028036833780820191505090505b509050600082036119825780945050505050611a85565b600061198d88611d4d565b9050600081604001516119a257816000015190505b60008990505b8881141580156119b85750848714155b15611a77576119c681612da9565b92508260400151611a6c57600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611a1157826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611a6b5780848880600101995081518110611a5e57611a5d6147cd565b5b6020026020010181815250505b5b8060010190506119a8565b508583528296505050505050505b9392505050565b600280811115611a9f57611a9e614346565b5b600e60169054906101000a900460ff166002811115611ac157611ac0614346565b5b14611af8576040517f2d0a346e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101bc83611b04610c0b565b611b0e91906147fc565b1115611b46576040517f52df9fe500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082611b51612dd4565b604051602001611b629291906149bb565b604051602081830303815290604052805190602001209050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611bce83611bc084612ddc565b612e0c90919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1614611c1b576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8284611c2d611c28612dd4565b610e77565b611c3791906147fc565b1115611c6f576040517fc3b708de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611c80611c7a612dd4565b85612b28565b50505050565b81611c908161247c565b611cac57611c9c6124c8565b15611cab57611caa816124df565b5b5b611cb68383612e3c565b505050565b611cc361220a565b80600e60156101000a81548160ff02191690831515021790555050565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d3a57611d1d3361247c565b611d3957611d296124c8565b15611d3857611d37336124df565b5b5b5b611d4685858585612f47565b5050505050565b611d5561361e565b611d5d61361e565b611d65612667565b831080611d795750611d75612e33565b8310155b15611d875780915050611db2565b611d9083612da9565b9050806040015115611da55780915050611db2565b611dae83612fba565b9150505b919050565b606060001515600e60149054906101000a900460ff16151503611e6657600c8054611de190614407565b80601f0160208091040260200160405190810160405280929190818152602001828054611e0d90614407565b8015611e5a5780601f10611e2f57610100808354040283529160200191611e5a565b820191906000526020600020905b815481529060010190602001808311611e3d57829003601f168201915b50505050509050611f45565b6000600b8054611e7590614407565b80601f0160208091040260200160405190810160405280929190818152602001828054611ea190614407565b8015611eee5780601f10611ec357610100808354040283529160200191611eee565b820191906000526020600020905b815481529060010190602001808311611ed157829003601f168201915b505050505090506000815111611f135760405180602001604052806000815250611f41565b80611f1d84612fda565b600d604051602001611f3193929190614aa6565b6040516020818303038152906040525b9150505b919050565b6101bc81565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611fec61220a565b600e60149054906101000a900460ff1615600e60146101000a81548160ff021916908315150217905550565b61202061220a565b6001600e60166101000a81548160ff0219169083600281111561204657612045614346565b5b0217905550565b61205561220a565b80600c908161206491906145e4565b5050565b61207061220a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036120df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d690614b49565b60405180910390fd5b6120e881612ce3565b50565b600e60169054906101000a900460ff1681565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061215957506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806121895750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061220357506122028261302a565b5b9050919050565b612212612dd4565b73ffffffffffffffffffffffffffffffffffffffff166122306117c4565b73ffffffffffffffffffffffffffffffffffffffff1614612286576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227d90614bb5565b60405180910390fd5b565b61229061298e565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156122ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e590614c47565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361235d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161235490614cb3565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600960008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b600081612428612667565b11158015612437575060005482105b8015612475575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b6000731e0049783f008a0085193e00003d00cd54003c7173ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6000600e60159054906101000a900460ff16905090565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa61251b573d6000803e3d6000fd5b6000603a5250565b600061252e82611117565b90508073ffffffffffffffffffffffffffffffffffffffff1661254f613094565b73ffffffffffffffffffffffffffffffffffffffff16146125b25761257b81612576613094565b611f50565b6125b1576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600090565b600061267782612a5c565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146126de576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806126ea8461309c565b9150915061270081876126fb613094565b6130c3565b61274c5761271586612710613094565b611f50565b61274b576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036127b2576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127bf8686866001613107565b80156127ca57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154600101919050819055506128988561287488888761310d565b7c020000000000000000000000000000000000000000000000000000000017613135565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361291e576000600185019050600060046000838152602001908152602001600020540361291c57600054811461291b578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46129868686866001613160565b505050505050565b6000612710905090565b600060c0600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c9050919050565b612a0083838360405180602001604052806000815250611ce0565b505050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b60008082905080612a6b612667565b11612af157600054811015612af05760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612aee575b60008103612ae4576004600083600190039350838152602001908152602001600020549050612aba565b8092505050612b23565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008054905060008203612b68576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612b756000848385613107565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612bec83612bdd600086600061310d565b612be685613166565b17613135565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612c8d57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612c52565b5060008203612cc8576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050612cde6000848385613160565b505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612db161361e565b612dcd6004600084815260200190815260200160002054613176565b9050919050565b600033905090565b600081604051602001612def9190614d4a565b604051602081830303815290604052805190602001209050919050565b6000806000612e1b858561322c565b91509150612e288161327d565b819250505092915050565b60008054905090565b8060076000612e49613094565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612ef6613094565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612f3b9190613721565b60405180910390a35050565b612f52848484610c22565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612fb457612f7d848484846133e3565b612fb3576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b612fc261361e565b612fd3612fce83612a5c565b613176565b9050919050565b606060a060405101806040526020810391506000825281835b60011561301557600184039350600a81066030018453600a8104905080612ff3575b50828103602084039350808452505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8613124868684613533565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b60006001821460e11b9050919050565b61317e61361e565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b600080604183510361326d5760008060006020860151925060408601519150606086015160001a90506132618782858561353c565b94509450505050613276565b60006002915091505b9250929050565b6000600481111561329157613290614346565b5b8160048111156132a4576132a3614346565b5b03156133e057600160048111156132be576132bd614346565b5b8160048111156132d1576132d0614346565b5b03613311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161330890614dbc565b60405180910390fd5b6002600481111561332557613324614346565b5b81600481111561333857613337614346565b5b03613378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161336f90614e28565b60405180910390fd5b6003600481111561338c5761338b614346565b5b81600481111561339f5761339e614346565b5b036133df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133d690614eba565b60405180910390fd5b5b50565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613409613094565b8786866040518563ffffffff1660e01b815260040161342b9493929190614f2f565b6020604051808303816000875af192505050801561346757506040513d601f19601f820116820180604052508101906134649190614f90565b60015b6134e0573d8060008114613497576040519150601f19603f3d011682016040523d82523d6000602084013e61349c565b606091505b5060008151036134d8576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60009392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115613577576000600391509150613615565b60006001878787876040516000815260200160405260405161359c9493929190614fe8565b6020604051602081039080840390855afa1580156135be573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361360c57600060019250925050613615565b80600092509250505b94509492505050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6136b681613681565b81146136c157600080fd5b50565b6000813590506136d3816136ad565b92915050565b6000602082840312156136ef576136ee613677565b5b60006136fd848285016136c4565b91505092915050565b60008115159050919050565b61371b81613706565b82525050565b60006020820190506137366000830184613712565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006137678261373c565b9050919050565b6137778161375c565b811461378257600080fd5b50565b6000813590506137948161376e565b92915050565b60006bffffffffffffffffffffffff82169050919050565b6137bb8161379a565b81146137c657600080fd5b50565b6000813590506137d8816137b2565b92915050565b600080604083850312156137f5576137f4613677565b5b600061380385828601613785565b9250506020613814858286016137c9565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561385857808201518184015260208101905061383d565b60008484015250505050565b6000601f19601f8301169050919050565b60006138808261381e565b61388a8185613829565b935061389a81856020860161383a565b6138a381613864565b840191505092915050565b600060208201905081810360008301526138c88184613875565b905092915050565b6000819050919050565b6138e3816138d0565b81146138ee57600080fd5b50565b600081359050613900816138da565b92915050565b60006020828403121561391c5761391b613677565b5b600061392a848285016138f1565b91505092915050565b61393c8161375c565b82525050565b60006020820190506139576000830184613933565b92915050565b6000806040838503121561397457613973613677565b5b600061398285828601613785565b9250506020613993858286016138f1565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6139df82613864565b810181811067ffffffffffffffff821117156139fe576139fd6139a7565b5b80604052505050565b6000613a1161366d565b9050613a1d82826139d6565b919050565b600067ffffffffffffffff821115613a3d57613a3c6139a7565b5b613a4682613864565b9050602081019050919050565b82818337600083830152505050565b6000613a75613a7084613a22565b613a07565b905082815260208101848484011115613a9157613a906139a2565b5b613a9c848285613a53565b509392505050565b600082601f830112613ab957613ab861399d565b5b8135613ac9848260208601613a62565b91505092915050565b600060208284031215613ae857613ae7613677565b5b600082013567ffffffffffffffff811115613b0657613b0561367c565b5b613b1284828501613aa4565b91505092915050565b613b24816138d0565b82525050565b6000602082019050613b3f6000830184613b1b565b92915050565b600080600060608486031215613b5e57613b5d613677565b5b6000613b6c86828701613785565b9350506020613b7d86828701613785565b9250506040613b8e868287016138f1565b9150509250925092565b60008060408385031215613baf57613bae613677565b5b6000613bbd858286016138f1565b9250506020613bce858286016138f1565b9150509250929050565b6000604082019050613bed6000830185613933565b613bfa6020830184613b1b565b9392505050565b600060208284031215613c1757613c16613677565b5b6000613c2584828501613785565b91505092915050565b600080fd5b600080fd5b60008083601f840112613c4e57613c4d61399d565b5b8235905067ffffffffffffffff811115613c6b57613c6a613c2e565b5b602083019150836020820283011115613c8757613c86613c33565b5b9250929050565b60008060208385031215613ca557613ca4613677565b5b600083013567ffffffffffffffff811115613cc357613cc261367c565b5b613ccf85828601613c38565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613d108161375c565b82525050565b600067ffffffffffffffff82169050919050565b613d3381613d16565b82525050565b613d4281613706565b82525050565b600062ffffff82169050919050565b613d6081613d48565b82525050565b608082016000820151613d7c6000850182613d07565b506020820151613d8f6020850182613d2a565b506040820151613da26040850182613d39565b506060820151613db56060850182613d57565b50505050565b6000613dc78383613d66565b60808301905092915050565b6000602082019050919050565b6000613deb82613cdb565b613df58185613ce6565b9350613e0083613cf7565b8060005b83811015613e31578151613e188882613dbb565b9750613e2383613dd3565b925050600181019050613e04565b5085935050505092915050565b60006020820190508181036000830152613e588184613de0565b905092915050565b60008083601f840112613e7657613e7561399d565b5b8235905067ffffffffffffffff811115613e9357613e92613c2e565b5b602083019150836020820283011115613eaf57613eae613c33565b5b9250929050565b60008060008060408587031215613ed057613ecf613677565b5b600085013567ffffffffffffffff811115613eee57613eed61367c565b5b613efa87828801613e60565b9450945050602085013567ffffffffffffffff811115613f1d57613f1c61367c565b5b613f2987828801613c38565b925092505092959194509250565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613f6c816138d0565b82525050565b6000613f7e8383613f63565b60208301905092915050565b6000602082019050919050565b6000613fa282613f37565b613fac8185613f42565b9350613fb783613f53565b8060005b83811015613fe8578151613fcf8882613f72565b9750613fda83613f8a565b925050600181019050613fbb565b5085935050505092915050565b6000602082019050818103600083015261400f8184613f97565b905092915050565b600067ffffffffffffffff821115614032576140316139a7565b5b61403b82613864565b9050602081019050919050565b600061405b61405684614017565b613a07565b905082815260208101848484011115614077576140766139a2565b5b614082848285613a53565b509392505050565b600082601f83011261409f5761409e61399d565b5b81356140af848260208601614048565b91505092915050565b6000806000606084860312156140d1576140d0613677565b5b60006140df868287016138f1565b93505060206140f0868287016138f1565b925050604084013567ffffffffffffffff8111156141115761411061367c565b5b61411d8682870161408a565b9150509250925092565b6000806000606084860312156141405761413f613677565b5b600061414e86828701613785565b935050602061415f868287016138f1565b9250506040614170868287016138f1565b9150509250925092565b61418381613706565b811461418e57600080fd5b50565b6000813590506141a08161417a565b92915050565b600080604083850312156141bd576141bc613677565b5b60006141cb85828601613785565b92505060206141dc85828601614191565b9150509250929050565b6000602082840312156141fc576141fb613677565b5b600061420a84828501614191565b91505092915050565b6000806000806080858703121561422d5761422c613677565b5b600061423b87828801613785565b945050602061424c87828801613785565b935050604061425d878288016138f1565b925050606085013567ffffffffffffffff81111561427e5761427d61367c565b5b61428a8782880161408a565b91505092959194509250565b6080820160008201516142ac6000850182613d07565b5060208201516142bf6020850182613d2a565b5060408201516142d26040850182613d39565b5060608201516142e56060850182613d57565b50505050565b60006080820190506143006000830184614296565b92915050565b6000806040838503121561431d5761431c613677565b5b600061432b85828601613785565b925050602061433c85828601613785565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6003811061438657614385614346565b5b50565b600081905061439782614375565b919050565b60006143a782614389565b9050919050565b6143b78161439c565b82525050565b60006020820190506143d260008301846143ae565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061441f57607f821691505b602082108103614432576144316143d8565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261449a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261445d565b6144a4868361445d565b95508019841693508086168417925050509392505050565b6000819050919050565b60006144e16144dc6144d7846138d0565b6144bc565b6138d0565b9050919050565b6000819050919050565b6144fb836144c6565b61450f614507826144e8565b84845461446a565b825550505050565b600090565b614524614517565b61452f8184846144f2565b505050565b5b818110156145535761454860008261451c565b600181019050614535565b5050565b601f8211156145985761456981614438565b6145728461444d565b81016020851015614581578190505b61459561458d8561444d565b830182614534565b50505b505050565b600082821c905092915050565b60006145bb6000198460080261459d565b1980831691505092915050565b60006145d483836145aa565b9150826002028217905092915050565b6145ed8261381e565b67ffffffffffffffff811115614606576146056139a7565b5b6146108254614407565b61461b828285614557565b600060209050601f83116001811461464e576000841561463c578287015190505b61464685826145c8565b8655506146ae565b601f19841661465c86614438565b60005b828110156146845784890151825560018201915060208501945060208101905061465f565b868310156146a1578489015161469d601f8916826145aa565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006146f0826138d0565b91506146fb836138d0565b9250828202614709816138d0565b915082820484148315176147205761471f6146b6565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614761826138d0565b915061476c836138d0565b92508261477c5761477b614727565b5b828204905092915050565b600081905092915050565b50565b60006147a2600083614787565b91506147ad82614792565b600082019050919050565b60006147c382614795565b9150819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614807826138d0565b9150614812836138d0565b925082820190508082111561482a576148296146b6565b5b92915050565b600061483b826138d0565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361486d5761486c6146b6565b5b600182019050919050565b600081905092915050565b7f4731000000000000000000000000000000000000000000000000000000000000600082015250565b60006148b9600283614878565b91506148c482614883565b600282019050919050565b6000819050919050565b6148ea6148e5826138d0565b6148cf565b82525050565b60008160601b9050919050565b6000614908826148f0565b9050919050565b600061491a826148fd565b9050919050565b61493261492d8261375c565b61490f565b82525050565b6000614943826148ac565b915061494f82856148d9565b60208201915061495f8284614921565b6014820191508190509392505050565b7f4732000000000000000000000000000000000000000000000000000000000000600082015250565b60006149a5600283614878565b91506149b08261496f565b600282019050919050565b60006149c682614998565b91506149d282856148d9565b6020820191506149e28284614921565b6014820191508190509392505050565b60006149fd8261381e565b614a078185614878565b9350614a1781856020860161383a565b80840191505092915050565b60008154614a3081614407565b614a3a8186614878565b94506001821660008114614a555760018114614a6a57614a9d565b60ff1983168652811515820286019350614a9d565b614a7385614438565b60005b83811015614a9557815481890152600182019150602081019050614a76565b838801955050505b50505092915050565b6000614ab282866149f2565b9150614abe82856149f2565b9150614aca8284614a23565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614b33602683613829565b9150614b3e82614ad7565b604082019050919050565b60006020820190508181036000830152614b6281614b26565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614b9f602083613829565b9150614baa82614b69565b602082019050919050565b60006020820190508181036000830152614bce81614b92565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614c31602a83613829565b9150614c3c82614bd5565b604082019050919050565b60006020820190508181036000830152614c6081614c24565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614c9d601983613829565b9150614ca882614c67565b602082019050919050565b60006020820190508181036000830152614ccc81614c90565b9050919050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614d09601c83614878565b9150614d1482614cd3565b601c82019050919050565b6000819050919050565b6000819050919050565b614d44614d3f82614d1f565b614d29565b82525050565b6000614d5582614cfc565b9150614d618284614d33565b60208201915081905092915050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614da6601883613829565b9150614db182614d70565b602082019050919050565b60006020820190508181036000830152614dd581614d99565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b6000614e12601f83613829565b9150614e1d82614ddc565b602082019050919050565b60006020820190508181036000830152614e4181614e05565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ea4602283613829565b9150614eaf82614e48565b604082019050919050565b60006020820190508181036000830152614ed381614e97565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614f0182614eda565b614f0b8185614ee5565b9350614f1b81856020860161383a565b614f2481613864565b840191505092915050565b6000608082019050614f446000830187613933565b614f516020830186613933565b614f5e6040830185613b1b565b8181036060830152614f708184614ef6565b905095945050505050565b600081519050614f8a816136ad565b92915050565b600060208284031215614fa657614fa5613677565b5b6000614fb484828501614f7b565b91505092915050565b614fc681614d1f565b82525050565b600060ff82169050919050565b614fe281614fcc565b82525050565b6000608082019050614ffd6000830187614fbd565b61500a6020830186614fd9565b6150176040830185614fbd565b6150246060830184614fbd565b9594505050505056fea2646970667358221220b158384e251cb4696687bf6aa3e10bbca786f141210a1d0141a76f9487de215764736f6c63430008110033
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.