ERC-721
Overview
Max Total Supply
984 AYA Stellar
Holders
440
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
6 AYA StellarLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AyaStellar
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "./ERC721Enumerable.sol"; import "./DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract AyaStellar is ERC721Enumerable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; string private _baseTokenURI; string private _tokenURISuffix; uint256 public constant MAX_SUPPLY = 2222; uint256 public maxPerWalletAl = 1; uint256 public maxPerWallet = 9; uint256 public publicMintCost = 55000000000000000; // 0.055 ETH uint256 public allowlistMintCost = 50000000000000000; // 0.05 ETH bytes32 public merkleRoot; bool public isPublic; bool public isAllowList; mapping(address => uint256) public mintedCount; address payable internal constant po = payable(0x1762c438fe2377A459164922B25f5F0492001dBE); constructor() ERC721("AyaStellar", "AYA Stellar") {} function mint(uint256 count) external payable nonReentrant { require(isPublic, "Public mint closed"); require( mintedCount[msg.sender] + count <= maxPerWallet, "Exceeds your allowance" ); mintedCount[msg.sender] += count; uint256 supply = _owners.length; require(supply + count <= MAX_SUPPLY, "Max supply reached"); require(publicMintCost * count == msg.value, "Invalid funds provided"); for (uint256 i = 0; i < count; i++) { _safeMint(msg.sender, supply++); } } function allowListMint(uint256 count, bytes32[] calldata proof) external payable nonReentrant { require(isAllowList, "Wait for allowlist mint"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(_verify(leaf, proof), "Invalid proof"); require( mintedCount[msg.sender] + count <= maxPerWalletAl, "Exceeds your allowance" ); mintedCount[msg.sender] += count; uint256 supply = _owners.length; require(supply + count <= MAX_SUPPLY, "Max supply reached"); require( allowlistMintCost * count == msg.value, "Invalid funds provided" ); for (uint256 i = 0; i < count; i++) { _safeMint(msg.sender, supply++); } } /* VIEW FUNCTIONS */ function tokenURI(uint256 tokenId) external view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); return bytes(_baseTokenURI).length > 0 ? string( abi.encodePacked( _baseTokenURI, tokenId.toString(), _tokenURISuffix ) ) : "ipfs://QmWmRDZegcbvMM3ke2HvMFtckvv1C9JmNzj1QeJR2rcP4P"; } /* ONLY OWNER FUNCTIONS */ function airdrop(uint256[] calldata quantity, address[] calldata recipient) external onlyOwner { require( quantity.length == recipient.length, "Quantity length is not equal to recipients" ); uint256 totalQuantity; for (uint256 i = 0; i < quantity.length; ++i) { totalQuantity += quantity[i]; } uint256 supply = _owners.length; require(supply + totalQuantity <= MAX_SUPPLY, "Max supply reached"); delete totalQuantity; for (uint256 i = 0; i < recipient.length; ++i) { for (uint256 j = 0; j < quantity[i]; ++j) { _safeMint(recipient[i], supply++); } } } function toggleAllowList() external onlyOwner { isAllowList = !isAllowList; } function toggleSales() external onlyOwner { isPublic = !isPublic; isAllowList = !isAllowList; } function togglePublicSale() external onlyOwner { isPublic = !isPublic; } function setMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { merkleRoot = newMerkleRoot; } function setPublicMintCost(uint256 mintCost) external onlyOwner { publicMintCost = mintCost; } function setAllowListMintCost(uint256 mintCost) external onlyOwner { allowlistMintCost = mintCost; } function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { maxPerWallet = _maxPerWallet; } function setMaxPerWalletAL(uint256 _maxPerWallet) external onlyOwner { maxPerWalletAl = _maxPerWallet; } function setBaseURI(string calldata newBaseURI, string calldata newSuffix) external onlyOwner { _baseTokenURI = newBaseURI; _tokenURISuffix = newSuffix; } function withdraw() external onlyOwner { po.transfer(address(this).balance); } /* INTERNAL FUNCTIONS */ function _verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { return MerkleProof.verify(proof, merkleRoot, leaf); } /* OVERIDES FOR OPERATOR FILTER REGISTRY */ function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @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`. * * 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 calldata data ) external; /** * @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 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 ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/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.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; string private _name; string private _symbol; // Mapping from token ID to owner address address[] internal _owners; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _owners.push(address(0)); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require( owner != address(0), "ERC721: balance query for the zero address" ); uint256 count; for (uint256 i; i < _owners.length; ++i) { if (owner == _owners[i]) ++count; } return count; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require( owner != address(0), "ERC721: owner query for nonexistent token" ); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require( _exists(tokenId), "ERC721: approved query for nonexistent token" ); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved" ); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved" ); _safeTransfer(from, to, tokenId, _data); } /** * @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. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @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 (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _owners.length && _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require( _exists(tokenId), "ERC721: operator query for nonexistent token" ); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _owners.push(to); emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _owners[tokenId] = address(0); emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require( ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own" ); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert( "ERC721: transfer to non ERC721Receiver implementer" ); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "./ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _owners.length - 1; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require( index < _owners.length, "ERC721Enumerable: global index out of bounds" ); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { require( index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds" ); uint256 count; for (uint256 i; i < _owners.length; i++) { if (owner == _owners[i]) { if (count == index) return i; else count++; } } revert("ERC721Enumerable: owner index out of bounds"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries( address registrant, address registrantToCopy ) external; function unregister(address addr) external; function updateOperator( address registrant, address operator, bool filtered ) external; function updateOperators( address registrant, address[] calldata operators, bool filtered ) external; function updateCodeHash( address registrant, bytes32 codehash, bool filtered ) external; function updateCodeHashes( address registrant, bytes32[] calldata codeHashes, bool filtered ) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe( address(this), subscriptionOrRegistrantToCopy ); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries( address(this), subscriptionOrRegistrantToCopy ); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if ( !OPERATOR_FILTER_REGISTRY.isOperatorAllowed( address(this), operator ) ) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": true, "runs": 200, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"quantity","type":"uint256[]"},{"internalType":"address[]","name":"recipient","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"allowListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"allowlistMintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublic","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWalletAl","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedCount","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":"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":"publicMintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintCost","type":"uint256"}],"name":"setAllowListMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"},{"internalType":"string","name":"newSuffix","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setMaxPerWalletAL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintCost","type":"uint256"}],"name":"setPublicMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260016009556009600a5566c3663566a58000600b5566b1a2bc2ec50000600c553480156200003157600080fd5b50604080518082018252600a81526920bcb0a9ba32b63630b960b11b60208083019182528351808501909452600b84526a20aca09029ba32b63630b960a91b908401528151733cc6cdda760b79bafa08df41ecfa224f810dceb693600193929091620000a0916000916200029c565b508051620000b69060019060208401906200029c565b5050600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b03191690555062000104336200024a565b60016006556daaeb6d7670e522a718067333cd4e3b15620002425780156200019557604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe906200015b903090869060040162000366565b600060405180830381600087803b1580156200017657600080fd5b505af11580156200018b573d6000803e3d6000fd5b5050505062000242565b6001600160a01b03821615620001da5760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af2903906200015b903090869060040162000366565b604051632210724360e11b81526daaeb6d7670e522a718067333cd4e90634420e486906200020d9030906004016200038c565b600060405180830381600087803b1580156200022857600080fd5b505af11580156200023d573d6000803e3d6000fd5b505050505b5050620003e2565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620002aa90620003b2565b90600052602060002090601f016020900481019282620002ce576000855562000319565b82601f10620002e957805160ff191683800117855562000319565b8280016001018555821562000319579182015b8281111562000319578251825591602001919060010190620002fc565b50620003279291506200032b565b5090565b5b808211156200032757600081556001016200032c565b60006001600160a01b0382165b92915050565b620003608162000342565b82525050565b6040810162000376828562000355565b62000385602083018462000355565b9392505050565b602081016200034f828462000355565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620003c757607f821691505b602082108103620003dc57620003dc6200039c565b50919050565b612c0480620003f26000396000f3fe6080604052600436106102515760003560e01c80637cb6475911610139578063b88d4fde116100b6578063e222c7f91161007a578063e222c7f914610685578063e268e4d31461069a578063e985e9c5146106ba578063ec8bda8e14610703578063f2fde38b14610716578063fddcb5ea1461073657600080fd5b8063b88d4fde146105f7578063c87b56dd14610617578063dbd30ae014610637578063dc4efe101461064c578063dc9a15351461066b57600080fd5b806396dee896116100fd57806396dee8961461056f578063984adc661461058f578063988934af146105af578063a0712d68146105c4578063a22cb465146105d757600080fd5b80637cb64759146104e657806380eae578146105065780638c770067146105265780638da5cb5b1461053c57806395d89b411461055a57600080fd5b806341f43434116101d257806360fa1fbd1161019657806360fa1fbd1461043b5780636352211e146104515780636673c4c2146104715780636790a9de1461049157806370a08231146104b1578063715018a6146104d157600080fd5b806341f43434146103a057806342842e0e146103cf578063453c2310146103ef5780634f6ccce7146104055780635f23c4221461042557600080fd5b806323b872dd1161021957806323b872dd1461031f5780632eb4a7ab1461033f5780632f745c591461035557806332cb6b0c146103755780633ccfd60b1461038b57600080fd5b806301ffc9a71461025657806306fdde031461028c578063081812fc146102ae578063095ea7b3146102db57806318160ddd146102fd575b600080fd5b34801561026257600080fd5b50610276610271366004611b57565b610763565b6040516102839190611b82565b60405180910390f35b34801561029857600080fd5b506102a161078e565b6040516102839190611bee565b3480156102ba57600080fd5b506102ce6102c9366004611c10565b610820565b6040516102839190611c4b565b3480156102e757600080fd5b506102fb6102f6366004611c6d565b61086c565b005b34801561030957600080fd5b50610312610885565b6040516102839190611cb0565b34801561032b57600080fd5b506102fb61033a366004611cbe565b61089c565b34801561034b57600080fd5b50610312600d5481565b34801561036157600080fd5b50610312610370366004611c6d565b6108c7565b34801561038157600080fd5b506103126108ae81565b34801561039757600080fd5b506102fb610979565b3480156103ac57600080fd5b506103c26daaeb6d7670e522a718067333cd4e81565b6040516102839190611d2d565b3480156103db57600080fd5b506102fb6103ea366004611cbe565b6109c4565b3480156103fb57600080fd5b50610312600a5481565b34801561041157600080fd5b50610312610420366004611c10565b6109e9565b34801561043157600080fd5b50610312600c5481565b34801561044757600080fd5b5061031260095481565b34801561045d57600080fd5b506102ce61046c366004611c10565b610a11565b34801561047d57600080fd5b506102fb61048c366004611d8d565b610a5b565b34801561049d57600080fd5b506102fb6104ac366004611e51565b610b8a565b3480156104bd57600080fd5b506103126104cc366004611ebe565b610bb2565b3480156104dd57600080fd5b506102fb610c3d565b3480156104f257600080fd5b506102fb610501366004611c10565b610c51565b34801561051257600080fd5b506102fb610521366004611c10565b610c5e565b34801561053257600080fd5b50610312600b5481565b34801561054857600080fd5b506005546001600160a01b03166102ce565b34801561056657600080fd5b506102a1610c6b565b34801561057b57600080fd5b506102fb61058a366004611c10565b610c7a565b34801561059b57600080fd5b506102fb6105aa366004611c10565b610c87565b3480156105bb57600080fd5b506102fb610c94565b6102fb6105d2366004611c10565b610cb9565b3480156105e357600080fd5b506102fb6105f2366004611ef2565b610ddb565b34801561060357600080fd5b506102fb610612366004612018565b610def565b34801561062357600080fd5b506102a1610632366004611c10565b610e15565b34801561064357600080fd5b506102fb610ea4565b34801561065857600080fd5b50600e5461027690610100900460ff1681565b34801561067757600080fd5b50600e546102769060ff1681565b34801561069157600080fd5b506102fb610ee0565b3480156106a657600080fd5b506102fb6106b5366004611c10565b610efc565b3480156106c657600080fd5b506102766106d5366004612097565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6102fb6107113660046120ca565b610f09565b34801561072257600080fd5b506102fb610731366004611ebe565b6110ae565b34801561074257600080fd5b50610312610751366004611ebe565b600f6020526000908152604090205481565b60006001600160e01b0319821663780e9d6360e01b14806107885750610788826110e5565b92915050565b60606000805461079d9061213c565b80601f01602080910402602001604051908101604052809291908181526020018280546107c99061213c565b80156108165780601f106107eb57610100808354040283529160200191610816565b820191906000526020600020905b8154815290600101906020018083116107f957829003601f168201915b5050505050905090565b600061082b82611135565b6108505760405162461bcd60e51b8152600401610847906121b4565b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b816108768161117f565b6108808383611227565b505050565b600254600090610897906001906121da565b905090565b826001600160a01b03811633146108b6576108b63361117f565b6108c18484846112a7565b50505050565b60006108d283610bb2565b82106108f05760405162461bcd60e51b815260040161084790612239565b6000805b600254811015610960576002818154811061091157610911612249565b6000918252602090912001546001600160a01b039081169086160361094e578382036109405791506107889050565b8161094a8161225f565b9250505b806109588161225f565b9150506108f4565b5060405162461bcd60e51b815260040161084790612239565b6109816112d8565b604051731762c438fe2377a459164922b25f5f0492001dbe904780156108fc02916000818181858888f193505050501580156109c1573d6000803e3d6000fd5b50565b826001600160a01b03811633146109de576109de3361117f565b6108c1848484611302565b6002546000908210610a0d5760405162461bcd60e51b8152600401610847906122c2565b5090565b60008060028381548110610a2757610a27612249565b6000918252602090912001546001600160a01b03169050806107885760405162461bcd60e51b815260040161084790612318565b610a636112d8565b828114610a825760405162461bcd60e51b81526004016108479061236f565b6000805b84811015610ac457858582818110610aa057610aa0612249565b9050602002013582610ab2919061237f565b9150610abd8161225f565b9050610a86565b506002546108ae610ad5838361237f565b1115610af35760405162461bcd60e51b8152600401610847906123c3565b6000915060005b83811015610b815760005b878783818110610b1757610b17612249565b90506020020135811015610b7057610b60868684818110610b3a57610b3a612249565b9050602002016020810190610b4f9190611ebe565b84610b598161225f565b955061131d565b610b698161225f565b9050610b05565b50610b7a8161225f565b9050610afa565b50505050505050565b610b926112d8565b610b9e60078585611aa5565b50610bab60088383611aa5565b5050505050565b60006001600160a01b038216610bda5760405162461bcd60e51b81526004016108479061241a565b6000805b600254811015610c365760028181548110610bfb57610bfb612249565b6000918252602090912001546001600160a01b0390811690851603610c2657610c238261225f565b91505b610c2f8161225f565b9050610bde565b5092915050565b610c456112d8565b610c4f600061133b565b565b610c596112d8565b600d55565b610c666112d8565b600b55565b60606001805461079d9061213c565b610c826112d8565b600955565b610c8f6112d8565b600c55565b610c9c6112d8565b600e805461ff001981166101009182900460ff1615909102179055565b610cc161138d565b600e5460ff16610ce35760405162461bcd60e51b815260040161084790612453565b600a54336000908152600f6020526040902054610d0190839061237f565b1115610d1f5760405162461bcd60e51b815260040161084790612490565b336000908152600f602052604081208054839290610d3e90849061237f565b90915550506002546108ae610d53838361237f565b1115610d715760405162461bcd60e51b8152600401610847906123c3565b3482600b54610d8091906124a0565b14610d9d5760405162461bcd60e51b8152600401610847906124ec565b60005b82811015610dcf57610dbd3383610db68161225f565b945061131d565b80610dc78161225f565b915050610da0565b50506109c16001600655565b81610de58161117f565b61088083836113b6565b836001600160a01b0381163314610e0957610e093361117f565b610bab8585858561144d565b6060610e2082611135565b610e3c5760405162461bcd60e51b815260040161084790612548565b600060078054610e4b9061213c565b905011610e7057604051806060016040528060358152602001612b9a60359139610788565b6007610e7b8361147f565b6008604051602001610e8f939291906125e8565b60405160208183030381529060405292915050565b610eac6112d8565b600e805461010060ff19821660ff80841615918217839004161590910261ff001990911661ffff1990921691909117179055565b610ee86112d8565b600e805460ff19811660ff90911615179055565b610f046112d8565b600a55565b610f1161138d565b600e54610100900460ff16610f385760405162461bcd60e51b815260040161084790612649565b600033604051602001610f4b9190612681565b604051602081830303815290604052805190602001209050610fa08184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061151392505050565b610fbc5760405162461bcd60e51b8152600401610847906126ba565b600954336000908152600f6020526040902054610fda90869061237f565b1115610ff85760405162461bcd60e51b815260040161084790612490565b336000908152600f60205260408120805486929061101790849061237f565b90915550506002546108ae61102c868361237f565b111561104a5760405162461bcd60e51b8152600401610847906123c3565b3485600c5461105991906124a0565b146110765760405162461bcd60e51b8152600401610847906124ec565b60005b858110156110a15761108f3383610db68161225f565b806110998161225f565b915050611079565b5050506108806001600655565b6110b66112d8565b6001600160a01b0381166110dc5760405162461bcd60e51b81526004016108479061270d565b6109c18161133b565b60006001600160e01b031982166380ac58cd60e01b148061111657506001600160e01b03198216635b5e139f60e01b145b8061078857506301ffc9a760e01b6001600160e01b0319831614610788565b60025460009082108015610788575060006001600160a01b03166002838154811061116257611162612249565b6000918252602090912001546001600160a01b0316141592915050565b6daaeb6d7670e522a718067333cd4e3b156109c157604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906111c7903090859060040161271d565b602060405180830381865afa1580156111e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112089190612743565b6109c15780604051633b79c77360e21b81526004016108479190611c4b565b600061123282610a11565b9050806001600160a01b0316836001600160a01b0316036112655760405162461bcd60e51b8152600401610847906127a2565b336001600160a01b0382161480611281575061128181336106d5565b61129d5760405162461bcd60e51b81526004016108479061280c565b6108808383611529565b6112b13382611597565b6112cd5760405162461bcd60e51b81526004016108479061286a565b61088083838361163c565b6005546001600160a01b03163314610c4f5760405162461bcd60e51b8152600401610847906128ac565b61088083838360405180602001604052806000815250610def565b611337828260405180602001604052806000815250611714565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600654036113af5760405162461bcd60e51b8152600401610847906128f0565b6002600655565b336001600160a01b038316036113de5760405162461bcd60e51b815260040161084790612934565b3360008181526004602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611441908590611b82565b60405180910390a35050565b6114573383611597565b6114735760405162461bcd60e51b81526004016108479061286a565b6108c184848484611747565b6060600061148c8361177a565b600101905060008167ffffffffffffffff8111156114ac576114ac611f25565b6040519080825280601f01601f1916602001820160405280156114d6576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846114e0575b509392505050565b600061152282600d5485611852565b9392505050565b600081815260036020526040902080546001600160a01b0319166001600160a01b038416908117909155819061155e82610a11565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006115a282611135565b6115be5760405162461bcd60e51b81526004016108479061298d565b60006115c983610a11565b9050806001600160a01b0316846001600160a01b031614806116045750836001600160a01b03166115f984610820565b6001600160a01b0316145b8061163457506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661164f82610a11565b6001600160a01b0316146116755760405162461bcd60e51b8152600401610847906129e3565b6001600160a01b03821661169b5760405162461bcd60e51b815260040161084790612a34565b6116a6600082611529565b81600282815481106116ba576116ba612249565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b61171e8383611868565b61172b6000848484611930565b6108805760405162461bcd60e51b815260040161084790612a93565b61175284848461163c565b61175e84848484611930565b6108c15760405162461bcd60e51b815260040161084790612a93565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106117b95772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106117e5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061180357662386f26fc10000830492506010015b6305f5e100831061181b576305f5e100830492506008015b612710831061182f57612710830492506004015b60648310611841576064830492506002015b600a83106107885760010192915050565b60008261185f8584611a31565b14949350505050565b6001600160a01b03821661188e5760405162461bcd60e51b815260040161084790612ad5565b61189781611135565b156118b45760405162461bcd60e51b815260040161084790612b19565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15611a2657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611974903390899088908890600401612b29565b6020604051808303816000875af19250505080156119af575060408051601f3d908101601f191682019092526119ac91810190612b78565b60015b611a0c573d8080156119dd576040519150601f19603f3d011682016040523d82523d6000602084013e6119e2565b606091505b508051600003611a045760405162461bcd60e51b815260040161084790612a93565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611634565b506001949350505050565b600081815b845181101561150b57611a6282868381518110611a5557611a55612249565b6020026020010151611a76565b915080611a6e8161225f565b915050611a36565b6000818310611a92576000828152602084905260409020611522565b6000838152602083905260409020611522565b828054611ab19061213c565b90600052602060002090601f016020900481019282611ad35760008555611b19565b82601f10611aec5782800160ff19823516178555611b19565b82800160010185558215611b19579182015b82811115611b19578235825591602001919060010190611afe565b50610a0d9291505b80821115610a0d5760008155600101611b21565b6001600160e01b031981165b81146109c157600080fd5b803561078881611b35565b600060208284031215611b6c57611b6c600080fd5b60006116348484611b4c565b8015155b82525050565b602081016107888284611b78565b60005b83811015611bab578181015183820152602001611b93565b838111156108c15750506000910152565b6000611bc6825190565b808452602084019350611bdd818560208601611b90565b601f01601f19169290920192915050565b602080825281016115228184611bbc565b80611b41565b803561078881611bff565b600060208284031215611c2557611c25600080fd5b60006116348484611c05565b60006001600160a01b038216610788565b611b7c81611c31565b602081016107888284611c42565b611b4181611c31565b803561078881611c59565b60008060408385031215611c8357611c83600080fd5b6000611c8f8585611c62565b9250506020611ca085828601611c05565b9150509250929050565b80611b7c565b602081016107888284611caa565b600080600060608486031215611cd657611cd6600080fd5b6000611ce28686611c62565b9350506020611cf386828701611c62565b9250506040611d0486828701611c05565b9150509250925092565b600061078882611c31565b600061078882611d0e565b611b7c81611d19565b602081016107888284611d24565b60008083601f840112611d5057611d50600080fd5b50813567ffffffffffffffff811115611d6b57611d6b600080fd5b602083019150836020820283011115611d8657611d86600080fd5b9250929050565b60008060008060408587031215611da657611da6600080fd5b843567ffffffffffffffff811115611dc057611dc0600080fd5b611dcc87828801611d3b565b9450945050602085013567ffffffffffffffff811115611dee57611dee600080fd5b611dfa87828801611d3b565b95989497509550505050565b60008083601f840112611e1b57611e1b600080fd5b50813567ffffffffffffffff811115611e3657611e36600080fd5b602083019150836001820283011115611d8657611d86600080fd5b60008060008060408587031215611e6a57611e6a600080fd5b843567ffffffffffffffff811115611e8457611e84600080fd5b611e9087828801611e06565b9450945050602085013567ffffffffffffffff811115611eb257611eb2600080fd5b611dfa87828801611e06565b600060208284031215611ed357611ed3600080fd5b60006116348484611c62565b801515611b41565b803561078881611edf565b60008060408385031215611f0857611f08600080fd5b6000611f148585611c62565b9250506020611ca085828601611ee7565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611f6157611f61611f25565b6040525050565b6000611f7360405190565b9050611f7f8282611f3b565b919050565b600067ffffffffffffffff821115611f9e57611f9e611f25565b601f19601f83011660200192915050565b82818337506000910152565b6000611fce611fc984611f84565b611f68565b905082815260208101848484011115611fe957611fe9600080fd5b61150b848285611faf565b600082601f83011261200857612008600080fd5b8135611634848260208601611fbb565b6000806000806080858703121561203157612031600080fd5b600061203d8787611c62565b945050602061204e87828801611c62565b935050604061205f87828801611c05565b925050606085013567ffffffffffffffff81111561207f5761207f600080fd5b61208b87828801611ff4565b91505092959194509250565b600080604083850312156120ad576120ad600080fd5b60006120b98585611c62565b9250506020611ca085828601611c62565b6000806000604084860312156120e2576120e2600080fd5b60006120ee8686611c05565b935050602084013567ffffffffffffffff81111561210e5761210e600080fd5b61211a86828701611d3b565b92509250509250925092565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061215057607f821691505b60208210810361216257612162612126565b50919050565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b6020808252810161078881612168565b634e487b7160e01b600052601160045260246000fd5b6000828210156121ec576121ec6121c4565b500390565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602082015291506121ad565b60208082528101610788816121f1565b634e487b7160e01b600052603260045260246000fd5b60006000198203612272576122726121c4565b5060010190565b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602082015291506121ad565b6020808252810161078881612279565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602082015291506121ad565b60208082528101610788816122d2565b602a81526000602082017f5175616e74697479206c656e677468206973206e6f7420657175616c20746f20815269726563697069656e747360b01b602082015291506121ad565b6020808252810161078881612328565b60008219821115612392576123926121c4565b500190565b601281526000602082017113585e081cdd5c1c1b1e481c995858da195960721b815291505b5060200190565b6020808252810161078881612397565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602082015291506121ad565b60208082528101610788816123d3565b6012815260006020820171141d589b1a58c81b5a5b9d0818db1bdcd95960721b815291506123bc565b602080825281016107888161242a565b60168152600060208201754578636565647320796f757220616c6c6f77616e636560501b815291506123bc565b6020808252810161078881612463565b60008160001904831182151516156124ba576124ba6121c4565b500290565b6016815260006020820175125b9d985b1a5908199d5b991cc81c1c9bdd9a59195960521b815291506123bc565b60208082528101610788816124bf565b602f81526000602082017f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b602082015291506121ad565b60208082528101610788816124fc565b600081546125658161213c565b60018216801561257c576001811461258d576125bd565b60ff198316865281860193506125bd565b60008581526020902060005b838110156125b557815488820152600190910190602001612599565b838801955050505b50505092915050565b60006125d0825190565b6125de818560208601611b90565b9290920192915050565b60006125f48286612558565b915061260082856125c6565b915061260c8284612558565b95945050505050565b601781526000602082017f5761697420666f7220616c6c6f776c697374206d696e74000000000000000000815291506123bc565b6020808252810161078881612615565b60006107888260601b90565b600061078882612659565b611b7c61267c82611c31565b612665565b600061268d8284612670565b50601401919050565b600d81526000602082016c24b73b30b634b210383937b7b360991b815291506123bc565b6020808252810161078881612696565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506121ad565b60208082528101610788816126ca565b6040810161272b8285611c42565b6115226020830184611c42565b805161078881611edf565b60006020828403121561275857612758600080fd5b60006116348484612738565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b602082015291506121ad565b6020808252810161078881612764565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015291506121ad565b60208082528101610788816127b2565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b602082015291506121ad565b602080825281016107888161281c565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260006123bc565b602080825281016107888161287a565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291506123bc565b60208082528101610788816128bc565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c657200000000000000815291506123bc565b6020808252810161078881612900565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291506121ad565b6020808252810161078881612944565b602981526000602082017f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981526839903737ba1037bbb760b91b602082015291506121ad565b602080825281016107888161299d565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b602082015291506121ad565b60208082528101610788816129f3565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b602082015291506121ad565b6020808252810161078881612a44565b60208082527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373910190815260006123bc565b6020808252810161078881612aa3565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000815291506123bc565b6020808252810161078881612ae5565b60808101612b378287611c42565b612b446020830186611c42565b612b516040830185611caa565b8181036060830152612b638184611bbc565b9695505050505050565b805161078881611b35565b600060208284031215612b8d57612b8d600080fd5b60006116348484612b6d56fe697066733a2f2f516d576d52445a65676362764d4d336b653248764d4674636b76763143394a6d4e7a6a3151654a52327263503450a2646970667358221220735d0b95b86f44db60eec84b1c879ffee5f47d800d4bd491e818fe2342ff0b7f64736f6c634300080d0033
Deployed Bytecode
0x6080604052600436106102515760003560e01c80637cb6475911610139578063b88d4fde116100b6578063e222c7f91161007a578063e222c7f914610685578063e268e4d31461069a578063e985e9c5146106ba578063ec8bda8e14610703578063f2fde38b14610716578063fddcb5ea1461073657600080fd5b8063b88d4fde146105f7578063c87b56dd14610617578063dbd30ae014610637578063dc4efe101461064c578063dc9a15351461066b57600080fd5b806396dee896116100fd57806396dee8961461056f578063984adc661461058f578063988934af146105af578063a0712d68146105c4578063a22cb465146105d757600080fd5b80637cb64759146104e657806380eae578146105065780638c770067146105265780638da5cb5b1461053c57806395d89b411461055a57600080fd5b806341f43434116101d257806360fa1fbd1161019657806360fa1fbd1461043b5780636352211e146104515780636673c4c2146104715780636790a9de1461049157806370a08231146104b1578063715018a6146104d157600080fd5b806341f43434146103a057806342842e0e146103cf578063453c2310146103ef5780634f6ccce7146104055780635f23c4221461042557600080fd5b806323b872dd1161021957806323b872dd1461031f5780632eb4a7ab1461033f5780632f745c591461035557806332cb6b0c146103755780633ccfd60b1461038b57600080fd5b806301ffc9a71461025657806306fdde031461028c578063081812fc146102ae578063095ea7b3146102db57806318160ddd146102fd575b600080fd5b34801561026257600080fd5b50610276610271366004611b57565b610763565b6040516102839190611b82565b60405180910390f35b34801561029857600080fd5b506102a161078e565b6040516102839190611bee565b3480156102ba57600080fd5b506102ce6102c9366004611c10565b610820565b6040516102839190611c4b565b3480156102e757600080fd5b506102fb6102f6366004611c6d565b61086c565b005b34801561030957600080fd5b50610312610885565b6040516102839190611cb0565b34801561032b57600080fd5b506102fb61033a366004611cbe565b61089c565b34801561034b57600080fd5b50610312600d5481565b34801561036157600080fd5b50610312610370366004611c6d565b6108c7565b34801561038157600080fd5b506103126108ae81565b34801561039757600080fd5b506102fb610979565b3480156103ac57600080fd5b506103c26daaeb6d7670e522a718067333cd4e81565b6040516102839190611d2d565b3480156103db57600080fd5b506102fb6103ea366004611cbe565b6109c4565b3480156103fb57600080fd5b50610312600a5481565b34801561041157600080fd5b50610312610420366004611c10565b6109e9565b34801561043157600080fd5b50610312600c5481565b34801561044757600080fd5b5061031260095481565b34801561045d57600080fd5b506102ce61046c366004611c10565b610a11565b34801561047d57600080fd5b506102fb61048c366004611d8d565b610a5b565b34801561049d57600080fd5b506102fb6104ac366004611e51565b610b8a565b3480156104bd57600080fd5b506103126104cc366004611ebe565b610bb2565b3480156104dd57600080fd5b506102fb610c3d565b3480156104f257600080fd5b506102fb610501366004611c10565b610c51565b34801561051257600080fd5b506102fb610521366004611c10565b610c5e565b34801561053257600080fd5b50610312600b5481565b34801561054857600080fd5b506005546001600160a01b03166102ce565b34801561056657600080fd5b506102a1610c6b565b34801561057b57600080fd5b506102fb61058a366004611c10565b610c7a565b34801561059b57600080fd5b506102fb6105aa366004611c10565b610c87565b3480156105bb57600080fd5b506102fb610c94565b6102fb6105d2366004611c10565b610cb9565b3480156105e357600080fd5b506102fb6105f2366004611ef2565b610ddb565b34801561060357600080fd5b506102fb610612366004612018565b610def565b34801561062357600080fd5b506102a1610632366004611c10565b610e15565b34801561064357600080fd5b506102fb610ea4565b34801561065857600080fd5b50600e5461027690610100900460ff1681565b34801561067757600080fd5b50600e546102769060ff1681565b34801561069157600080fd5b506102fb610ee0565b3480156106a657600080fd5b506102fb6106b5366004611c10565b610efc565b3480156106c657600080fd5b506102766106d5366004612097565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6102fb6107113660046120ca565b610f09565b34801561072257600080fd5b506102fb610731366004611ebe565b6110ae565b34801561074257600080fd5b50610312610751366004611ebe565b600f6020526000908152604090205481565b60006001600160e01b0319821663780e9d6360e01b14806107885750610788826110e5565b92915050565b60606000805461079d9061213c565b80601f01602080910402602001604051908101604052809291908181526020018280546107c99061213c565b80156108165780601f106107eb57610100808354040283529160200191610816565b820191906000526020600020905b8154815290600101906020018083116107f957829003601f168201915b5050505050905090565b600061082b82611135565b6108505760405162461bcd60e51b8152600401610847906121b4565b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b816108768161117f565b6108808383611227565b505050565b600254600090610897906001906121da565b905090565b826001600160a01b03811633146108b6576108b63361117f565b6108c18484846112a7565b50505050565b60006108d283610bb2565b82106108f05760405162461bcd60e51b815260040161084790612239565b6000805b600254811015610960576002818154811061091157610911612249565b6000918252602090912001546001600160a01b039081169086160361094e578382036109405791506107889050565b8161094a8161225f565b9250505b806109588161225f565b9150506108f4565b5060405162461bcd60e51b815260040161084790612239565b6109816112d8565b604051731762c438fe2377a459164922b25f5f0492001dbe904780156108fc02916000818181858888f193505050501580156109c1573d6000803e3d6000fd5b50565b826001600160a01b03811633146109de576109de3361117f565b6108c1848484611302565b6002546000908210610a0d5760405162461bcd60e51b8152600401610847906122c2565b5090565b60008060028381548110610a2757610a27612249565b6000918252602090912001546001600160a01b03169050806107885760405162461bcd60e51b815260040161084790612318565b610a636112d8565b828114610a825760405162461bcd60e51b81526004016108479061236f565b6000805b84811015610ac457858582818110610aa057610aa0612249565b9050602002013582610ab2919061237f565b9150610abd8161225f565b9050610a86565b506002546108ae610ad5838361237f565b1115610af35760405162461bcd60e51b8152600401610847906123c3565b6000915060005b83811015610b815760005b878783818110610b1757610b17612249565b90506020020135811015610b7057610b60868684818110610b3a57610b3a612249565b9050602002016020810190610b4f9190611ebe565b84610b598161225f565b955061131d565b610b698161225f565b9050610b05565b50610b7a8161225f565b9050610afa565b50505050505050565b610b926112d8565b610b9e60078585611aa5565b50610bab60088383611aa5565b5050505050565b60006001600160a01b038216610bda5760405162461bcd60e51b81526004016108479061241a565b6000805b600254811015610c365760028181548110610bfb57610bfb612249565b6000918252602090912001546001600160a01b0390811690851603610c2657610c238261225f565b91505b610c2f8161225f565b9050610bde565b5092915050565b610c456112d8565b610c4f600061133b565b565b610c596112d8565b600d55565b610c666112d8565b600b55565b60606001805461079d9061213c565b610c826112d8565b600955565b610c8f6112d8565b600c55565b610c9c6112d8565b600e805461ff001981166101009182900460ff1615909102179055565b610cc161138d565b600e5460ff16610ce35760405162461bcd60e51b815260040161084790612453565b600a54336000908152600f6020526040902054610d0190839061237f565b1115610d1f5760405162461bcd60e51b815260040161084790612490565b336000908152600f602052604081208054839290610d3e90849061237f565b90915550506002546108ae610d53838361237f565b1115610d715760405162461bcd60e51b8152600401610847906123c3565b3482600b54610d8091906124a0565b14610d9d5760405162461bcd60e51b8152600401610847906124ec565b60005b82811015610dcf57610dbd3383610db68161225f565b945061131d565b80610dc78161225f565b915050610da0565b50506109c16001600655565b81610de58161117f565b61088083836113b6565b836001600160a01b0381163314610e0957610e093361117f565b610bab8585858561144d565b6060610e2082611135565b610e3c5760405162461bcd60e51b815260040161084790612548565b600060078054610e4b9061213c565b905011610e7057604051806060016040528060358152602001612b9a60359139610788565b6007610e7b8361147f565b6008604051602001610e8f939291906125e8565b60405160208183030381529060405292915050565b610eac6112d8565b600e805461010060ff19821660ff80841615918217839004161590910261ff001990911661ffff1990921691909117179055565b610ee86112d8565b600e805460ff19811660ff90911615179055565b610f046112d8565b600a55565b610f1161138d565b600e54610100900460ff16610f385760405162461bcd60e51b815260040161084790612649565b600033604051602001610f4b9190612681565b604051602081830303815290604052805190602001209050610fa08184848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061151392505050565b610fbc5760405162461bcd60e51b8152600401610847906126ba565b600954336000908152600f6020526040902054610fda90869061237f565b1115610ff85760405162461bcd60e51b815260040161084790612490565b336000908152600f60205260408120805486929061101790849061237f565b90915550506002546108ae61102c868361237f565b111561104a5760405162461bcd60e51b8152600401610847906123c3565b3485600c5461105991906124a0565b146110765760405162461bcd60e51b8152600401610847906124ec565b60005b858110156110a15761108f3383610db68161225f565b806110998161225f565b915050611079565b5050506108806001600655565b6110b66112d8565b6001600160a01b0381166110dc5760405162461bcd60e51b81526004016108479061270d565b6109c18161133b565b60006001600160e01b031982166380ac58cd60e01b148061111657506001600160e01b03198216635b5e139f60e01b145b8061078857506301ffc9a760e01b6001600160e01b0319831614610788565b60025460009082108015610788575060006001600160a01b03166002838154811061116257611162612249565b6000918252602090912001546001600160a01b0316141592915050565b6daaeb6d7670e522a718067333cd4e3b156109c157604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906111c7903090859060040161271d565b602060405180830381865afa1580156111e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112089190612743565b6109c15780604051633b79c77360e21b81526004016108479190611c4b565b600061123282610a11565b9050806001600160a01b0316836001600160a01b0316036112655760405162461bcd60e51b8152600401610847906127a2565b336001600160a01b0382161480611281575061128181336106d5565b61129d5760405162461bcd60e51b81526004016108479061280c565b6108808383611529565b6112b13382611597565b6112cd5760405162461bcd60e51b81526004016108479061286a565b61088083838361163c565b6005546001600160a01b03163314610c4f5760405162461bcd60e51b8152600401610847906128ac565b61088083838360405180602001604052806000815250610def565b611337828260405180602001604052806000815250611714565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6002600654036113af5760405162461bcd60e51b8152600401610847906128f0565b6002600655565b336001600160a01b038316036113de5760405162461bcd60e51b815260040161084790612934565b3360008181526004602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190611441908590611b82565b60405180910390a35050565b6114573383611597565b6114735760405162461bcd60e51b81526004016108479061286a565b6108c184848484611747565b6060600061148c8361177a565b600101905060008167ffffffffffffffff8111156114ac576114ac611f25565b6040519080825280601f01601f1916602001820160405280156114d6576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846114e0575b509392505050565b600061152282600d5485611852565b9392505050565b600081815260036020526040902080546001600160a01b0319166001600160a01b038416908117909155819061155e82610a11565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006115a282611135565b6115be5760405162461bcd60e51b81526004016108479061298d565b60006115c983610a11565b9050806001600160a01b0316846001600160a01b031614806116045750836001600160a01b03166115f984610820565b6001600160a01b0316145b8061163457506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661164f82610a11565b6001600160a01b0316146116755760405162461bcd60e51b8152600401610847906129e3565b6001600160a01b03821661169b5760405162461bcd60e51b815260040161084790612a34565b6116a6600082611529565b81600282815481106116ba576116ba612249565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b61171e8383611868565b61172b6000848484611930565b6108805760405162461bcd60e51b815260040161084790612a93565b61175284848461163c565b61175e84848484611930565b6108c15760405162461bcd60e51b815260040161084790612a93565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106117b95772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106117e5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061180357662386f26fc10000830492506010015b6305f5e100831061181b576305f5e100830492506008015b612710831061182f57612710830492506004015b60648310611841576064830492506002015b600a83106107885760010192915050565b60008261185f8584611a31565b14949350505050565b6001600160a01b03821661188e5760405162461bcd60e51b815260040161084790612ad5565b61189781611135565b156118b45760405162461bcd60e51b815260040161084790612b19565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15611a2657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611974903390899088908890600401612b29565b6020604051808303816000875af19250505080156119af575060408051601f3d908101601f191682019092526119ac91810190612b78565b60015b611a0c573d8080156119dd576040519150601f19603f3d011682016040523d82523d6000602084013e6119e2565b606091505b508051600003611a045760405162461bcd60e51b815260040161084790612a93565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611634565b506001949350505050565b600081815b845181101561150b57611a6282868381518110611a5557611a55612249565b6020026020010151611a76565b915080611a6e8161225f565b915050611a36565b6000818310611a92576000828152602084905260409020611522565b6000838152602083905260409020611522565b828054611ab19061213c565b90600052602060002090601f016020900481019282611ad35760008555611b19565b82601f10611aec5782800160ff19823516178555611b19565b82800160010185558215611b19579182015b82811115611b19578235825591602001919060010190611afe565b50610a0d9291505b80821115610a0d5760008155600101611b21565b6001600160e01b031981165b81146109c157600080fd5b803561078881611b35565b600060208284031215611b6c57611b6c600080fd5b60006116348484611b4c565b8015155b82525050565b602081016107888284611b78565b60005b83811015611bab578181015183820152602001611b93565b838111156108c15750506000910152565b6000611bc6825190565b808452602084019350611bdd818560208601611b90565b601f01601f19169290920192915050565b602080825281016115228184611bbc565b80611b41565b803561078881611bff565b600060208284031215611c2557611c25600080fd5b60006116348484611c05565b60006001600160a01b038216610788565b611b7c81611c31565b602081016107888284611c42565b611b4181611c31565b803561078881611c59565b60008060408385031215611c8357611c83600080fd5b6000611c8f8585611c62565b9250506020611ca085828601611c05565b9150509250929050565b80611b7c565b602081016107888284611caa565b600080600060608486031215611cd657611cd6600080fd5b6000611ce28686611c62565b9350506020611cf386828701611c62565b9250506040611d0486828701611c05565b9150509250925092565b600061078882611c31565b600061078882611d0e565b611b7c81611d19565b602081016107888284611d24565b60008083601f840112611d5057611d50600080fd5b50813567ffffffffffffffff811115611d6b57611d6b600080fd5b602083019150836020820283011115611d8657611d86600080fd5b9250929050565b60008060008060408587031215611da657611da6600080fd5b843567ffffffffffffffff811115611dc057611dc0600080fd5b611dcc87828801611d3b565b9450945050602085013567ffffffffffffffff811115611dee57611dee600080fd5b611dfa87828801611d3b565b95989497509550505050565b60008083601f840112611e1b57611e1b600080fd5b50813567ffffffffffffffff811115611e3657611e36600080fd5b602083019150836001820283011115611d8657611d86600080fd5b60008060008060408587031215611e6a57611e6a600080fd5b843567ffffffffffffffff811115611e8457611e84600080fd5b611e9087828801611e06565b9450945050602085013567ffffffffffffffff811115611eb257611eb2600080fd5b611dfa87828801611e06565b600060208284031215611ed357611ed3600080fd5b60006116348484611c62565b801515611b41565b803561078881611edf565b60008060408385031215611f0857611f08600080fd5b6000611f148585611c62565b9250506020611ca085828601611ee7565b634e487b7160e01b600052604160045260246000fd5b601f19601f830116810181811067ffffffffffffffff82111715611f6157611f61611f25565b6040525050565b6000611f7360405190565b9050611f7f8282611f3b565b919050565b600067ffffffffffffffff821115611f9e57611f9e611f25565b601f19601f83011660200192915050565b82818337506000910152565b6000611fce611fc984611f84565b611f68565b905082815260208101848484011115611fe957611fe9600080fd5b61150b848285611faf565b600082601f83011261200857612008600080fd5b8135611634848260208601611fbb565b6000806000806080858703121561203157612031600080fd5b600061203d8787611c62565b945050602061204e87828801611c62565b935050604061205f87828801611c05565b925050606085013567ffffffffffffffff81111561207f5761207f600080fd5b61208b87828801611ff4565b91505092959194509250565b600080604083850312156120ad576120ad600080fd5b60006120b98585611c62565b9250506020611ca085828601611c62565b6000806000604084860312156120e2576120e2600080fd5b60006120ee8686611c05565b935050602084013567ffffffffffffffff81111561210e5761210e600080fd5b61211a86828701611d3b565b92509250509250925092565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061215057607f821691505b60208210810361216257612162612126565b50919050565b602c81526000602082017f4552433732313a20617070726f76656420717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291505b5060400190565b6020808252810161078881612168565b634e487b7160e01b600052601160045260246000fd5b6000828210156121ec576121ec6121c4565b500390565b602b81526000602082017f455243373231456e756d657261626c653a206f776e657220696e646578206f7581526a74206f6620626f756e647360a81b602082015291506121ad565b60208082528101610788816121f1565b634e487b7160e01b600052603260045260246000fd5b60006000198203612272576122726121c4565b5060010190565b602c81526000602082017f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f81526b7574206f6620626f756e647360a01b602082015291506121ad565b6020808252810161078881612279565b602981526000602082017f4552433732313a206f776e657220717565727920666f72206e6f6e657869737481526832b73a103a37b5b2b760b91b602082015291506121ad565b60208082528101610788816122d2565b602a81526000602082017f5175616e74697479206c656e677468206973206e6f7420657175616c20746f20815269726563697069656e747360b01b602082015291506121ad565b6020808252810161078881612328565b60008219821115612392576123926121c4565b500190565b601281526000602082017113585e081cdd5c1c1b1e481c995858da195960721b815291505b5060200190565b6020808252810161078881612397565b602a81526000602082017f4552433732313a2062616c616e636520717565727920666f7220746865207a65815269726f206164647265737360b01b602082015291506121ad565b60208082528101610788816123d3565b6012815260006020820171141d589b1a58c81b5a5b9d0818db1bdcd95960721b815291506123bc565b602080825281016107888161242a565b60168152600060208201754578636565647320796f757220616c6c6f77616e636560501b815291506123bc565b6020808252810161078881612463565b60008160001904831182151516156124ba576124ba6121c4565b500290565b6016815260006020820175125b9d985b1a5908199d5b991cc81c1c9bdd9a59195960521b815291506123bc565b60208082528101610788816124bf565b602f81526000602082017f4552433732314d657461646174613a2055524920717565727920666f72206e6f81526e3732bc34b9ba32b73a103a37b5b2b760891b602082015291506121ad565b60208082528101610788816124fc565b600081546125658161213c565b60018216801561257c576001811461258d576125bd565b60ff198316865281860193506125bd565b60008581526020902060005b838110156125b557815488820152600190910190602001612599565b838801955050505b50505092915050565b60006125d0825190565b6125de818560208601611b90565b9290920192915050565b60006125f48286612558565b915061260082856125c6565b915061260c8284612558565b95945050505050565b601781526000602082017f5761697420666f7220616c6c6f776c697374206d696e74000000000000000000815291506123bc565b6020808252810161078881612615565b60006107888260601b90565b600061078882612659565b611b7c61267c82611c31565b612665565b600061268d8284612670565b50601401919050565b600d81526000602082016c24b73b30b634b210383937b7b360991b815291506123bc565b6020808252810161078881612696565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291506121ad565b60208082528101610788816126ca565b6040810161272b8285611c42565b6115226020830184611c42565b805161078881611edf565b60006020828403121561275857612758600080fd5b60006116348484612738565b602181526000602082017f4552433732313a20617070726f76616c20746f2063757272656e74206f776e658152603960f91b602082015291506121ad565b6020808252810161078881612764565b603881526000602082017f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7781527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015291506121ad565b60208082528101610788816127b2565b603181526000602082017f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f8152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b602082015291506121ad565b602080825281016107888161281c565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572910190815260006123bc565b602080825281016107888161287a565b601f81526000602082017f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00815291506123bc565b60208082528101610788816128bc565b601981526000602082017f4552433732313a20617070726f766520746f2063616c6c657200000000000000815291506123bc565b6020808252810161078881612900565b602c81526000602082017f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657881526b34b9ba32b73a103a37b5b2b760a11b602082015291506121ad565b6020808252810161078881612944565b602981526000602082017f4552433732313a207472616e73666572206f6620746f6b656e2074686174206981526839903737ba1037bbb760b91b602082015291506121ad565b602080825281016107888161299d565b602481526000602082017f4552433732313a207472616e7366657220746f20746865207a65726f206164648152637265737360e01b602082015291506121ad565b60208082528101610788816129f3565b603281526000602082017f4552433732313a207472616e7366657220746f206e6f6e20455243373231526581527131b2b4bb32b91034b6b83632b6b2b73a32b960711b602082015291506121ad565b6020808252810161078881612a44565b60208082527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373910190815260006123bc565b6020808252810161078881612aa3565b601c81526000602082017f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000815291506123bc565b6020808252810161078881612ae5565b60808101612b378287611c42565b612b446020830186611c42565b612b516040830185611caa565b8181036060830152612b638184611bbc565b9695505050505050565b805161078881611b35565b600060208284031215612b8d57612b8d600080fd5b60006116348484612b6d56fe697066733a2f2f516d576d52445a65676362764d4d336b653248764d4674636b76763143394a6d4e7a6a3151654a52327263503450a2646970667358221220735d0b95b86f44db60eec84b1c879ffee5f47d800d4bd491e818fe2342ff0b7f64736f6c634300080d0033
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.