ERC-721
Overview
Max Total Supply
94 HDS1
Holders
75
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 HDS1Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Hoodies1
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.18; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Hoodies1 is ERC721A, ERC721AQueryable, Ownable, ReentrancyGuard { event Mint( address indexed to, uint256 indexed tier, uint256 indexed start_id, uint256 amount ); AggregatorV3Interface internal priceFeed = AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419); uint256 constant WEI_PER_ETH = 1e18; bytes32 whitelist; string base_uri; address payout_address; mapping(bytes32 => uint256) minted; address public cross_mint_address; constructor() ERC721A("Hoodies #1", "HDS1") { payout_address = msg.sender; } function mint( address receiver, bytes32[] calldata proof, uint256 tier, uint256 amount, uint256 max_amount ) public payable nonReentrant { require( msg.sender == cross_mint_address || msg.sender == receiver, "Invalid sender" ); require(tier >= 1 && tier <= 2, "Invalid tier"); require(amount >= 1 && amount < 1000, "Invalid amount"); _ensure_mint_limits(receiver, proof, tier, amount, max_amount); require(msg.value >= get_price(tier, amount), "Not enough ETH"); uint256 start_id = totalSupply(); emit Mint(receiver, tier, start_id, amount); _mint(receiver, amount); } function _ensure_mint_limits( address receiver, bytes32[] calldata proof, uint256 tier, uint256 amount, uint256 max_amount ) internal { bytes32 minted_index = keccak256(abi.encode(receiver, tier)); require( _is_on_whitelist(receiver, proof, tier, max_amount), "Not on whitelist" ); uint256 minted_by_wallet_from_tier = minted[minted_index]; require( minted_by_wallet_from_tier + amount <= max_amount, "Would surpass your mint limit" ); minted[minted_index] += amount; } function get_price( uint256 tier, uint256 amount ) public view returns (uint256) { uint256 price_in_usd = tier == 1 ? 30 : 60; return _wei_per_usd() * price_in_usd * amount; } function _wei_per_usd() internal view returns (uint256) { return (WEI_PER_ETH * 1e8) / _usd_per_eth_times_1e8(); } function _usd_per_eth_times_1e8() internal view returns (uint256) { (, int256 price, , , ) = priceFeed.latestRoundData(); return uint256(price); } function _baseURI() internal view override returns (string memory) { return base_uri; } function tokenURI( uint256 tokenId ) public view virtual override(ERC721A, IERC721A) returns (string memory) { string memory uri = super.tokenURI(tokenId); return string(abi.encodePacked(uri, ".json")); } function set_base_uri(string memory new_base_uri) public onlyOwner { base_uri = new_base_uri; } function set_whitelist(bytes32 new_whitelist) public onlyOwner { whitelist = new_whitelist; } function set_payout_address(address new_payout_address) public { require( msg.sender == payout_address, "Only payout address can set payout address" ); payout_address = new_payout_address; } function withdraw() public { require( msg.sender == owner() || msg.sender == payout_address, "Only owner or payout address can withdraw" ); uint256 balance = address(this).balance; payable(payout_address).transfer(balance); } function set_cross_mint_address( address new_cross_mint_address ) public onlyOwner { cross_mint_address = new_cross_mint_address; } function _is_on_whitelist( address receiver, bytes32[] calldata proof, uint256 tier, uint256 max_amount ) internal view returns (bool) { if (whitelist == 0) { return true; } bytes32 leaf = keccak256( bytes.concat(keccak256(abi.encode(receiver, tier, max_amount))) ); return MerkleProof.verify(proof, whitelist, leaf); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// 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 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 // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"start_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cross_mint_address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"get_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"max_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"new_base_uri","type":"string"}],"name":"set_base_uri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"new_cross_mint_address","type":"address"}],"name":"set_cross_mint_address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"new_payout_address","type":"address"}],"name":"set_payout_address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"new_whitelist","type":"bytes32"}],"name":"set_whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052735f4ec3df9cbd43714fe2740f5e3616155c5b8419600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503480156200006657600080fd5b506040518060400160405280600a81526020017f486f6f64696573202331000000000000000000000000000000000000000000008152506040518060400160405280600481526020017f48445331000000000000000000000000000000000000000000000000000000008152508160029081620000e49190620004cb565b508060039081620000f69190620004cb565b50620001076200017e60201b60201c565b60008190555050506200012f620001236200018360201b60201c565b6200018b60201b60201c565b600160098190555033600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620005b2565b600090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002d357607f821691505b602082108103620002e957620002e86200028b565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620003537fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000314565b6200035f868362000314565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003ac620003a6620003a08462000377565b62000381565b62000377565b9050919050565b6000819050919050565b620003c8836200038b565b620003e0620003d782620003b3565b84845462000321565b825550505050565b600090565b620003f7620003e8565b62000404818484620003bd565b505050565b5b818110156200042c5762000420600082620003ed565b6001810190506200040a565b5050565b601f8211156200047b576200044581620002ef565b620004508462000304565b8101602085101562000460578190505b620004786200046f8562000304565b83018262000409565b50505b505050565b600082821c905092915050565b6000620004a06000198460080262000480565b1980831691505092915050565b6000620004bb83836200048d565b9150826002028217905092915050565b620004d68262000251565b67ffffffffffffffff811115620004f257620004f16200025c565b5b620004fe8254620002ba565b6200050b82828562000430565b600060209050601f8311600181146200054357600084156200052e578287015190505b6200053a8582620004ad565b865550620005aa565b601f1984166200055386620002ef565b60005b828110156200057d5784890151825560018201915060208501945060208101905062000556565b868310156200059d578489015162000599601f8916826200048d565b8355505b6001600288020188555050505b505050505050565b61414880620005c26000396000f3fe6080604052600436106101c25760003560e01c8063715018a6116100f7578063a579929211610095578063c23dc68f11610064578063c23dc68f1461060d578063c87b56dd1461064a578063e985e9c514610687578063f2fde38b146106c4576101c2565b8063a579929214610583578063a9526846146105ac578063af1c5211146105c8578063b88d4fde146105f1576101c2565b806395d89b41116100d157806395d89b41146104b557806399a2557a146104e05780639ea982cb1461051d578063a22cb4651461055a576101c2565b8063715018a6146104365780638462151c1461044d5780638da5cb5b1461048a576101c2565b80633ccfd60b1161016457806348c04a231161013e57806348c04a23146103545780635bbb21771461037f5780636352211e146103bc57806370a08231146103f9576101c2565b80633ccfd60b146102f857806342842e0e1461030f578063453383531461032b576101c2565b8063095ea7b3116101a0578063095ea7b31461026c5780630c1e154f1461028857806318160ddd146102b157806323b872dd146102dc576101c2565b806301ffc9a7146101c757806306fdde0314610204578063081812fc1461022f575b600080fd5b3480156101d357600080fd5b506101ee60048036038101906101e991906128ad565b6106ed565b6040516101fb91906128f5565b60405180910390f35b34801561021057600080fd5b5061021961077f565b60405161022691906129a0565b60405180910390f35b34801561023b57600080fd5b50610256600480360381019061025191906129f8565b610811565b6040516102639190612a66565b60405180910390f35b61028660048036038101906102819190612aad565b610890565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612aed565b6109d4565b005b3480156102bd57600080fd5b506102c6610aa8565b6040516102d39190612b29565b60405180910390f35b6102f660048036038101906102f19190612b44565b610abf565b005b34801561030457600080fd5b5061030d610de1565b005b61032960048036038101906103249190612b44565b610f1f565b005b34801561033757600080fd5b50610352600480360381019061034d9190612aed565b610f3f565b005b34801561036057600080fd5b50610369610f8b565b6040516103769190612a66565b60405180910390f35b34801561038b57600080fd5b506103a660048036038101906103a19190612bfc565b610fb1565b6040516103b39190612dac565b60405180910390f35b3480156103c857600080fd5b506103e360048036038101906103de91906129f8565b611074565b6040516103f09190612a66565b60405180910390f35b34801561040557600080fd5b50610420600480360381019061041b9190612aed565b611086565b60405161042d9190612b29565b60405180910390f35b34801561044257600080fd5b5061044b61113e565b005b34801561045957600080fd5b50610474600480360381019061046f9190612aed565b611152565b6040516104819190612e8c565b60405180910390f35b34801561049657600080fd5b5061049f611295565b6040516104ac9190612a66565b60405180910390f35b3480156104c157600080fd5b506104ca6112bf565b6040516104d791906129a0565b60405180910390f35b3480156104ec57600080fd5b5061050760048036038101906105029190612eae565b611351565b6040516105149190612e8c565b60405180910390f35b34801561052957600080fd5b50610544600480360381019061053f9190612f01565b61155d565b6040516105519190612b29565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612f6d565b61159e565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612fe3565b6116a9565b005b6105c660048036038101906105c19190613066565b6116bb565b005b3480156105d457600080fd5b506105ef60048036038101906105ea9190613230565b6118fc565b005b61060b6004803603810190610606919061331a565b611917565b005b34801561061957600080fd5b50610634600480360381019061062f91906129f8565b61198a565b60405161064191906133f2565b60405180910390f35b34801561065657600080fd5b50610671600480360381019061066c91906129f8565b6119f4565b60405161067e91906129a0565b60405180910390f35b34801561069357600080fd5b506106ae60048036038101906106a9919061340d565b611a2b565b6040516106bb91906128f5565b60405180910390f35b3480156106d057600080fd5b506106eb60048036038101906106e69190612aed565b611abf565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061074857506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107785750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461078e9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546107ba9061347c565b80156108075780601f106107dc57610100808354040283529160200191610807565b820191906000526020600020905b8154815290600101906020018083116107ea57829003601f168201915b5050505050905090565b600061081c82611b42565b610852576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061089b82611074565b90508073ffffffffffffffffffffffffffffffffffffffff166108bc611ba1565b73ffffffffffffffffffffffffffffffffffffffff161461091f576108e8816108e3611ba1565b611a2b565b61091e576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5b9061351f565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610ab2611ba9565b6001546000540303905090565b6000610aca82611bae565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b31576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610b3d84611c7a565b91509150610b538187610b4e611ba1565b611ca1565b610b9f57610b6886610b63611ba1565b611a2b565b610b9e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610c05576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c128686866001611ce5565b8015610c1d57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610ceb85610cc7888887611ceb565b7c020000000000000000000000000000000000000000000000000000000017611d13565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603610d715760006001850190506000600460008381526020019081526020016000205403610d6f576000548114610d6e578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610dd98686866001611d3e565b505050505050565b610de9611295565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e6f5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610eae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea5906135b1565b60405180910390fd5b6000479050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610f1b573d6000803e3d6000fd5b5050565b610f3a83838360405180602001604052806000815250611917565b505050565b610f47611d44565b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083839050905060008167ffffffffffffffff811115610fd757610fd6613105565b5b60405190808252806020026020018201604052801561101057816020015b610ffd6127f2565b815260200190600190039081610ff55790505b50905060005b8281146110685761103f868683818110611033576110326135d1565b5b9050602002013561198a565b828281518110611052576110516135d1565b5b6020026020010181905250806001019050611016565b50809250505092915050565b600061107f82611bae565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110ed576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611146611d44565b6111506000611dc2565b565b6060600080600061116285611086565b905060008167ffffffffffffffff8111156111805761117f613105565b5b6040519080825280602002602001820160405280156111ae5781602001602082028036833780820191505090505b5090506111b96127f2565b60006111c3611ba9565b90505b838614611287576111d681611e88565b9150816040015161127c57600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461122157816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361127b578083878060010198508151811061126e5761126d6135d1565b5b6020026020010181815250505b5b8060010190506111c6565b508195505050505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546112ce9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546112fa9061347c565b80156113475780601f1061131c57610100808354040283529160200191611347565b820191906000526020600020905b81548152906001019060200180831161132a57829003601f168201915b5050505050905090565b606081831061138c576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611397611eb3565b90506113a1611ba9565b8510156113b3576113b0611ba9565b94505b808411156113bf578093505b60006113ca87611086565b9050848610156113ed5760008686039050818110156113e7578091505b506113f2565b600090505b60008167ffffffffffffffff81111561140e5761140d613105565b5b60405190808252806020026020018201604052801561143c5781602001602082028036833780820191505090505b509050600082036114535780945050505050611556565b600061145e8861198a565b90506000816040015161147357816000015190505b60008990505b8881141580156114895750848714155b156115485761149781611e88565b9250826040015161153d57600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff16146114e257826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361153c578084888060010199508151811061152f5761152e6135d1565b5b6020026020010181815250505b5b806001019050611479565b508583528296505050505050505b9392505050565b6000806001841461156f57603c611572565b601e5b60ff1690508281611581611ebc565b61158b919061362f565b611595919061362f565b91505092915050565b80600760006115ab611ba1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611658611ba1565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161169d91906128f5565b60405180910390a35050565b6116b1611d44565b80600b8190555050565b6116c3611eed565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061174a57508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611789576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611780906136bd565b60405180910390fd5b6001831015801561179b575060028311155b6117da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d190613729565b60405180910390fd5b600182101580156117ec57506103e882105b61182b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182290613795565b60405180910390fd5b611839868686868686611f3c565b611843838361155d565b341015611885576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187c90613801565b60405180910390fd5b600061188f610aa8565b905080848873ffffffffffffffffffffffffffffffffffffffff167fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb866040516118d99190612b29565b60405180910390a46118eb878461204f565b506118f461220a565b505050505050565b611904611d44565b80600c908161191391906139cd565b5050565b611922848484610abf565b60008373ffffffffffffffffffffffffffffffffffffffff163b146119845761194d84848484612214565b611983576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6119926127f2565b61199a6127f2565b6119a2611ba9565b8310806119b657506119b2611eb3565b8310155b156119c457809150506119ef565b6119cd83611e88565b90508060400151156119e257809150506119ef565b6119eb83612364565b9150505b919050565b60606000611a0183612384565b905080604051602001611a149190613b27565b604051602081830303815290604052915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611ac7611d44565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611b36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2d90613bbb565b60405180910390fd5b611b3f81611dc2565b50565b600081611b4d611ba9565b11158015611b5c575060005482105b8015611b9a575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b600090565b60008082905080611bbd611ba9565b11611c4357600054811015611c425760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603611c40575b60008103611c36576004600083600190039350838152602001908152602001600020549050611c0c565b8092505050611c75565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8611d02868684612422565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b611d4c61242b565b73ffffffffffffffffffffffffffffffffffffffff16611d6a611295565b73ffffffffffffffffffffffffffffffffffffffff1614611dc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db790613c27565b60405180910390fd5b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611e906127f2565b611eac6004600084815260200190815260200160002054612433565b9050919050565b60008054905090565b6000611ec66124e9565b6305f5e100670de0b6b3a7640000611ede919061362f565b611ee89190613c76565b905090565b600260095403611f32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2990613cf3565b60405180910390fd5b6002600981905550565b60008684604051602001611f51929190613d13565b604051602081830303815290604052805190602001209050611f76878787878661258a565b611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fac90613d88565b60405180910390fd5b6000600e6000838152602001908152602001600020549050828482611fda9190613da8565b111561201b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201290613e28565b60405180910390fd5b83600e6000848152602001908152602001600020600082825461203e9190613da8565b925050819055505050505050505050565b6000805490506000820361208f576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61209c6000848385611ce5565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612113836121046000866000611ceb565b61210d85612651565b17611d13565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b8181146121b457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612179565b50600082036121ef576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506122056000848385611d3e565b505050565b6001600981905550565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261223a611ba1565b8786866040518563ffffffff1660e01b815260040161225c9493929190613e9d565b6020604051808303816000875af192505050801561229857506040513d601f19601f820116820180604052508101906122959190613efe565b60015b612311573d80600081146122c8576040519150601f19603f3d011682016040523d82523d6000602084013e6122cd565b606091505b506000815103612309576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b61236c6127f2565b61237d61237883611bae565b612433565b9050919050565b606061238f82611b42565b6123c5576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006123cf612661565b905060008151036123ef576040518060200160405280600081525061241a565b806123f9846126f3565b60405160200161240a929190613f2b565b6040516020818303038152906040525b915050919050565b60009392505050565b600033905090565b61243b6127f2565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257d9190613fdc565b5050509150508091505090565b60008060001b600b54036125a15760019050612648565b60008684846040516020016125b893929190614057565b604051602081830303815290604052805190602001206040516020016125de91906140af565b604051602081830303815290604052805190602001209050612644868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600b5483612743565b9150505b95945050505050565b60006001821460e11b9050919050565b6060600c80546126709061347c565b80601f016020809104026020016040519081016040528092919081815260200182805461269c9061347c565b80156126e95780601f106126be576101008083540402835291602001916126e9565b820191906000526020600020905b8154815290600101906020018083116126cc57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b60011561272e57600184039350600a81066030018453600a810490508061270c575b50828103602084039350808452505050919050565b600082612750858461275a565b1490509392505050565b60008082905060005b84518110156127a55761279082868381518110612783576127826135d1565b5b60200260200101516127b0565b9150808061279d906140ca565b915050612763565b508091505092915050565b60008183106127c8576127c382846127db565b6127d3565b6127d283836127db565b5b905092915050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61288a81612855565b811461289557600080fd5b50565b6000813590506128a781612881565b92915050565b6000602082840312156128c3576128c261284b565b5b60006128d184828501612898565b91505092915050565b60008115159050919050565b6128ef816128da565b82525050565b600060208201905061290a60008301846128e6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561294a57808201518184015260208101905061292f565b60008484015250505050565b6000601f19601f8301169050919050565b600061297282612910565b61297c818561291b565b935061298c81856020860161292c565b61299581612956565b840191505092915050565b600060208201905081810360008301526129ba8184612967565b905092915050565b6000819050919050565b6129d5816129c2565b81146129e057600080fd5b50565b6000813590506129f2816129cc565b92915050565b600060208284031215612a0e57612a0d61284b565b5b6000612a1c848285016129e3565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a5082612a25565b9050919050565b612a6081612a45565b82525050565b6000602082019050612a7b6000830184612a57565b92915050565b612a8a81612a45565b8114612a9557600080fd5b50565b600081359050612aa781612a81565b92915050565b60008060408385031215612ac457612ac361284b565b5b6000612ad285828601612a98565b9250506020612ae3858286016129e3565b9150509250929050565b600060208284031215612b0357612b0261284b565b5b6000612b1184828501612a98565b91505092915050565b612b23816129c2565b82525050565b6000602082019050612b3e6000830184612b1a565b92915050565b600080600060608486031215612b5d57612b5c61284b565b5b6000612b6b86828701612a98565b9350506020612b7c86828701612a98565b9250506040612b8d868287016129e3565b9150509250925092565b600080fd5b600080fd5b600080fd5b60008083601f840112612bbc57612bbb612b97565b5b8235905067ffffffffffffffff811115612bd957612bd8612b9c565b5b602083019150836020820283011115612bf557612bf4612ba1565b5b9250929050565b60008060208385031215612c1357612c1261284b565b5b600083013567ffffffffffffffff811115612c3157612c30612850565b5b612c3d85828601612ba6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c7e81612a45565b82525050565b600067ffffffffffffffff82169050919050565b612ca181612c84565b82525050565b612cb0816128da565b82525050565b600062ffffff82169050919050565b612cce81612cb6565b82525050565b608082016000820151612cea6000850182612c75565b506020820151612cfd6020850182612c98565b506040820151612d106040850182612ca7565b506060820151612d236060850182612cc5565b50505050565b6000612d358383612cd4565b60808301905092915050565b6000602082019050919050565b6000612d5982612c49565b612d638185612c54565b9350612d6e83612c65565b8060005b83811015612d9f578151612d868882612d29565b9750612d9183612d41565b925050600181019050612d72565b5085935050505092915050565b60006020820190508181036000830152612dc68184612d4e565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612e03816129c2565b82525050565b6000612e158383612dfa565b60208301905092915050565b6000602082019050919050565b6000612e3982612dce565b612e438185612dd9565b9350612e4e83612dea565b8060005b83811015612e7f578151612e668882612e09565b9750612e7183612e21565b925050600181019050612e52565b5085935050505092915050565b60006020820190508181036000830152612ea68184612e2e565b905092915050565b600080600060608486031215612ec757612ec661284b565b5b6000612ed586828701612a98565b9350506020612ee6868287016129e3565b9250506040612ef7868287016129e3565b9150509250925092565b60008060408385031215612f1857612f1761284b565b5b6000612f26858286016129e3565b9250506020612f37858286016129e3565b9150509250929050565b612f4a816128da565b8114612f5557600080fd5b50565b600081359050612f6781612f41565b92915050565b60008060408385031215612f8457612f8361284b565b5b6000612f9285828601612a98565b9250506020612fa385828601612f58565b9150509250929050565b6000819050919050565b612fc081612fad565b8114612fcb57600080fd5b50565b600081359050612fdd81612fb7565b92915050565b600060208284031215612ff957612ff861284b565b5b600061300784828501612fce565b91505092915050565b60008083601f84011261302657613025612b97565b5b8235905067ffffffffffffffff81111561304357613042612b9c565b5b60208301915083602082028301111561305f5761305e612ba1565b5b9250929050565b60008060008060008060a087890312156130835761308261284b565b5b600061309189828a01612a98565b965050602087013567ffffffffffffffff8111156130b2576130b1612850565b5b6130be89828a01613010565b955095505060406130d189828a016129e3565b93505060606130e289828a016129e3565b92505060806130f389828a016129e3565b9150509295509295509295565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61313d82612956565b810181811067ffffffffffffffff8211171561315c5761315b613105565b5b80604052505050565b600061316f612841565b905061317b8282613134565b919050565b600067ffffffffffffffff82111561319b5761319a613105565b5b6131a482612956565b9050602081019050919050565b82818337600083830152505050565b60006131d36131ce84613180565b613165565b9050828152602081018484840111156131ef576131ee613100565b5b6131fa8482856131b1565b509392505050565b600082601f83011261321757613216612b97565b5b81356132278482602086016131c0565b91505092915050565b6000602082840312156132465761324561284b565b5b600082013567ffffffffffffffff81111561326457613263612850565b5b61327084828501613202565b91505092915050565b600067ffffffffffffffff82111561329457613293613105565b5b61329d82612956565b9050602081019050919050565b60006132bd6132b884613279565b613165565b9050828152602081018484840111156132d9576132d8613100565b5b6132e48482856131b1565b509392505050565b600082601f83011261330157613300612b97565b5b81356133118482602086016132aa565b91505092915050565b600080600080608085870312156133345761333361284b565b5b600061334287828801612a98565b945050602061335387828801612a98565b9350506040613364878288016129e3565b925050606085013567ffffffffffffffff81111561338557613384612850565b5b613391878288016132ec565b91505092959194509250565b6080820160008201516133b36000850182612c75565b5060208201516133c66020850182612c98565b5060408201516133d96040850182612ca7565b5060608201516133ec6060850182612cc5565b50505050565b6000608082019050613407600083018461339d565b92915050565b600080604083850312156134245761342361284b565b5b600061343285828601612a98565b925050602061344385828601612a98565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061349457607f821691505b6020821081036134a7576134a661344d565b5b50919050565b7f4f6e6c79207061796f757420616464726573732063616e20736574207061796f60008201527f7574206164647265737300000000000000000000000000000000000000000000602082015250565b6000613509602a8361291b565b9150613514826134ad565b604082019050919050565b60006020820190508181036000830152613538816134fc565b9050919050565b7f4f6e6c79206f776e6572206f72207061796f757420616464726573732063616e60008201527f2077697468647261770000000000000000000000000000000000000000000000602082015250565b600061359b60298361291b565b91506135a68261353f565b604082019050919050565b600060208201905081810360008301526135ca8161358e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061363a826129c2565b9150613645836129c2565b9250828202613653816129c2565b9150828204841483151761366a57613669613600565b5b5092915050565b7f496e76616c69642073656e646572000000000000000000000000000000000000600082015250565b60006136a7600e8361291b565b91506136b282613671565b602082019050919050565b600060208201905081810360008301526136d68161369a565b9050919050565b7f496e76616c696420746965720000000000000000000000000000000000000000600082015250565b6000613713600c8361291b565b915061371e826136dd565b602082019050919050565b6000602082019050818103600083015261374281613706565b9050919050565b7f496e76616c696420616d6f756e74000000000000000000000000000000000000600082015250565b600061377f600e8361291b565b915061378a82613749565b602082019050919050565b600060208201905081810360008301526137ae81613772565b9050919050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b60006137eb600e8361291b565b91506137f6826137b5565b602082019050919050565b6000602082019050818103600083015261381a816137de565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026138837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613846565b61388d8683613846565b95508019841693508086168417925050509392505050565b6000819050919050565b60006138ca6138c56138c0846129c2565b6138a5565b6129c2565b9050919050565b6000819050919050565b6138e4836138af565b6138f86138f0826138d1565b848454613853565b825550505050565b600090565b61390d613900565b6139188184846138db565b505050565b5b8181101561393c57613931600082613905565b60018101905061391e565b5050565b601f8211156139815761395281613821565b61395b84613836565b8101602085101561396a578190505b61397e61397685613836565b83018261391d565b50505b505050565b600082821c905092915050565b60006139a460001984600802613986565b1980831691505092915050565b60006139bd8383613993565b9150826002028217905092915050565b6139d682612910565b67ffffffffffffffff8111156139ef576139ee613105565b5b6139f9825461347c565b613a04828285613940565b600060209050601f831160018114613a375760008415613a25578287015190505b613a2f85826139b1565b865550613a97565b601f198416613a4586613821565b60005b82811015613a6d57848901518255600182019150602085019450602081019050613a48565b86831015613a8a5784890151613a86601f891682613993565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000613ab582612910565b613abf8185613a9f565b9350613acf81856020860161292c565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000613b11600583613a9f565b9150613b1c82613adb565b600582019050919050565b6000613b338284613aaa565b9150613b3e82613b04565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613ba560268361291b565b9150613bb082613b49565b604082019050919050565b60006020820190508181036000830152613bd481613b98565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c1160208361291b565b9150613c1c82613bdb565b602082019050919050565b60006020820190508181036000830152613c4081613c04565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613c81826129c2565b9150613c8c836129c2565b925082613c9c57613c9b613c47565b5b828204905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613cdd601f8361291b565b9150613ce882613ca7565b602082019050919050565b60006020820190508181036000830152613d0c81613cd0565b9050919050565b6000604082019050613d286000830185612a57565b613d356020830184612b1a565b9392505050565b7f4e6f74206f6e2077686974656c69737400000000000000000000000000000000600082015250565b6000613d7260108361291b565b9150613d7d82613d3c565b602082019050919050565b60006020820190508181036000830152613da181613d65565b9050919050565b6000613db3826129c2565b9150613dbe836129c2565b9250828201905080821115613dd657613dd5613600565b5b92915050565b7f576f756c64207375727061737320796f7572206d696e74206c696d6974000000600082015250565b6000613e12601d8361291b565b9150613e1d82613ddc565b602082019050919050565b60006020820190508181036000830152613e4181613e05565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613e6f82613e48565b613e798185613e53565b9350613e8981856020860161292c565b613e9281612956565b840191505092915050565b6000608082019050613eb26000830187612a57565b613ebf6020830186612a57565b613ecc6040830185612b1a565b8181036060830152613ede8184613e64565b905095945050505050565b600081519050613ef881612881565b92915050565b600060208284031215613f1457613f1361284b565b5b6000613f2284828501613ee9565b91505092915050565b6000613f378285613aaa565b9150613f438284613aaa565b91508190509392505050565b600069ffffffffffffffffffff82169050919050565b613f6e81613f4f565b8114613f7957600080fd5b50565b600081519050613f8b81613f65565b92915050565b6000819050919050565b613fa481613f91565b8114613faf57600080fd5b50565b600081519050613fc181613f9b565b92915050565b600081519050613fd6816129cc565b92915050565b600080600080600060a08688031215613ff857613ff761284b565b5b600061400688828901613f7c565b955050602061401788828901613fb2565b945050604061402888828901613fc7565b935050606061403988828901613fc7565b925050608061404a88828901613f7c565b9150509295509295909350565b600060608201905061406c6000830186612a57565b6140796020830185612b1a565b6140866040830184612b1a565b949350505050565b6000819050919050565b6140a96140a482612fad565b61408e565b82525050565b60006140bb8284614098565b60208201915081905092915050565b60006140d5826129c2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361410757614106613600565b5b60018201905091905056fea264697066735822122022c8695a6760f8e19c808f37ed537a7a80dd022dfb1c24444385765da8d98cc664736f6c63430008120033
Deployed Bytecode
0x6080604052600436106101c25760003560e01c8063715018a6116100f7578063a579929211610095578063c23dc68f11610064578063c23dc68f1461060d578063c87b56dd1461064a578063e985e9c514610687578063f2fde38b146106c4576101c2565b8063a579929214610583578063a9526846146105ac578063af1c5211146105c8578063b88d4fde146105f1576101c2565b806395d89b41116100d157806395d89b41146104b557806399a2557a146104e05780639ea982cb1461051d578063a22cb4651461055a576101c2565b8063715018a6146104365780638462151c1461044d5780638da5cb5b1461048a576101c2565b80633ccfd60b1161016457806348c04a231161013e57806348c04a23146103545780635bbb21771461037f5780636352211e146103bc57806370a08231146103f9576101c2565b80633ccfd60b146102f857806342842e0e1461030f578063453383531461032b576101c2565b8063095ea7b3116101a0578063095ea7b31461026c5780630c1e154f1461028857806318160ddd146102b157806323b872dd146102dc576101c2565b806301ffc9a7146101c757806306fdde0314610204578063081812fc1461022f575b600080fd5b3480156101d357600080fd5b506101ee60048036038101906101e991906128ad565b6106ed565b6040516101fb91906128f5565b60405180910390f35b34801561021057600080fd5b5061021961077f565b60405161022691906129a0565b60405180910390f35b34801561023b57600080fd5b50610256600480360381019061025191906129f8565b610811565b6040516102639190612a66565b60405180910390f35b61028660048036038101906102819190612aad565b610890565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612aed565b6109d4565b005b3480156102bd57600080fd5b506102c6610aa8565b6040516102d39190612b29565b60405180910390f35b6102f660048036038101906102f19190612b44565b610abf565b005b34801561030457600080fd5b5061030d610de1565b005b61032960048036038101906103249190612b44565b610f1f565b005b34801561033757600080fd5b50610352600480360381019061034d9190612aed565b610f3f565b005b34801561036057600080fd5b50610369610f8b565b6040516103769190612a66565b60405180910390f35b34801561038b57600080fd5b506103a660048036038101906103a19190612bfc565b610fb1565b6040516103b39190612dac565b60405180910390f35b3480156103c857600080fd5b506103e360048036038101906103de91906129f8565b611074565b6040516103f09190612a66565b60405180910390f35b34801561040557600080fd5b50610420600480360381019061041b9190612aed565b611086565b60405161042d9190612b29565b60405180910390f35b34801561044257600080fd5b5061044b61113e565b005b34801561045957600080fd5b50610474600480360381019061046f9190612aed565b611152565b6040516104819190612e8c565b60405180910390f35b34801561049657600080fd5b5061049f611295565b6040516104ac9190612a66565b60405180910390f35b3480156104c157600080fd5b506104ca6112bf565b6040516104d791906129a0565b60405180910390f35b3480156104ec57600080fd5b5061050760048036038101906105029190612eae565b611351565b6040516105149190612e8c565b60405180910390f35b34801561052957600080fd5b50610544600480360381019061053f9190612f01565b61155d565b6040516105519190612b29565b60405180910390f35b34801561056657600080fd5b50610581600480360381019061057c9190612f6d565b61159e565b005b34801561058f57600080fd5b506105aa60048036038101906105a59190612fe3565b6116a9565b005b6105c660048036038101906105c19190613066565b6116bb565b005b3480156105d457600080fd5b506105ef60048036038101906105ea9190613230565b6118fc565b005b61060b6004803603810190610606919061331a565b611917565b005b34801561061957600080fd5b50610634600480360381019061062f91906129f8565b61198a565b60405161064191906133f2565b60405180910390f35b34801561065657600080fd5b50610671600480360381019061066c91906129f8565b6119f4565b60405161067e91906129a0565b60405180910390f35b34801561069357600080fd5b506106ae60048036038101906106a9919061340d565b611a2b565b6040516106bb91906128f5565b60405180910390f35b3480156106d057600080fd5b506106eb60048036038101906106e69190612aed565b611abf565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061074857506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107785750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461078e9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546107ba9061347c565b80156108075780601f106107dc57610100808354040283529160200191610807565b820191906000526020600020905b8154815290600101906020018083116107ea57829003601f168201915b5050505050905090565b600061081c82611b42565b610852576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061089b82611074565b90508073ffffffffffffffffffffffffffffffffffffffff166108bc611ba1565b73ffffffffffffffffffffffffffffffffffffffff161461091f576108e8816108e3611ba1565b611a2b565b61091e576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5b9061351f565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610ab2611ba9565b6001546000540303905090565b6000610aca82611bae565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b31576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610b3d84611c7a565b91509150610b538187610b4e611ba1565b611ca1565b610b9f57610b6886610b63611ba1565b611a2b565b610b9e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610c05576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c128686866001611ce5565b8015610c1d57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610ceb85610cc7888887611ceb565b7c020000000000000000000000000000000000000000000000000000000017611d13565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603610d715760006001850190506000600460008381526020019081526020016000205403610d6f576000548114610d6e578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610dd98686866001611d3e565b505050505050565b610de9611295565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610e6f5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610eae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea5906135b1565b60405180910390fd5b6000479050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610f1b573d6000803e3d6000fd5b5050565b610f3a83838360405180602001604052806000815250611917565b505050565b610f47611d44565b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600083839050905060008167ffffffffffffffff811115610fd757610fd6613105565b5b60405190808252806020026020018201604052801561101057816020015b610ffd6127f2565b815260200190600190039081610ff55790505b50905060005b8281146110685761103f868683818110611033576110326135d1565b5b9050602002013561198a565b828281518110611052576110516135d1565b5b6020026020010181905250806001019050611016565b50809250505092915050565b600061107f82611bae565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036110ed576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b611146611d44565b6111506000611dc2565b565b6060600080600061116285611086565b905060008167ffffffffffffffff8111156111805761117f613105565b5b6040519080825280602002602001820160405280156111ae5781602001602082028036833780820191505090505b5090506111b96127f2565b60006111c3611ba9565b90505b838614611287576111d681611e88565b9150816040015161127c57600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff161461122157816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361127b578083878060010198508151811061126e5761126d6135d1565b5b6020026020010181815250505b5b8060010190506111c6565b508195505050505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546112ce9061347c565b80601f01602080910402602001604051908101604052809291908181526020018280546112fa9061347c565b80156113475780601f1061131c57610100808354040283529160200191611347565b820191906000526020600020905b81548152906001019060200180831161132a57829003601f168201915b5050505050905090565b606081831061138c576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611397611eb3565b90506113a1611ba9565b8510156113b3576113b0611ba9565b94505b808411156113bf578093505b60006113ca87611086565b9050848610156113ed5760008686039050818110156113e7578091505b506113f2565b600090505b60008167ffffffffffffffff81111561140e5761140d613105565b5b60405190808252806020026020018201604052801561143c5781602001602082028036833780820191505090505b509050600082036114535780945050505050611556565b600061145e8861198a565b90506000816040015161147357816000015190505b60008990505b8881141580156114895750848714155b156115485761149781611e88565b9250826040015161153d57600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff16146114e257826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361153c578084888060010199508151811061152f5761152e6135d1565b5b6020026020010181815250505b5b806001019050611479565b508583528296505050505050505b9392505050565b6000806001841461156f57603c611572565b601e5b60ff1690508281611581611ebc565b61158b919061362f565b611595919061362f565b91505092915050565b80600760006115ab611ba1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611658611ba1565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161169d91906128f5565b60405180910390a35050565b6116b1611d44565b80600b8190555050565b6116c3611eed565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061174a57508573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611789576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611780906136bd565b60405180910390fd5b6001831015801561179b575060028311155b6117da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d190613729565b60405180910390fd5b600182101580156117ec57506103e882105b61182b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182290613795565b60405180910390fd5b611839868686868686611f3c565b611843838361155d565b341015611885576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187c90613801565b60405180910390fd5b600061188f610aa8565b905080848873ffffffffffffffffffffffffffffffffffffffff167fb4c03061fb5b7fed76389d5af8f2e0ddb09f8c70d1333abbb62582835e10accb866040516118d99190612b29565b60405180910390a46118eb878461204f565b506118f461220a565b505050505050565b611904611d44565b80600c908161191391906139cd565b5050565b611922848484610abf565b60008373ffffffffffffffffffffffffffffffffffffffff163b146119845761194d84848484612214565b611983576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6119926127f2565b61199a6127f2565b6119a2611ba9565b8310806119b657506119b2611eb3565b8310155b156119c457809150506119ef565b6119cd83611e88565b90508060400151156119e257809150506119ef565b6119eb83612364565b9150505b919050565b60606000611a0183612384565b905080604051602001611a149190613b27565b604051602081830303815290604052915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611ac7611d44565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611b36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2d90613bbb565b60405180910390fd5b611b3f81611dc2565b50565b600081611b4d611ba9565b11158015611b5c575060005482105b8015611b9a575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b600090565b60008082905080611bbd611ba9565b11611c4357600054811015611c425760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603611c40575b60008103611c36576004600083600190039350838152602001908152602001600020549050611c0c565b8092505050611c75565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e8611d02868684612422565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b611d4c61242b565b73ffffffffffffffffffffffffffffffffffffffff16611d6a611295565b73ffffffffffffffffffffffffffffffffffffffff1614611dc0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611db790613c27565b60405180910390fd5b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611e906127f2565b611eac6004600084815260200190815260200160002054612433565b9050919050565b60008054905090565b6000611ec66124e9565b6305f5e100670de0b6b3a7640000611ede919061362f565b611ee89190613c76565b905090565b600260095403611f32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2990613cf3565b60405180910390fd5b6002600981905550565b60008684604051602001611f51929190613d13565b604051602081830303815290604052805190602001209050611f76878787878661258a565b611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fac90613d88565b60405180910390fd5b6000600e6000838152602001908152602001600020549050828482611fda9190613da8565b111561201b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201290613e28565b60405180910390fd5b83600e6000848152602001908152602001600020600082825461203e9190613da8565b925050819055505050505050505050565b6000805490506000820361208f576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61209c6000848385611ce5565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612113836121046000866000611ceb565b61210d85612651565b17611d13565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b8181146121b457808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612179565b50600082036121ef576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506122056000848385611d3e565b505050565b6001600981905550565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261223a611ba1565b8786866040518563ffffffff1660e01b815260040161225c9493929190613e9d565b6020604051808303816000875af192505050801561229857506040513d601f19601f820116820180604052508101906122959190613efe565b60015b612311573d80600081146122c8576040519150601f19603f3d011682016040523d82523d6000602084013e6122cd565b606091505b506000815103612309576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b61236c6127f2565b61237d61237883611bae565b612433565b9050919050565b606061238f82611b42565b6123c5576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006123cf612661565b905060008151036123ef576040518060200160405280600081525061241a565b806123f9846126f3565b60405160200161240a929190613f2b565b6040516020818303038152906040525b915050919050565b60009392505050565b600033905090565b61243b6127f2565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015612559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061257d9190613fdc565b5050509150508091505090565b60008060001b600b54036125a15760019050612648565b60008684846040516020016125b893929190614057565b604051602081830303815290604052805190602001206040516020016125de91906140af565b604051602081830303815290604052805190602001209050612644868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050600b5483612743565b9150505b95945050505050565b60006001821460e11b9050919050565b6060600c80546126709061347c565b80601f016020809104026020016040519081016040528092919081815260200182805461269c9061347c565b80156126e95780601f106126be576101008083540402835291602001916126e9565b820191906000526020600020905b8154815290600101906020018083116126cc57829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b60011561272e57600184039350600a81066030018453600a810490508061270c575b50828103602084039350808452505050919050565b600082612750858461275a565b1490509392505050565b60008082905060005b84518110156127a55761279082868381518110612783576127826135d1565b5b60200260200101516127b0565b9150808061279d906140ca565b915050612763565b508091505092915050565b60008183106127c8576127c382846127db565b6127d3565b6127d283836127db565b5b905092915050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61288a81612855565b811461289557600080fd5b50565b6000813590506128a781612881565b92915050565b6000602082840312156128c3576128c261284b565b5b60006128d184828501612898565b91505092915050565b60008115159050919050565b6128ef816128da565b82525050565b600060208201905061290a60008301846128e6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561294a57808201518184015260208101905061292f565b60008484015250505050565b6000601f19601f8301169050919050565b600061297282612910565b61297c818561291b565b935061298c81856020860161292c565b61299581612956565b840191505092915050565b600060208201905081810360008301526129ba8184612967565b905092915050565b6000819050919050565b6129d5816129c2565b81146129e057600080fd5b50565b6000813590506129f2816129cc565b92915050565b600060208284031215612a0e57612a0d61284b565b5b6000612a1c848285016129e3565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612a5082612a25565b9050919050565b612a6081612a45565b82525050565b6000602082019050612a7b6000830184612a57565b92915050565b612a8a81612a45565b8114612a9557600080fd5b50565b600081359050612aa781612a81565b92915050565b60008060408385031215612ac457612ac361284b565b5b6000612ad285828601612a98565b9250506020612ae3858286016129e3565b9150509250929050565b600060208284031215612b0357612b0261284b565b5b6000612b1184828501612a98565b91505092915050565b612b23816129c2565b82525050565b6000602082019050612b3e6000830184612b1a565b92915050565b600080600060608486031215612b5d57612b5c61284b565b5b6000612b6b86828701612a98565b9350506020612b7c86828701612a98565b9250506040612b8d868287016129e3565b9150509250925092565b600080fd5b600080fd5b600080fd5b60008083601f840112612bbc57612bbb612b97565b5b8235905067ffffffffffffffff811115612bd957612bd8612b9c565b5b602083019150836020820283011115612bf557612bf4612ba1565b5b9250929050565b60008060208385031215612c1357612c1261284b565b5b600083013567ffffffffffffffff811115612c3157612c30612850565b5b612c3d85828601612ba6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c7e81612a45565b82525050565b600067ffffffffffffffff82169050919050565b612ca181612c84565b82525050565b612cb0816128da565b82525050565b600062ffffff82169050919050565b612cce81612cb6565b82525050565b608082016000820151612cea6000850182612c75565b506020820151612cfd6020850182612c98565b506040820151612d106040850182612ca7565b506060820151612d236060850182612cc5565b50505050565b6000612d358383612cd4565b60808301905092915050565b6000602082019050919050565b6000612d5982612c49565b612d638185612c54565b9350612d6e83612c65565b8060005b83811015612d9f578151612d868882612d29565b9750612d9183612d41565b925050600181019050612d72565b5085935050505092915050565b60006020820190508181036000830152612dc68184612d4e565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612e03816129c2565b82525050565b6000612e158383612dfa565b60208301905092915050565b6000602082019050919050565b6000612e3982612dce565b612e438185612dd9565b9350612e4e83612dea565b8060005b83811015612e7f578151612e668882612e09565b9750612e7183612e21565b925050600181019050612e52565b5085935050505092915050565b60006020820190508181036000830152612ea68184612e2e565b905092915050565b600080600060608486031215612ec757612ec661284b565b5b6000612ed586828701612a98565b9350506020612ee6868287016129e3565b9250506040612ef7868287016129e3565b9150509250925092565b60008060408385031215612f1857612f1761284b565b5b6000612f26858286016129e3565b9250506020612f37858286016129e3565b9150509250929050565b612f4a816128da565b8114612f5557600080fd5b50565b600081359050612f6781612f41565b92915050565b60008060408385031215612f8457612f8361284b565b5b6000612f9285828601612a98565b9250506020612fa385828601612f58565b9150509250929050565b6000819050919050565b612fc081612fad565b8114612fcb57600080fd5b50565b600081359050612fdd81612fb7565b92915050565b600060208284031215612ff957612ff861284b565b5b600061300784828501612fce565b91505092915050565b60008083601f84011261302657613025612b97565b5b8235905067ffffffffffffffff81111561304357613042612b9c565b5b60208301915083602082028301111561305f5761305e612ba1565b5b9250929050565b60008060008060008060a087890312156130835761308261284b565b5b600061309189828a01612a98565b965050602087013567ffffffffffffffff8111156130b2576130b1612850565b5b6130be89828a01613010565b955095505060406130d189828a016129e3565b93505060606130e289828a016129e3565b92505060806130f389828a016129e3565b9150509295509295509295565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61313d82612956565b810181811067ffffffffffffffff8211171561315c5761315b613105565b5b80604052505050565b600061316f612841565b905061317b8282613134565b919050565b600067ffffffffffffffff82111561319b5761319a613105565b5b6131a482612956565b9050602081019050919050565b82818337600083830152505050565b60006131d36131ce84613180565b613165565b9050828152602081018484840111156131ef576131ee613100565b5b6131fa8482856131b1565b509392505050565b600082601f83011261321757613216612b97565b5b81356132278482602086016131c0565b91505092915050565b6000602082840312156132465761324561284b565b5b600082013567ffffffffffffffff81111561326457613263612850565b5b61327084828501613202565b91505092915050565b600067ffffffffffffffff82111561329457613293613105565b5b61329d82612956565b9050602081019050919050565b60006132bd6132b884613279565b613165565b9050828152602081018484840111156132d9576132d8613100565b5b6132e48482856131b1565b509392505050565b600082601f83011261330157613300612b97565b5b81356133118482602086016132aa565b91505092915050565b600080600080608085870312156133345761333361284b565b5b600061334287828801612a98565b945050602061335387828801612a98565b9350506040613364878288016129e3565b925050606085013567ffffffffffffffff81111561338557613384612850565b5b613391878288016132ec565b91505092959194509250565b6080820160008201516133b36000850182612c75565b5060208201516133c66020850182612c98565b5060408201516133d96040850182612ca7565b5060608201516133ec6060850182612cc5565b50505050565b6000608082019050613407600083018461339d565b92915050565b600080604083850312156134245761342361284b565b5b600061343285828601612a98565b925050602061344385828601612a98565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061349457607f821691505b6020821081036134a7576134a661344d565b5b50919050565b7f4f6e6c79207061796f757420616464726573732063616e20736574207061796f60008201527f7574206164647265737300000000000000000000000000000000000000000000602082015250565b6000613509602a8361291b565b9150613514826134ad565b604082019050919050565b60006020820190508181036000830152613538816134fc565b9050919050565b7f4f6e6c79206f776e6572206f72207061796f757420616464726573732063616e60008201527f2077697468647261770000000000000000000000000000000000000000000000602082015250565b600061359b60298361291b565b91506135a68261353f565b604082019050919050565b600060208201905081810360008301526135ca8161358e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061363a826129c2565b9150613645836129c2565b9250828202613653816129c2565b9150828204841483151761366a57613669613600565b5b5092915050565b7f496e76616c69642073656e646572000000000000000000000000000000000000600082015250565b60006136a7600e8361291b565b91506136b282613671565b602082019050919050565b600060208201905081810360008301526136d68161369a565b9050919050565b7f496e76616c696420746965720000000000000000000000000000000000000000600082015250565b6000613713600c8361291b565b915061371e826136dd565b602082019050919050565b6000602082019050818103600083015261374281613706565b9050919050565b7f496e76616c696420616d6f756e74000000000000000000000000000000000000600082015250565b600061377f600e8361291b565b915061378a82613749565b602082019050919050565b600060208201905081810360008301526137ae81613772565b9050919050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b60006137eb600e8361291b565b91506137f6826137b5565b602082019050919050565b6000602082019050818103600083015261381a816137de565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026138837fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613846565b61388d8683613846565b95508019841693508086168417925050509392505050565b6000819050919050565b60006138ca6138c56138c0846129c2565b6138a5565b6129c2565b9050919050565b6000819050919050565b6138e4836138af565b6138f86138f0826138d1565b848454613853565b825550505050565b600090565b61390d613900565b6139188184846138db565b505050565b5b8181101561393c57613931600082613905565b60018101905061391e565b5050565b601f8211156139815761395281613821565b61395b84613836565b8101602085101561396a578190505b61397e61397685613836565b83018261391d565b50505b505050565b600082821c905092915050565b60006139a460001984600802613986565b1980831691505092915050565b60006139bd8383613993565b9150826002028217905092915050565b6139d682612910565b67ffffffffffffffff8111156139ef576139ee613105565b5b6139f9825461347c565b613a04828285613940565b600060209050601f831160018114613a375760008415613a25578287015190505b613a2f85826139b1565b865550613a97565b601f198416613a4586613821565b60005b82811015613a6d57848901518255600182019150602085019450602081019050613a48565b86831015613a8a5784890151613a86601f891682613993565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000613ab582612910565b613abf8185613a9f565b9350613acf81856020860161292c565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000613b11600583613a9f565b9150613b1c82613adb565b600582019050919050565b6000613b338284613aaa565b9150613b3e82613b04565b915081905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613ba560268361291b565b9150613bb082613b49565b604082019050919050565b60006020820190508181036000830152613bd481613b98565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613c1160208361291b565b9150613c1c82613bdb565b602082019050919050565b60006020820190508181036000830152613c4081613c04565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613c81826129c2565b9150613c8c836129c2565b925082613c9c57613c9b613c47565b5b828204905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613cdd601f8361291b565b9150613ce882613ca7565b602082019050919050565b60006020820190508181036000830152613d0c81613cd0565b9050919050565b6000604082019050613d286000830185612a57565b613d356020830184612b1a565b9392505050565b7f4e6f74206f6e2077686974656c69737400000000000000000000000000000000600082015250565b6000613d7260108361291b565b9150613d7d82613d3c565b602082019050919050565b60006020820190508181036000830152613da181613d65565b9050919050565b6000613db3826129c2565b9150613dbe836129c2565b9250828201905080821115613dd657613dd5613600565b5b92915050565b7f576f756c64207375727061737320796f7572206d696e74206c696d6974000000600082015250565b6000613e12601d8361291b565b9150613e1d82613ddc565b602082019050919050565b60006020820190508181036000830152613e4181613e05565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613e6f82613e48565b613e798185613e53565b9350613e8981856020860161292c565b613e9281612956565b840191505092915050565b6000608082019050613eb26000830187612a57565b613ebf6020830186612a57565b613ecc6040830185612b1a565b8181036060830152613ede8184613e64565b905095945050505050565b600081519050613ef881612881565b92915050565b600060208284031215613f1457613f1361284b565b5b6000613f2284828501613ee9565b91505092915050565b6000613f378285613aaa565b9150613f438284613aaa565b91508190509392505050565b600069ffffffffffffffffffff82169050919050565b613f6e81613f4f565b8114613f7957600080fd5b50565b600081519050613f8b81613f65565b92915050565b6000819050919050565b613fa481613f91565b8114613faf57600080fd5b50565b600081519050613fc181613f9b565b92915050565b600081519050613fd6816129cc565b92915050565b600080600080600060a08688031215613ff857613ff761284b565b5b600061400688828901613f7c565b955050602061401788828901613fb2565b945050604061402888828901613fc7565b935050606061403988828901613fc7565b925050608061404a88828901613f7c565b9150509295509295909350565b600060608201905061406c6000830186612a57565b6140796020830185612b1a565b6140866040830184612b1a565b949350505050565b6000819050919050565b6140a96140a482612fad565b61408e565b82525050565b60006140bb8284614098565b60208201915081905092915050565b60006140d5826129c2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361410757614106613600565b5b60018201905091905056fea264697066735822122022c8695a6760f8e19c808f37ed537a7a80dd022dfb1c24444385765da8d98cc664736f6c63430008120033
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.