Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Sponsored
Latest 25 from a total of 107 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 16851832 | 8 days 5 hrs ago | IN | 0 ETH | 0.00083453 | ||||
Set Approval For... | 16675125 | 33 days 2 hrs ago | IN | 0 ETH | 0.00123837 | ||||
Set Approval For... | 16643301 | 37 days 13 hrs ago | IN | 0 ETH | 0.00178091 | ||||
Set Approval For... | 16637495 | 38 days 9 hrs ago | IN | 0 ETH | 0.00165518 | ||||
Start Reveal | 16618350 | 41 days 1 hr ago | IN | 0 ETH | 0.00340866 | ||||
Set Approval For... | 16613328 | 41 days 18 hrs ago | IN | 0 ETH | 0.00069798 | ||||
Air Drop | 16574198 | 47 days 5 hrs ago | IN | 0 ETH | 0.00210881 | ||||
Set Approval For... | 16569545 | 47 days 21 hrs ago | IN | 0 ETH | 0.00084096 | ||||
Team Withdraw | 16558671 | 49 days 9 hrs ago | IN | 0 ETH | 0.00113853 | ||||
Set Approval For... | 16535413 | 52 days 15 hrs ago | IN | 0 ETH | 0.00108419 | ||||
Set Approval For... | 16535399 | 52 days 15 hrs ago | IN | 0 ETH | 0.00087387 | ||||
Air Drop | 16527804 | 53 days 17 hrs ago | IN | 0 ETH | 0.00291877 | ||||
Air Drop | 16527803 | 53 days 17 hrs ago | IN | 0 ETH | 0.00343808 | ||||
Air Drop | 16527802 | 53 days 17 hrs ago | IN | 0 ETH | 0.0028731 | ||||
Air Drop | 16527800 | 53 days 17 hrs ago | IN | 0 ETH | 0.00298207 | ||||
Air Drop | 16527799 | 53 days 17 hrs ago | IN | 0 ETH | 0.00281319 | ||||
Air Drop | 16527788 | 53 days 17 hrs ago | IN | 0 ETH | 0.00248504 | ||||
Air Drop | 16527787 | 53 days 17 hrs ago | IN | 0 ETH | 0.00254246 | ||||
Air Drop | 16527786 | 53 days 17 hrs ago | IN | 0 ETH | 0.00249157 | ||||
Air Drop | 16527784 | 53 days 17 hrs ago | IN | 0 ETH | 0.00248456 | ||||
Air Drop | 16527783 | 53 days 17 hrs ago | IN | 0 ETH | 0.00246045 | ||||
Air Drop | 16527782 | 53 days 17 hrs ago | IN | 0 ETH | 0.00251547 | ||||
Set Approval For... | 16516835 | 55 days 5 hrs ago | IN | 0 ETH | 0.00073906 | ||||
Set Approval For... | 16514814 | 55 days 12 hrs ago | IN | 0 ETH | 0.00108823 | ||||
Set Approval For... | 16506909 | 56 days 15 hrs ago | IN | 0 ETH | 0.00079164 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
KartoCarsNFT
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** // / / // ) ) //__ / / ___ __ __ ___ ___ // ___ __ ___ //__ / // ) ) // ) ) / / // ) ) // // ) ) // ) ) (( ) ) // \ \ // / / // / / // / / // // / / // \ \ // \ \ ((___( ( // / / ((___/ / ((____/ / ((___( ( // // ) ) Developed by carl. **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; contract KartoCarsNFT is ERC721A, Ownable, VRFConsumerBaseV2 { event RequestSent(uint256 requestID, uint32 numWords); event RequestFulfilled(uint256 requestID, uint256[] randomWords); struct RequestStatus { bool fulfilled; bool exists; uint256[] randomWords; } enum SaleStatus { PAUSED, // 0 WHITELIST, // 1 PUBLIC // 2 } using Strings for uint256; // ~~~~~~~~~~~~~~~~~~ Set Sale as PAUSED on DEPLOY ~~~~~~~~~~~~~~~~~~ SaleStatus public saleStatus = SaleStatus.PAUSED; string private preRevealURI; string private postRevealBaseURI; // ~~~~~~~~~~~~~~~~~~ Sale Settings ~~~~~~~~~~~~~~~~~~ uint256 public PRICE_KC = 0.07 ether; //Price set to first sale of OG. uint256 private constant MAX_KC = 10000; uint256 public publicPerWallet = 3; uint256 public wlPerWallet = 3; uint256 public SALE_ROUND_SUPPLY; // Allows the changing of totalSupply minters can mint per sale round. //~~~~~~~~~~~~~~~~~~ Chainlink Settings ~~~~~~~~~~~~~~~~~~ uint256[] public requestIds; uint256 public lastRequestId; uint32 callbackGasLimit = 100000; uint16 requestConfirmations = 3; uint32 numWords = 1; VRFCoordinatorV2Interface COORDINATOR; address[] private teamAddress; uint[] private teamSplit; // ~~~~~~~~~~~~~~~~~~ Chainlink Sub ID ~~~~~~~~~~~~~~~~~~ uint64 s_subscriptionId; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public wlMintedAmt; mapping (address => uint256) public publicMintAmt; mapping(uint256 => RequestStatus) public s_requests; // ~~~~~~~~~~~~~~~~~~ Reveal ~~~~~~~~~~~~~~~~~~ bool public revealed; uint256 public tokenOffset; // ~~~~~~~~~~~~~~~~~~ Chainlink VRF ~~~~~~~~~~~~~~~~~~ bytes32 public chainlinkKeyHash; constructor( address[] memory _team, uint[] memory _split, string memory _preRevealURI, uint256 _saleRoundMax, address _vrfCoordinator, bytes32 _chainlinkKeyHash, uint64 _subscriptionId ) ERC721A("Karto Cars NFT", "KARTOCARS") VRFConsumerBaseV2(0x271682DEB8C4E0901D1a1550aD2e64D568E69909) { addTeam(_team, _split); preRevealURI = _preRevealURI; SALE_ROUND_SUPPLY = _saleRoundMax; chainlinkKeyHash = _chainlinkKeyHash; COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator); s_subscriptionId = _subscriptionId; } // ~~~~~~~~~~~~~~~~~~ Prevent Bots ~~~~~~~~~~~~~~~~~~ modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract"); _; } // ~~~~~~~~~~~~~~~~~~ Metadata Functions ~~~~~~~~~~~~~~~~~~ function setPreRevealURI(string memory _URI) external onlyOwner { preRevealURI = _URI; } function setPostRevealBaseURI(string memory _URI) external onlyOwner { postRevealBaseURI = _URI; } // ~~~~~~~~~~~~~~~~~~ Token URI ~~~~~~~~~~~~~~~~~~ // Before reveal, return same pre-reveal URI // After reveal, return post-reveal URI with random token offset from Chainlink function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token"); if (!revealed) return preRevealURI; uint256 shiftedTokenId = (_tokenId + tokenOffset) % totalSupply(); return string(abi.encodePacked(postRevealBaseURI, shiftedTokenId.toString())); } // ~~~~~~~~~~~~~~~~~~ Sale State Function ~~~~~~~~~~~~~~~~~~ function setSaleStatus(SaleStatus _status) external onlyOwner { saleStatus = _status; } // ~~~~~~~~~~~~~~~~~~ Setting Merkle Root Function ~~~~~~~~~~~~~~~~~~ function setMerkleRoots(bytes32 _whitelistMerkleRoot) external onlyOwner { whitelistMerkleRoot = _whitelistMerkleRoot; } function processMint(uint256 _quantity) internal { require(msg.value == PRICE_KC * _quantity, "INCORRECT ETH SENT"); require(totalSupply() + _quantity <= MAX_KC, "MAX CAP OF KC EXCEEDED"); require(totalSupply() + _quantity <= SALE_ROUND_SUPPLY, "Current Sale is Sold out"); _mint(msg.sender, _quantity); } // ~~~~~~~~~~~~~~~~~~ Whitelist Sale Function ~~~~~~~~~~~~~~~~~~ function whitelistMint(uint256 _mintAmount, uint8 _maxAllowed, bytes32[] memory _proof) external payable callerIsUser { require(saleStatus == SaleStatus.WHITELIST, "WL SALE NOT ACTIVE"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _maxAllowed)); require(MerkleProof.verify(_proof, whitelistMerkleRoot, leaf),"INVALID PROOF"); require(_mintAmount + wlMintedAmt[msg.sender] <= wlPerWallet , "MAX WL MINTED"); wlMintedAmt[msg.sender]+= _mintAmount; processMint(_mintAmount); } // ~~~~~~~~~~~~~~~~~~ Public Sale Function ~~~~~~~~~~~~~~~~~~ function publicMint( uint256 _quantity ) external payable callerIsUser { require(saleStatus == SaleStatus.PUBLIC, "PUBLIC SALE NOT LIVE"); require(_quantity + publicMintAmt[msg.sender] <= publicPerWallet, "MAX PUBLIC MINTED"); publicMintAmt[msg.sender]+= _quantity; processMint(_quantity); } // ~~~~~~~~~~~~~~~~~~ Airdrop Function ~~~~~~~~~~~~~~~~~~ function airDrop( uint256 _quantity, address _receiver ) public onlyOwner { require(totalSupply() + _quantity <= MAX_KC); _mint(_receiver, _quantity); } // ~~~~~~~~~~~~~~~~~~ Edit Chainlink Configuration ~~~~~~~~~~~~~~~~~~ function setChainlinkConfig(bytes32 _keyhash) external onlyOwner { chainlinkKeyHash = _keyhash; } function changeCallBackGasLimit(uint32 _callBack) external onlyOwner { callbackGasLimit = _callBack; } // ~~~~~~~~~~~~~~~~~~ Request Token Offset ~~~~~~~~~~~~~~~~~~ // NOTE: contract must be approved for and own LINK before calling this function function startReveal(string memory _newURI) external onlyOwner returns (uint256 requestId) { require(!revealed, "ALREADY REVEALED"); postRevealBaseURI = _newURI; requestId = COORDINATOR.requestRandomWords( chainlinkKeyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, numWords ); s_requests[requestId] = RequestStatus({ randomWords: new uint256[](0), exists: true, fulfilled: false }); requestIds.push(requestId); lastRequestId = requestId; emit RequestSent(requestId, numWords); return requestId; } // ~~~~~~~~~~~~~~~~~~ CHAINLINK CALLBACK FOR TOKEN OFFSET ~~~~~~~~~~~~~~~~~~ function fulfillRandomWords(uint256 _requestId, uint256[] memory randomWords) internal override { require(!revealed, "ALREADY REVEALED"); require(s_requests[_requestId].exists, "Request not found."); s_requests[_requestId].fulfilled = true; s_requests[_requestId].randomWords = randomWords; emit RequestFulfilled(_requestId, randomWords); revealed = true; tokenOffset = randomWords[0] % totalSupply(); } function getRequestStatus(uint256 _requestId) external view returns (bool fulfilled, uint256[] memory randomWords) { require(s_requests[_requestId].exists, "Request not found."); RequestStatus memory request = s_requests[_requestId]; return (request.fulfilled, request.randomWords); } function _startTokenId() internal view virtual override returns (uint256) { return 1; } // ~~~~~~~~~~~~~~~~~~ onlyOwner Functions ~~~~~~~~~~~~~~~~~~ function changePrice(uint256 _price) public onlyOwner { PRICE_KC = _price; } function changePublicAmt(uint256 _amt) public onlyOwner { publicPerWallet = _amt; } function changeWhitelistAmt(uint256 _wlAmt) public onlyOwner { wlPerWallet = _wlAmt; } function changeSaleRoundMax(uint256 _saleRoundMax) public onlyOwner { SALE_ROUND_SUPPLY = _saleRoundMax; } function numberMinted(address _owner) public view returns (uint256) { return _numberMinted(_owner); } function getOwnershipData(uint256 _tokenId) external view returns (TokenOwnership memory) { return _ownershipOf(_tokenId); } function addTeam(address[] memory _team, uint[] memory _split) public onlyOwner { require(_team.length == _split.length, "Address and Shares must equal"); teamAddress = _team; teamSplit = _split; } //~~~~~~~~~~~~~~~~~~ Withdraw Functions ~~~~~~~~~~~~~~~~~~ function internalWithdrawal(uint _amount) internal onlyOwner { for(uint i = 0; i < teamAddress.length; i++) { uint split = teamSplit[i]; (bool os, ) = payable(teamAddress[i]).call{value: _amount * split / 100}(''); require(os); } } function teamWithdraw() public onlyOwner { internalWithdrawal(address(this).balance); } function emergencyWithdraw() public onlyOwner { (bool os, ) = payable(owner()).call{value: address(this).balance}(''); require(os); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; /* * @notice Check to see if there exists a request commitment consumers * for all consumers and keyhashes for a given sub. * @param subId - ID of the subscription * @return true if there exists at least one unfulfilled request for the subscription, false * otherwise. */ function pendingRequestExists(uint64 subId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 // 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; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address[]","name":"_team","type":"address[]"},{"internalType":"uint256[]","name":"_split","type":"uint256[]"},{"internalType":"string","name":"_preRevealURI","type":"string"},{"internalType":"uint256","name":"_saleRoundMax","type":"uint256"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"bytes32","name":"_chainlinkKeyHash","type":"bytes32"},{"internalType":"uint64","name":"_subscriptionId","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestID","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"RequestFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestID","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"numWords","type":"uint32"}],"name":"RequestSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PRICE_KC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_ROUND_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_team","type":"address[]"},{"internalType":"uint256[]","name":"_split","type":"uint256[]"}],"name":"addTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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":"chainlinkKeyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_callBack","type":"uint32"}],"name":"changeCallBackGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"changePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"changePublicAmt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleRoundMax","type":"uint256"}],"name":"changeSaleRoundMax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wlAmt","type":"uint256"}],"name":"changeWhitelistAmt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getOwnershipData","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":"_requestId","type":"uint256"}],"name":"getRequestStatus","outputs":[{"internalType":"bool","name":"fulfilled","type":"bool"},{"internalType":"uint256[]","name":"randomWords","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":[],"name":"lastRequestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicMintAmt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"s_requests","outputs":[{"internalType":"bool","name":"fulfilled","type":"bool"},{"internalType":"bool","name":"exists","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleStatus","outputs":[{"internalType":"enum KartoCarsNFT.SaleStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyhash","type":"bytes32"}],"name":"setChainlinkConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_whitelistMerkleRoot","type":"bytes32"}],"name":"setMerkleRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPostRevealBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPreRevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum KartoCarsNFT.SaleStatus","name":"_status","type":"uint8"}],"name":"setSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"startReveal","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenOffset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint8","name":"_maxAllowed","type":"uint8"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wlMintedAmt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040526000600860146101000a81548160ff021916908360028111156200002d576200002c620005b8565b5b021790555066f8b0a10e470000600b556003600c556003600d55620186a0601160006101000a81548163ffffffff021916908363ffffffff1602179055506003601160046101000a81548161ffff021916908361ffff1602179055506001601160066101000a81548163ffffffff021916908363ffffffff160217905550348015620000b857600080fd5b50604051620060db380380620060db8339818101604052810190620000de919062000a4b565b73271682deb8c4e0901d1a1550ad2e64d568e699096040518060400160405280600e81526020017f4b6172746f2043617273204e46540000000000000000000000000000000000008152506040518060400160405280600981526020017f4b4152544f434152530000000000000000000000000000000000000000000000815250816002908162000170919062000d9c565b50806003908162000182919062000d9c565b50620001936200029960201b60201c565b6000819055505050620001bb620001af620002a260201b60201c565b620002aa60201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050506200020287876200037060201b60201c565b846009908162000213919062000d9c565b5083600e8190555081601b81905550826011600a6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080601460006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505050505050505062000f78565b60006001905090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b62000380620003fd60201b60201c565b8051825114620003c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620003be9062000ee4565b60405180910390fd5b8160129080519060200190620003df929190620004b8565b508060139080519060200190620003f892919062000547565b505050565b6200040d620002a260201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16620004336200048e60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16146200048c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004839062000f56565b60405180910390fd5b565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b82805482825590600052602060002090810192821562000534579160200282015b82811115620005335782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190620004d9565b5b50905062000543919062000599565b5090565b82805482825590600052602060002090810192821562000586579160200282015b828111156200058557825182559160200191906001019062000568565b5b50905062000595919062000599565b5090565b5b80821115620005b45760008160009055506001016200059a565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200064b8262000600565b810181811067ffffffffffffffff821117156200066d576200066c62000611565b5b80604052505050565b600062000682620005e7565b905062000690828262000640565b919050565b600067ffffffffffffffff821115620006b357620006b262000611565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620006f682620006c9565b9050919050565b6200070881620006e9565b81146200071457600080fd5b50565b6000815190506200072881620006fd565b92915050565b6000620007456200073f8462000695565b62000676565b905080838252602082019050602084028301858111156200076b576200076a620006c4565b5b835b8181101562000798578062000783888262000717565b8452602084019350506020810190506200076d565b5050509392505050565b600082601f830112620007ba57620007b9620005fb565b5b8151620007cc8482602086016200072e565b91505092915050565b600067ffffffffffffffff821115620007f357620007f262000611565b5b602082029050602081019050919050565b6000819050919050565b620008198162000804565b81146200082557600080fd5b50565b60008151905062000839816200080e565b92915050565b6000620008566200085084620007d5565b62000676565b905080838252602082019050602084028301858111156200087c576200087b620006c4565b5b835b81811015620008a9578062000894888262000828565b8452602084019350506020810190506200087e565b5050509392505050565b600082601f830112620008cb57620008ca620005fb565b5b8151620008dd8482602086016200083f565b91505092915050565b600080fd5b600067ffffffffffffffff82111562000909576200090862000611565b5b620009148262000600565b9050602081019050919050565b60005b838110156200094157808201518184015260208101905062000924565b60008484015250505050565b6000620009646200095e84620008eb565b62000676565b905082815260208101848484011115620009835762000982620008e6565b5b6200099084828562000921565b509392505050565b600082601f830112620009b057620009af620005fb565b5b8151620009c28482602086016200094d565b91505092915050565b6000819050919050565b620009e081620009cb565b8114620009ec57600080fd5b50565b60008151905062000a0081620009d5565b92915050565b600067ffffffffffffffff82169050919050565b62000a258162000a06565b811462000a3157600080fd5b50565b60008151905062000a458162000a1a565b92915050565b600080600080600080600060e0888a03121562000a6d5762000a6c620005f1565b5b600088015167ffffffffffffffff81111562000a8e5762000a8d620005f6565b5b62000a9c8a828b01620007a2565b975050602088015167ffffffffffffffff81111562000ac05762000abf620005f6565b5b62000ace8a828b01620008b3565b965050604088015167ffffffffffffffff81111562000af25762000af1620005f6565b5b62000b008a828b0162000998565b955050606062000b138a828b0162000828565b945050608062000b268a828b0162000717565b93505060a062000b398a828b01620009ef565b92505060c062000b4c8a828b0162000a34565b91505092959891949750929550565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000bae57607f821691505b60208210810362000bc45762000bc362000b66565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830262000c2e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000bef565b62000c3a868362000bef565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000c7d62000c7762000c718462000804565b62000c52565b62000804565b9050919050565b6000819050919050565b62000c998362000c5c565b62000cb162000ca88262000c84565b84845462000bfc565b825550505050565b600090565b62000cc862000cb9565b62000cd581848462000c8e565b505050565b5b8181101562000cfd5762000cf160008262000cbe565b60018101905062000cdb565b5050565b601f82111562000d4c5762000d168162000bca565b62000d218462000bdf565b8101602085101562000d31578190505b62000d4962000d408562000bdf565b83018262000cda565b50505b505050565b600082821c905092915050565b600062000d716000198460080262000d51565b1980831691505092915050565b600062000d8c838362000d5e565b9150826002028217905092915050565b62000da78262000b5b565b67ffffffffffffffff81111562000dc35762000dc262000611565b5b62000dcf825462000b95565b62000ddc82828562000d01565b600060209050601f83116001811462000e14576000841562000dff578287015190505b62000e0b858262000d7e565b86555062000e7b565b601f19841662000e248662000bca565b60005b8281101562000e4e5784890151825560018201915060208501945060208101905062000e27565b8683101562000e6e578489015162000e6a601f89168262000d5e565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f4164647265737320616e6420536861726573206d75737420657175616c000000600082015250565b600062000ecc601d8362000e83565b915062000ed98262000e94565b602082019050919050565b6000602082019050818103600083015262000eff8162000ebd565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000f3e60208362000e83565b915062000f4b8262000f06565b602082019050919050565b6000602082019050818103600083015262000f718162000f2f565b9050919050565b60805161514062000f9b60003960008181610f1c0152610f7001526151406000f3fe6080604052600436106102ff5760003560e01c806395d89b4111610190578063db292e7f116100dc578063eca2983711610095578063f40ab8ab1161006f578063f40ab8ab14610b60578063f9020e3314610b8b578063f970a77b14610bb6578063fc2a88c314610bdf576102ff565b8063eca2983714610ae5578063f184ed8914610b0e578063f2fde38b14610b37576102ff565b8063db292e7f146109d5578063db2e21bc146109fe578063dc33e68114610a15578063dc348bd814610a52578063dc8c57b414610a7d578063e985e9c514610aa8576102ff565b8063aed3801511610149578063cfbb7d3611610123578063cfbb7d361461091a578063d6abac2314610931578063d6ef4a9e1461096e578063d8a4676f14610997576102ff565b8063aed3801514610898578063b88d4fde146108c1578063c87b56dd146108dd576102ff565b806395d89b4114610787578063a168fa89146107b2578063a22cb465146107f0578063a2b40d1914610819578063aa98e0c614610842578063abd4e58a1461086d576102ff565b80634586fb4e1161024f57806370a08231116102085780637c34cc37116101e25780637c34cc37146106b95780638796ba8c146106e25780638da5cb5b1461071f5780639231ab2a1461074a576102ff565b806370a0823114610628578063715018a61461066557806375d7741b1461067c576102ff565b80634586fb4e146105135780634891ad881461053e57806351830227146105675780635b24ed14146105925780636352211e146105cf5780636df69b181461060c576102ff565b80631fe543e3116102bc5780632a85db55116102965780632a85db55146104875780632db11544146104b05780633f961bbd146104cc57806342842e0e146104f7576102ff565b80631fe543e31461041957806323b872dd146104425780632931ec161461045e576102ff565b806301ffc9a71461030457806302317c8e1461034157806306fdde031461036a578063081812fc14610395578063095ea7b3146103d257806318160ddd146103ee575b600080fd5b34801561031057600080fd5b5061032b600480360381019061032691906133d5565b610c0a565b604051610338919061341d565b60405180910390f35b34801561034d57600080fd5b506103686004803603810190610363919061346e565b610c9c565b005b34801561037657600080fd5b5061037f610cae565b60405161038c919061352b565b60405180910390f35b3480156103a157600080fd5b506103bc60048036038101906103b7919061346e565b610d40565b6040516103c9919061358e565b60405180910390f35b6103ec60048036038101906103e791906135d5565b610dbf565b005b3480156103fa57600080fd5b50610403610f03565b6040516104109190613624565b60405180910390f35b34801561042557600080fd5b50610440600480360381019061043b9190613787565b610f1a565b005b61045c600480360381019061045791906137e3565b610fda565b005b34801561046a57600080fd5b506104856004803603810190610480919061386c565b6112fc565b005b34801561049357600080fd5b506104ae60048036038101906104a9919061394e565b61130e565b005b6104ca60048036038101906104c5919061346e565b611329565b005b3480156104d857600080fd5b506104e16114fd565b6040516104ee9190613624565b60405180910390f35b610511600480360381019061050c91906137e3565b611503565b005b34801561051f57600080fd5b50610528611523565b60405161053591906139a6565b60405180910390f35b34801561054a57600080fd5b50610565600480360381019061056091906139e6565b611529565b005b34801561057357600080fd5b5061057c61155e565b604051610589919061341d565b60405180910390f35b34801561059e57600080fd5b506105b960048036038101906105b49190613a13565b611571565b6040516105c69190613624565b60405180910390f35b3480156105db57600080fd5b506105f660048036038101906105f1919061346e565b611589565b604051610603919061358e565b60405180910390f35b61062660048036038101906106219190613b3c565b61159b565b005b34801561063457600080fd5b5061064f600480360381019061064a9190613a13565b6117ec565b60405161065c9190613624565b60405180910390f35b34801561067157600080fd5b5061067a6118a4565b005b34801561068857600080fd5b506106a3600480360381019061069e919061394e565b6118b8565b6040516106b09190613624565b60405180910390f35b3480156106c557600080fd5b506106e060048036038101906106db919061346e565b611b73565b005b3480156106ee57600080fd5b506107096004803603810190610704919061346e565b611b85565b6040516107169190613624565b60405180910390f35b34801561072b57600080fd5b50610734611ba9565b604051610741919061358e565b60405180910390f35b34801561075657600080fd5b50610771600480360381019061076c919061346e565b611bd3565b60405161077e9190613c5f565b60405180910390f35b34801561079357600080fd5b5061079c611beb565b6040516107a9919061352b565b60405180910390f35b3480156107be57600080fd5b506107d960048036038101906107d4919061346e565b611c7d565b6040516107e7929190613c7a565b60405180910390f35b3480156107fc57600080fd5b5061081760048036038101906108129190613ccf565b611cbb565b005b34801561082557600080fd5b50610840600480360381019061083b919061346e565b611dc6565b005b34801561084e57600080fd5b50610857611dd8565b60405161086491906139a6565b60405180910390f35b34801561087957600080fd5b50610882611dde565b60405161088f9190613624565b60405180910390f35b3480156108a457600080fd5b506108bf60048036038101906108ba9190613d0f565b611de4565b005b6108db60048036038101906108d69190613df0565b611e1b565b005b3480156108e957600080fd5b5061090460048036038101906108ff919061346e565b611e8e565b604051610911919061352b565b60405180910390f35b34801561092657600080fd5b5061092f611fd6565b005b34801561093d57600080fd5b5061095860048036038101906109539190613a13565b611fe9565b6040516109659190613624565b60405180910390f35b34801561097a57600080fd5b506109956004803603810190610990919061346e565b612001565b005b3480156109a357600080fd5b506109be60048036038101906109b9919061346e565b612013565b6040516109cc929190613f31565b60405180910390f35b3480156109e157600080fd5b506109fc60048036038101906109f7919061394e565b61213e565b005b348015610a0a57600080fd5b50610a13612159565b005b348015610a2157600080fd5b50610a3c6004803603810190610a379190613a13565b6121e1565b604051610a499190613624565b60405180910390f35b348015610a5e57600080fd5b50610a676121f3565b604051610a749190613624565b60405180910390f35b348015610a8957600080fd5b50610a926121f9565b604051610a9f9190613624565b60405180910390f35b348015610ab457600080fd5b50610acf6004803603810190610aca9190613f61565b6121ff565b604051610adc919061341d565b60405180910390f35b348015610af157600080fd5b50610b0c6004803603810190610b07919061386c565b612293565b005b348015610b1a57600080fd5b50610b356004803603810190610b309190613fdd565b6122a5565b005b348015610b4357600080fd5b50610b5e6004803603810190610b599190613a13565b6122d1565b005b348015610b6c57600080fd5b50610b75612354565b604051610b829190613624565b60405180910390f35b348015610b9757600080fd5b50610ba061235a565b604051610bad9190614081565b60405180910390f35b348015610bc257600080fd5b50610bdd6004803603810190610bd8919061415f565b61236d565b005b348015610beb57600080fd5b50610bf46123eb565b604051610c019190613624565b60405180910390f35b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c6557506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610c955750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b610ca46123f1565b80600d8190555050565b606060028054610cbd90614206565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce990614206565b8015610d365780601f10610d0b57610100808354040283529160200191610d36565b820191906000526020600020905b815481529060010190602001808311610d1957829003601f168201915b5050505050905090565b6000610d4b8261246f565b610d81576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610dca82611589565b90508073ffffffffffffffffffffffffffffffffffffffff16610deb6124ce565b73ffffffffffffffffffffffffffffffffffffffff1614610e4e57610e1781610e126124ce565b6121ff565b610e4d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000610f0d6124d6565b6001546000540303905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610fcc57337f00000000000000000000000000000000000000000000000000000000000000006040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610fc3929190614237565b60405180910390fd5b610fd682826124df565b5050565b6000610fe582612678565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461104c576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061105884612744565b9150915061106e81876110696124ce565b61276b565b6110ba576110838661107e6124ce565b6121ff565b6110b9576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603611120576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61112d86868660016127af565b801561113857600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550611206856111e28888876127b5565b7c0200000000000000000000000000000000000000000000000000000000176127dd565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084160361128c576000600185019050600060046000838152602001908152602001600020540361128a576000548114611289578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112f48686866001612808565b505050505050565b6113046123f1565b8060158190555050565b6113166123f1565b8060099081611325919061440c565b5050565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611397576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138e9061452a565b60405180910390fd5b6002808111156113aa576113a961400a565b5b600860149054906101000a900460ff1660028111156113cc576113cb61400a565b5b1461140c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161140390614596565b60405180910390fd5b600c54601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548261145a91906145e5565b111561149b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149290614665565b60405180910390fd5b80601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546114ea91906145e5565b925050819055506114fa8161280e565b50565b600c5481565b61151e83838360405180602001604052806000815250611e1b565b505050565b601b5481565b6115316123f1565b80600860146101000a81548160ff021916908360028111156115565761155561400a565b5b021790555050565b601960009054906101000a900460ff1681565b60176020528060005260406000206000915090505481565b600061159482612678565b9050919050565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611609576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116009061452a565b60405180910390fd5b6001600281111561161d5761161c61400a565b5b600860149054906101000a900460ff16600281111561163f5761163e61400a565b5b1461167f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611676906146d1565b60405180910390fd5b6000338360405160200161169492919061476f565b6040516020818303038152906040528051906020012090506116b98260155483612918565b6116f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ef906147e7565b60405180910390fd5b600d54601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548561174691906145e5565b1115611787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177e90614853565b60405180910390fd5b83601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117d691906145e5565b925050819055506117e68461280e565b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611853576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6118ac6123f1565b6118b6600061292f565b565b60006118c26123f1565b601960009054906101000a900460ff1615611912576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611909906148bf565b60405180910390fd5b81600a9081611921919061440c565b506011600a9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601b54601460009054906101000a900467ffffffffffffffff16601160049054906101000a900461ffff16601160009054906101000a900463ffffffff16601160069054906101000a900463ffffffff166040518663ffffffff1660e01b81526004016119d195949392919061491a565b6020604051808303816000875af11580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190614982565b90506040518060600160405280600015158152602001600115158152602001600067ffffffffffffffff811115611a4e57611a4d613644565b5b604051908082528060200260200182016040528015611a7c5781602001602082028036833780820191505090505b508152506018600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff0219169083151502179055506040820151816001019080519060200190611aef929190613226565b50905050600f819080600181540180825580915050600190039060005260206000200160009091909190915055806010819055507fcc58b13ad3eab50626c6a6300b1d139cd6ebb1688a7cced9461c2f7e762665ee81601160069054906101000a900463ffffffff16604051611b669291906149af565b60405180910390a1919050565b611b7b6123f1565b80600c8190555050565b600f8181548110611b9557600080fd5b906000526020600020016000915090505481565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611bdb613273565b611be4826129f5565b9050919050565b606060038054611bfa90614206565b80601f0160208091040260200160405190810160405280929190818152602001828054611c2690614206565b8015611c735780601f10611c4857610100808354040283529160200191611c73565b820191906000526020600020905b815481529060010190602001808311611c5657829003601f168201915b5050505050905090565b60186020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff16905082565b8060076000611cc86124ce565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611d756124ce565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611dba919061341d565b60405180910390a35050565b611dce6123f1565b80600b8190555050565b60155481565b600d5481565b611dec6123f1565b61271082611df8610f03565b611e0291906145e5565b1115611e0d57600080fd5b611e178183612a15565b5050565b611e26848484610fda565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611e8857611e5184848484612bd0565b611e87576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6060611e998261246f565b611ed8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ecf90614a4a565b60405180910390fd5b601960009054906101000a900460ff16611f7e5760098054611ef990614206565b80601f0160208091040260200160405190810160405280929190818152602001828054611f2590614206565b8015611f725780601f10611f4757610100808354040283529160200191611f72565b820191906000526020600020905b815481529060010190602001808311611f5557829003601f168201915b50505050509050611fd1565b6000611f88610f03565b601a5484611f9691906145e5565b611fa09190614a99565b9050600a611fad82612d20565b604051602001611fbe929190614b89565b6040516020818303038152906040529150505b919050565b611fde6123f1565b611fe747612dee565b565b60166020528060005260406000206000915090505481565b6120096123f1565b80600e8190555050565b600060606018600084815260200190815260200160002060000160019054906101000a900460ff1661207a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161207190614bf9565b60405180910390fd5b6000601860008581526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900460ff161515151581526020016001820180548060200260200160405190810160405280929190818152602001828054801561211f57602002820191906000526020600020905b81548152602001906001019080831161210b575b5050505050815250509050806000015181604001519250925050915091565b6121466123f1565b80600a9081612155919061440c565b5050565b6121616123f1565b600061216b611ba9565b73ffffffffffffffffffffffffffffffffffffffff164760405161218e90614c4a565b60006040518083038185875af1925050503d80600081146121cb576040519150601f19603f3d011682016040523d82523d6000602084013e6121d0565b606091505b50509050806121de57600080fd5b50565b60006121ec82612f0d565b9050919050565b600b5481565b601a5481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61229b6123f1565b80601b8190555050565b6122ad6123f1565b80601160006101000a81548163ffffffff021916908363ffffffff16021790555050565b6122d96123f1565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612348576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233f90614cd1565b60405180910390fd5b6123518161292f565b50565b600e5481565b600860149054906101000a900460ff1681565b6123756123f1565b80518251146123b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b090614d3d565b60405180910390fd5b81601290805190602001906123cf9291906132c2565b5080601390805190602001906123e6929190613226565b505050565b60105481565b6123f9612f64565b73ffffffffffffffffffffffffffffffffffffffff16612417611ba9565b73ffffffffffffffffffffffffffffffffffffffff161461246d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246490614da9565b60405180910390fd5b565b60008161247a6124d6565b11158015612489575060005482105b80156124c7575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b60006001905090565b601960009054906101000a900460ff161561252f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612526906148bf565b60405180910390fd5b6018600083815260200190815260200160002060000160019054906101000a900460ff16612592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258990614bf9565b60405180910390fd5b60016018600084815260200190815260200160002060000160006101000a81548160ff021916908315150217905550806018600084815260200190815260200160002060010190805190602001906125eb929190613226565b507ffe2e2d779dba245964d4e3ef9b994be63856fd568bf7d3ca9e224755cb1bd54d828260405161261d929190614dc9565b60405180910390a16001601960006101000a81548160ff021916908315150217905550612648610f03565b8160008151811061265c5761265b614df9565b5b602002602001015161266e9190614a99565b601a819055505050565b600080829050806126876124d6565b1161270d5760005481101561270c5760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082160361270a575b600081036127005760046000836001900393508381526020019081526020016000205490506126d6565b809250505061273f565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86127cc868684612f6c565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b80600b5461281c9190614e28565b341461285d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285490614eb6565b60405180910390fd5b61271081612869610f03565b61287391906145e5565b11156128b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128ab90614f22565b60405180910390fd5b600e54816128c0610f03565b6128ca91906145e5565b111561290b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161290290614f8e565b60405180910390fd5b6129153382612a15565b50565b6000826129258584612f75565b1490509392505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6129fd613273565b612a0e612a0983612678565b612fcb565b9050919050565b60008054905060008203612a55576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612a6260008483856127af565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612ad983612aca60008660006127b5565b612ad385613081565b176127dd565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114612b7a57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050612b3f565b5060008203612bb5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050612bcb6000848385612808565b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612bf66124ce565b8786866040518563ffffffff1660e01b8152600401612c189493929190615003565b6020604051808303816000875af1925050508015612c5457506040513d601f19601f82011682018060405250810190612c519190615064565b60015b612ccd573d8060008114612c84576040519150601f19603f3d011682016040523d82523d6000602084013e612c89565b606091505b506000815103612cc5576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b606060006001612d2f84613091565b01905060008167ffffffffffffffff811115612d4e57612d4d613644565b5b6040519080825280601f01601f191660200182016040528015612d805781602001600182028036833780820191505090505b509050600082602001820190505b600115612de3578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581612dd757612dd6614a6a565b5b04945060008503612d8e575b819350505050919050565b612df66123f1565b60005b601280549050811015612f0957600060138281548110612e1c57612e1b614df9565b5b90600052602060002001549050600060128381548110612e3f57612e3e614df9565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660648386612e8e9190614e28565b612e989190615091565b604051612ea490614c4a565b60006040518083038185875af1925050503d8060008114612ee1576040519150601f19603f3d011682016040523d82523d6000602084013e612ee6565b606091505b5050905080612ef457600080fd5b50508080612f01906150c2565b915050612df9565b5050565b600067ffffffffffffffff6040600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054901c169050919050565b600033905090565b60009392505050565b60008082905060005b8451811015612fc057612fab82868381518110612f9e57612f9d614df9565b5b60200260200101516131e4565b91508080612fb8906150c2565b915050612f7e565b508091505092915050565b612fd3613273565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60006001821460e11b9050919050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083106130ef577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816130e5576130e4614a6a565b5b0492506040810190505b6d04ee2d6d415b85acef8100000000831061312c576d04ee2d6d415b85acef8100000000838161312257613121614a6a565b5b0492506020810190505b662386f26fc10000831061315b57662386f26fc10000838161315157613150614a6a565b5b0492506010810190505b6305f5e1008310613184576305f5e100838161317a57613179614a6a565b5b0492506008810190505b61271083106131a957612710838161319f5761319e614a6a565b5b0492506004810190505b606483106131cc57606483816131c2576131c1614a6a565b5b0492506002810190505b600a83106131db576001810190505b80915050919050565b60008183106131fc576131f7828461320f565b613207565b613206838361320f565b5b905092915050565b600082600052816020526040600020905092915050565b828054828255906000526020600020908101928215613262579160200282015b82811115613261578251825591602001919060010190613246565b5b50905061326f919061334c565b5090565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b82805482825590600052602060002090810192821561333b579160200282015b8281111561333a5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906132e2565b5b509050613348919061334c565b5090565b5b8082111561336557600081600090555060010161334d565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6133b28161337d565b81146133bd57600080fd5b50565b6000813590506133cf816133a9565b92915050565b6000602082840312156133eb576133ea613373565b5b60006133f9848285016133c0565b91505092915050565b60008115159050919050565b61341781613402565b82525050565b6000602082019050613432600083018461340e565b92915050565b6000819050919050565b61344b81613438565b811461345657600080fd5b50565b60008135905061346881613442565b92915050565b60006020828403121561348457613483613373565b5b600061349284828501613459565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156134d55780820151818401526020810190506134ba565b60008484015250505050565b6000601f19601f8301169050919050565b60006134fd8261349b565b61350781856134a6565b93506135178185602086016134b7565b613520816134e1565b840191505092915050565b6000602082019050818103600083015261354581846134f2565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006135788261354d565b9050919050565b6135888161356d565b82525050565b60006020820190506135a3600083018461357f565b92915050565b6135b28161356d565b81146135bd57600080fd5b50565b6000813590506135cf816135a9565b92915050565b600080604083850312156135ec576135eb613373565b5b60006135fa858286016135c0565b925050602061360b85828601613459565b9150509250929050565b61361e81613438565b82525050565b60006020820190506136396000830184613615565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61367c826134e1565b810181811067ffffffffffffffff8211171561369b5761369a613644565b5b80604052505050565b60006136ae613369565b90506136ba8282613673565b919050565b600067ffffffffffffffff8211156136da576136d9613644565b5b602082029050602081019050919050565b600080fd5b60006137036136fe846136bf565b6136a4565b90508083825260208201905060208402830185811115613726576137256136eb565b5b835b8181101561374f578061373b8882613459565b845260208401935050602081019050613728565b5050509392505050565b600082601f83011261376e5761376d61363f565b5b813561377e8482602086016136f0565b91505092915050565b6000806040838503121561379e5761379d613373565b5b60006137ac85828601613459565b925050602083013567ffffffffffffffff8111156137cd576137cc613378565b5b6137d985828601613759565b9150509250929050565b6000806000606084860312156137fc576137fb613373565b5b600061380a868287016135c0565b935050602061381b868287016135c0565b925050604061382c86828701613459565b9150509250925092565b6000819050919050565b61384981613836565b811461385457600080fd5b50565b60008135905061386681613840565b92915050565b60006020828403121561388257613881613373565b5b600061389084828501613857565b91505092915050565b600080fd5b600067ffffffffffffffff8211156138b9576138b8613644565b5b6138c2826134e1565b9050602081019050919050565b82818337600083830152505050565b60006138f16138ec8461389e565b6136a4565b90508281526020810184848401111561390d5761390c613899565b5b6139188482856138cf565b509392505050565b600082601f8301126139355761393461363f565b5b81356139458482602086016138de565b91505092915050565b60006020828403121561396457613963613373565b5b600082013567ffffffffffffffff81111561398257613981613378565b5b61398e84828501613920565b91505092915050565b6139a081613836565b82525050565b60006020820190506139bb6000830184613997565b92915050565b600381106139ce57600080fd5b50565b6000813590506139e0816139c1565b92915050565b6000602082840312156139fc576139fb613373565b5b6000613a0a848285016139d1565b91505092915050565b600060208284031215613a2957613a28613373565b5b6000613a37848285016135c0565b91505092915050565b600060ff82169050919050565b613a5681613a40565b8114613a6157600080fd5b50565b600081359050613a7381613a4d565b92915050565b600067ffffffffffffffff821115613a9457613a93613644565b5b602082029050602081019050919050565b6000613ab8613ab384613a79565b6136a4565b90508083825260208201905060208402830185811115613adb57613ada6136eb565b5b835b81811015613b045780613af08882613857565b845260208401935050602081019050613add565b5050509392505050565b600082601f830112613b2357613b2261363f565b5b8135613b33848260208601613aa5565b91505092915050565b600080600060608486031215613b5557613b54613373565b5b6000613b6386828701613459565b9350506020613b7486828701613a64565b925050604084013567ffffffffffffffff811115613b9557613b94613378565b5b613ba186828701613b0e565b9150509250925092565b613bb48161356d565b82525050565b600067ffffffffffffffff82169050919050565b613bd781613bba565b82525050565b613be681613402565b82525050565b600062ffffff82169050919050565b613c0481613bec565b82525050565b608082016000820151613c206000850182613bab565b506020820151613c336020850182613bce565b506040820151613c466040850182613bdd565b506060820151613c596060850182613bfb565b50505050565b6000608082019050613c746000830184613c0a565b92915050565b6000604082019050613c8f600083018561340e565b613c9c602083018461340e565b9392505050565b613cac81613402565b8114613cb757600080fd5b50565b600081359050613cc981613ca3565b92915050565b60008060408385031215613ce657613ce5613373565b5b6000613cf4858286016135c0565b9250506020613d0585828601613cba565b9150509250929050565b60008060408385031215613d2657613d25613373565b5b6000613d3485828601613459565b9250506020613d45858286016135c0565b9150509250929050565b600067ffffffffffffffff821115613d6a57613d69613644565b5b613d73826134e1565b9050602081019050919050565b6000613d93613d8e84613d4f565b6136a4565b905082815260208101848484011115613daf57613dae613899565b5b613dba8482856138cf565b509392505050565b600082601f830112613dd757613dd661363f565b5b8135613de7848260208601613d80565b91505092915050565b60008060008060808587031215613e0a57613e09613373565b5b6000613e18878288016135c0565b9450506020613e29878288016135c0565b9350506040613e3a87828801613459565b925050606085013567ffffffffffffffff811115613e5b57613e5a613378565b5b613e6787828801613dc2565b91505092959194509250565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613ea881613438565b82525050565b6000613eba8383613e9f565b60208301905092915050565b6000602082019050919050565b6000613ede82613e73565b613ee88185613e7e565b9350613ef383613e8f565b8060005b83811015613f24578151613f0b8882613eae565b9750613f1683613ec6565b925050600181019050613ef7565b5085935050505092915050565b6000604082019050613f46600083018561340e565b8181036020830152613f588184613ed3565b90509392505050565b60008060408385031215613f7857613f77613373565b5b6000613f86858286016135c0565b9250506020613f97858286016135c0565b9150509250929050565b600063ffffffff82169050919050565b613fba81613fa1565b8114613fc557600080fd5b50565b600081359050613fd781613fb1565b92915050565b600060208284031215613ff357613ff2613373565b5b600061400184828501613fc8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6003811061404a5761404961400a565b5b50565b600081905061405b82614039565b919050565b600061406b8261404d565b9050919050565b61407b81614060565b82525050565b60006020820190506140966000830184614072565b92915050565b600067ffffffffffffffff8211156140b7576140b6613644565b5b602082029050602081019050919050565b60006140db6140d68461409c565b6136a4565b905080838252602082019050602084028301858111156140fe576140fd6136eb565b5b835b81811015614127578061411388826135c0565b845260208401935050602081019050614100565b5050509392505050565b600082601f8301126141465761414561363f565b5b81356141568482602086016140c8565b91505092915050565b6000806040838503121561417657614175613373565b5b600083013567ffffffffffffffff81111561419457614193613378565b5b6141a085828601614131565b925050602083013567ffffffffffffffff8111156141c1576141c0613378565b5b6141cd85828601613759565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061421e57607f821691505b602082108103614231576142306141d7565b5b50919050565b600060408201905061424c600083018561357f565b614259602083018461357f565b9392505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026142c27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614285565b6142cc8683614285565b95508019841693508086168417925050509392505050565b6000819050919050565b60006143096143046142ff84613438565b6142e4565b613438565b9050919050565b6000819050919050565b614323836142ee565b61433761432f82614310565b848454614292565b825550505050565b600090565b61434c61433f565b61435781848461431a565b505050565b5b8181101561437b57614370600082614344565b60018101905061435d565b5050565b601f8211156143c05761439181614260565b61439a84614275565b810160208510156143a9578190505b6143bd6143b585614275565b83018261435c565b50505b505050565b600082821c905092915050565b60006143e3600019846008026143c5565b1980831691505092915050565b60006143fc83836143d2565b9150826002028217905092915050565b6144158261349b565b67ffffffffffffffff81111561442e5761442d613644565b5b6144388254614206565b61444382828561437f565b600060209050601f8311600181146144765760008415614464578287015190505b61446e85826143f0565b8655506144d6565b601f19841661448486614260565b60005b828110156144ac57848901518255600182019150602085019450602081019050614487565b868310156144c957848901516144c5601f8916826143d2565b8355505b6001600288020188555050505b505050505050565b7f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000600082015250565b6000614514601e836134a6565b915061451f826144de565b602082019050919050565b6000602082019050818103600083015261454381614507565b9050919050565b7f5055424c49432053414c45204e4f54204c495645000000000000000000000000600082015250565b60006145806014836134a6565b915061458b8261454a565b602082019050919050565b600060208201905081810360008301526145af81614573565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145f082613438565b91506145fb83613438565b9250828201905080821115614613576146126145b6565b5b92915050565b7f4d4158205055424c4943204d494e544544000000000000000000000000000000600082015250565b600061464f6011836134a6565b915061465a82614619565b602082019050919050565b6000602082019050818103600083015261467e81614642565b9050919050565b7f574c2053414c45204e4f54204143544956450000000000000000000000000000600082015250565b60006146bb6012836134a6565b91506146c682614685565b602082019050919050565b600060208201905081810360008301526146ea816146ae565b9050919050565b60008160601b9050919050565b6000614709826146f1565b9050919050565b600061471b826146fe565b9050919050565b61473361472e8261356d565b614710565b82525050565b60008160f81b9050919050565b600061475182614739565b9050919050565b61476961476482613a40565b614746565b82525050565b600061477b8285614722565b60148201915061478b8284614758565b6001820191508190509392505050565b7f494e56414c49442050524f4f4600000000000000000000000000000000000000600082015250565b60006147d1600d836134a6565b91506147dc8261479b565b602082019050919050565b60006020820190508181036000830152614800816147c4565b9050919050565b7f4d415820574c204d494e54454400000000000000000000000000000000000000600082015250565b600061483d600d836134a6565b915061484882614807565b602082019050919050565b6000602082019050818103600083015261486c81614830565b9050919050565b7f414c52454144592052455645414c454400000000000000000000000000000000600082015250565b60006148a96010836134a6565b91506148b482614873565b602082019050919050565b600060208201905081810360008301526148d88161489c565b9050919050565b6148e881613bba565b82525050565b600061ffff82169050919050565b614905816148ee565b82525050565b61491481613fa1565b82525050565b600060a08201905061492f6000830188613997565b61493c60208301876148df565b61494960408301866148fc565b614956606083018561490b565b614963608083018461490b565b9695505050505050565b60008151905061497c81613442565b92915050565b60006020828403121561499857614997613373565b5b60006149a68482850161496d565b91505092915050565b60006040820190506149c46000830185613615565b6149d1602083018461490b565b9392505050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614a34602f836134a6565b9150614a3f826149d8565b604082019050919050565b60006020820190508181036000830152614a6381614a27565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000614aa482613438565b9150614aaf83613438565b925082614abf57614abe614a6a565b5b828206905092915050565b600081905092915050565b60008154614ae281614206565b614aec8186614aca565b94506001821660008114614b075760018114614b1c57614b4f565b60ff1983168652811515820286019350614b4f565b614b2585614260565b60005b83811015614b4757815481890152600182019150602081019050614b28565b838801955050505b50505092915050565b6000614b638261349b565b614b6d8185614aca565b9350614b7d8185602086016134b7565b80840191505092915050565b6000614b958285614ad5565b9150614ba18284614b58565b91508190509392505050565b7f52657175657374206e6f7420666f756e642e0000000000000000000000000000600082015250565b6000614be36012836134a6565b9150614bee82614bad565b602082019050919050565b60006020820190508181036000830152614c1281614bd6565b9050919050565b600081905092915050565b50565b6000614c34600083614c19565b9150614c3f82614c24565b600082019050919050565b6000614c5582614c27565b9150819050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614cbb6026836134a6565b9150614cc682614c5f565b604082019050919050565b60006020820190508181036000830152614cea81614cae565b9050919050565b7f4164647265737320616e6420536861726573206d75737420657175616c000000600082015250565b6000614d27601d836134a6565b9150614d3282614cf1565b602082019050919050565b60006020820190508181036000830152614d5681614d1a565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614d936020836134a6565b9150614d9e82614d5d565b602082019050919050565b60006020820190508181036000830152614dc281614d86565b9050919050565b6000604082019050614dde6000830185613615565b8181036020830152614df08184613ed3565b90509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614e3382613438565b9150614e3e83613438565b9250828202614e4c81613438565b91508282048414831517614e6357614e626145b6565b5b5092915050565b7f494e434f5252454354204554482053454e540000000000000000000000000000600082015250565b6000614ea06012836134a6565b9150614eab82614e6a565b602082019050919050565b60006020820190508181036000830152614ecf81614e93565b9050919050565b7f4d415820434150204f46204b4320455843454544454400000000000000000000600082015250565b6000614f0c6016836134a6565b9150614f1782614ed6565b602082019050919050565b60006020820190508181036000830152614f3b81614eff565b9050919050565b7f43757272656e742053616c6520697320536f6c64206f75740000000000000000600082015250565b6000614f786018836134a6565b9150614f8382614f42565b602082019050919050565b60006020820190508181036000830152614fa781614f6b565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614fd582614fae565b614fdf8185614fb9565b9350614fef8185602086016134b7565b614ff8816134e1565b840191505092915050565b6000608082019050615018600083018761357f565b615025602083018661357f565b6150326040830185613615565b81810360608301526150448184614fca565b905095945050505050565b60008151905061505e816133a9565b92915050565b60006020828403121561507a57615079613373565b5b60006150888482850161504f565b91505092915050565b600061509c82613438565b91506150a783613438565b9250826150b7576150b6614a6a565b5b828204905092915050565b60006150cd82613438565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036150ff576150fe6145b6565b5b60018201905091905056fea26469706673582212208e71033314f6f3daf92427a2bc59b1dd3171bf67a25e35034f095a970e1e77a364736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000001d0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000067388e9228301fce52e39196537fa6a6ee0a1f91000000000000000000000000012d8e2ce2716b260718abe39062a76be15570b300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044e554c4c00000000000000000000000000000000000000000000000000000000
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000009c4000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000001d0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000067388e9228301fce52e39196537fa6a6ee0a1f91000000000000000000000000012d8e2ce2716b260718abe39062a76be15570b300000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000062000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000044e554c4c00000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _team (address[]): 0x67388E9228301Fce52E39196537Fa6A6EE0a1F91,0x012D8E2cE2716B260718abE39062A76be15570B3
Arg [1] : _split (uint256[]): 98,2
Arg [2] : _preRevealURI (string): NULL
Arg [3] : _saleRoundMax (uint256): 2500
Arg [4] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [5] : _chainlinkKeyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [6] : _subscriptionId (uint64): 464
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [3] : 00000000000000000000000000000000000000000000000000000000000009c4
Arg [4] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [5] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [6] : 00000000000000000000000000000000000000000000000000000000000001d0
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [8] : 00000000000000000000000067388e9228301fce52e39196537fa6a6ee0a1f91
Arg [9] : 000000000000000000000000012d8e2ce2716b260718abe39062a76be15570b3
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000062
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [14] : 4e554c4c00000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.