Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
773 AM
Holders
264
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 AMLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AirMooncake
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; pragma solidity ^0.8.7; interface IQueryable { function tokensOfOwner(address owner) external view returns (uint256[] memory); function ownerOf(uint256 tokenId) external view returns (address); } contract AirMooncake is ERC721AQueryable, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event RevealingURIChanged(string newRevealingURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; bytes32 merkleRoot; uint256 price; } uint64 public constant MAX_TOKEN = 4000; uint64 public constant MAX_TOKEN_PER_MINT = 2; WhitelistSaleConfig public whitelistSaleConfig; bool public contractSealed; string public baseURI; string public revealingURI; address public contractAddress; mapping(uint256 => bool) public hasExchanged; constructor() ERC721A("Air Mooncake", "AM") {} /***********************************| | Core | |__________________________________*/ // ratio -> 1:2 /** * @notice exchangeSale is used for exchange sale. * The ratio is 1:2, you can mint 2 tokens per DHA. * @param tokenIds the tokens of owner. */ function exchangeSale(uint256[] calldata tokenIds) external payable callerIsUser nonReentrant { uint256 size = tokenIds.length; require(isWhitelistSaleEnabled(), "exchange sale has not enabled"); require(size > 0, "invalid number of tokens"); require(isDHATokensEnabled(tokenIds), "all DHA tokens has not enabled"); uint64 numberOfTokens = uint64(size) * 2; require( totalMinted() + numberOfTokens <= MAX_TOKEN, "max supply exceeded" ); uint256 price = getWhitelistSalePrice(); uint256 amount = price * numberOfTokens; require(amount <= msg.value, "ether value sent is not correct"); for (uint256 i = 0; i < size; i++) { hasExchanged[tokenIds[i]] = true; } _safeMint(_msgSender(), numberOfTokens); } /** * @notice giveaway is used for airdropping to specific addresses. * The issuer also reserves tokens through this method. * This process is under the supervision of the community. * @param address_ the target address of airdrop * @param numberOfTokens_ the number of airdrop */ function giveaway(address address_, uint64 numberOfTokens_) external onlyOwner nonReentrant { require(address_ != address(0), "zero address"); require(numberOfTokens_ > 0, "invalid number of tokens"); require( totalMinted() + numberOfTokens_ <= MAX_TOKEN, "max supply exceeded" ); _safeMint(address_, numberOfTokens_); } /** * @notice whitelistSale is used for whitelist sale. * @param numberOfTokens_ quantity * @param signature_ merkle proof */ function whitelistSale( uint64 numberOfTokens_, bytes32[] calldata signature_ ) external payable callerIsUser nonReentrant { require(isWhitelistSaleEnabled(), "whitelist sale has not enabled"); require( isWhitelistAddress(_msgSender(), signature_), "caller is not in whitelist or invalid signature" ); uint64 whitelistMinted = _getAux(_msgSender()) + numberOfTokens_; require( whitelistMinted <= whitelistSaleConfig.mintQuota, "max mint amount per wallet exceeded" ); _sale(numberOfTokens_, getWhitelistSalePrice()); _setAux(_msgSender(), whitelistMinted); } /** * @notice internal method, _sale is used to sell tokens at the specified unit price. * @param numberOfTokens_ quantity * @param price_ unit price */ function _sale(uint64 numberOfTokens_, uint256 price_) internal { require(numberOfTokens_ > 0, "invalid number of tokens"); require( numberOfTokens_ <= MAX_TOKEN_PER_MINT, "can only mint MAX_TOKEN_PER_MINT tokens at a time" ); require( totalMinted() + numberOfTokens_ <= MAX_TOKEN, "max supply exceeded" ); uint256 amount = price_ * numberOfTokens_; require(amount <= msg.value, "ether value sent is not correct"); _safeMint(_msgSender(), numberOfTokens_); refundExcessPayment(amount); } /** * @notice when the amount paid by the user exceeds the actual need, the refund logic will be executed. * @param amount_ the actual amount that should be paid */ function refundExcessPayment(uint256 amount_) private { if (msg.value > amount_) { payable(_msgSender()).transfer(msg.value - amount_); } } /** * @notice issuer withdraws the ETH temporarily stored in the contract through this method. */ function withdraw() external onlyOwner nonReentrant { uint256 balance = address(this).balance; payable(_msgSender()).transfer(balance); emit Withdraw(_msgSender(), balance); } /***********************************| | Getter | |__________________________________*/ function exchangeableTokensOfOwner(address owner) external view virtual returns (uint256[] memory) { uint256[] memory tokens = IQueryable(contractAddress).tokensOfOwner( owner ); uint256 size = 0; for (uint256 i = 0; i < tokens.length; ++i) { if (hasExchanged[tokens[i]] == false) { ++size; } } uint256 j = 0; uint256[] memory exchangeableTokens = new uint256[](size); for (uint256 i = 0; i < tokens.length; ++i) { if (hasExchanged[tokens[i]] == false) { exchangeableTokens[j++] = tokens[i]; } } return exchangeableTokens; } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual override returns (uint256) { return 1; } /** * @notice isWhitelistSaleEnabled is used to return whether whitelist sale has been enabled. */ function isWhitelistSaleEnabled() public view returns (bool) { return whitelistSaleConfig.startTime > 0 && block.timestamp > whitelistSaleConfig.startTime && whitelistSaleConfig.price >= 0 && whitelistSaleConfig.merkleRoot != ""; } /** * @notice isDHATokensEnabled is used to verify whether all dha tokens belong to sender and exchangeable. */ function isDHATokensEnabled(uint256[] calldata tokenIds) internal view returns (bool) { uint256 size = tokenIds.length; address sender = _msgSender(); for (uint256 i = 0; i < size; ++i) { if (hasExchanged[tokenIds[i]]) { return false; } address owner = IQueryable(contractAddress).ownerOf(tokenIds[i]); if (owner != sender) { return false; } } return true; } /** * @notice isWhitelistAddress is used to verify whether the given address_ and signature_ belong to merkleRoot. * @param address_ address of the caller * @param signature_ merkle proof */ function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { if (whitelistSaleConfig.merkleRoot == "") { return false; } return MerkleProof.verify( signature_, whitelistSaleConfig.merkleRoot, keccak256(abi.encodePacked(address_)) ); } /** * @notice getWhitelistSalePrice is used to get the price of the whitelist sale. * @return price */ function getWhitelistSalePrice() public view returns (uint256) { return whitelistSaleConfig.price; } /** * @notice totalMinted is used to return the total number of tokens minted. * Note that it does not decrease as the token is burnt. */ function totalMinted() public view returns (uint256) { return _totalMinted(); } /** * @notice _baseURI is used to override the _baseURI method. * @return baseURI */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI_ = _baseURI(); if (bytes(baseURI_).length == 0) { return revealingURI; } return string(abi.encodePacked(baseURI_, _toString(tokenId), ".json")); } /***********************************| | Setter | |__________________________________*/ function setContractAddress(address contractAddress_) external onlyOwner { contractAddress = contractAddress_; } /** * @notice setBaseURI is used to set the base URI in special cases. * @param baseURI_ baseURI */ function setBaseURI(string calldata baseURI_) external onlyOwner { baseURI = baseURI_; emit BaseURIChanged(baseURI_); } /** * @notice setRevealingURI is used to set the revealing URI in special cases. * @param revealingURI_ revealingURI */ function setRevealingURI(string calldata revealingURI_) external onlyOwner { revealingURI = revealingURI_; emit RevealingURIChanged(revealingURI_); } /** * @notice setWhitelistSaleConfig is used to set the configuration related to whitelist sale. * This process is under the supervision of the community. * @param config_ config */ function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { require(config_.price >= 0, "sale price must greater than zero"); whitelistSaleConfig = config_; emit WhitelistSaleConfigChanged(config_); } /***********************************| | Pause | |__________________________________*/ /** * @notice hook function, used to intercept the transfer of token. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { super._beforeTokenTransfers(from, to, startTokenId, quantity); require(!paused(), "token transfer paused"); } /** * @notice for the purpose of protecting user assets, under extreme conditions, * the circulation of all tokens in the contract needs to be frozen. * This process is under the supervision of the community. */ function emergencyPause() external onlyOwner notSealed { _pause(); } /** * @notice unpause the contract */ function unpause() external onlyOwner notSealed { _unpause(); } /** * @notice when the project is stable enough, the issuer will call sealContract * to give up the permission to call emergencyPause and unpause. */ function sealContract() external onlyOwner { contractSealed = true; emit ContractSealed(); } /***********************************| | Modifier | |__________________________________*/ /** * @notice for security reasons, CA is not allowed to call sensitive methods. */ modifier callerIsUser() { require(tx.origin == _msgSender(), "caller is another contract"); _; } /** * @notice function call is only allowed when the contract has not been sealed */ modifier notSealed() { require(!contractSealed, "contract sealed"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// 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.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * 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. */ 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 proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _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} * * _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 the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _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} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // 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 { // Reference type for token approval. 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 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 { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _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]`. 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 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 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 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. 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`. ) 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 0x80 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // 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.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // 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(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * 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; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @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; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // 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 import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; pragma solidity ^0.8.7; contract DunhuangArt is ERC721AQueryable, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RefundGuaranteeConfigChanged(RefundGuaranteeConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; uint256 discountPrice; bytes32 discountMerkleRoot; } struct PublicSaleConfig { uint256 startTime; uint256 price; } struct RefundGuaranteeConfig { uint256 endTime; address refundAddress; } uint64 public constant MAX_TOKEN = 3000; uint64 public constant MAX_TOKEN_PER_MINT = 2; WhitelistSaleConfig public whitelistSaleConfig; PublicSaleConfig public publicSaleConfig; RefundGuaranteeConfig public refundGuaranteeConfig; bool public contractSealed; string public baseURI; string public revealingURI; uint256[7] private discountFields = [0, 0, 0, 0, 0, 0, 0]; mapping(uint256 => bool) public hasRefunded; constructor() ERC721A("Dunhuang Art", "DHA") {} /***********************************| | Core | |__________________________________*/ function refund(uint256[] calldata tokenIds) external nonReentrant { require(isRefundGuaranteeActive(), "Refund expired"); uint256 refundAmount = 0; for (uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require(_msgSender() == ownerOf(tokenId), "Not token owner"); require(!hasRefunded[tokenId], "Already refunded"); hasRefunded[tokenId] = true; transferFrom( _msgSender(), refundGuaranteeConfig.refundAddress, tokenId ); if (isTokenDiscountSale(tokenId)) { refundAmount += whitelistSaleConfig.discountPrice; } else { refundAmount += publicSaleConfig.price; } } payable(_msgSender()).transfer(refundAmount); } /** * @notice giveaway is used for airdropping to specific addresses. * The issuer also reserves tokens through this method. * This process is under the supervision of the community. * @param address_ the target address of airdrop * @param numberOfTokens_ the number of airdrop */ function giveaway(address address_, uint64 numberOfTokens_) external onlyOwner nonReentrant { require(address_ != address(0), "zero address"); require(numberOfTokens_ > 0, "invalid number of tokens"); require( totalMinted() + numberOfTokens_ <= MAX_TOKEN, "max supply exceeded" ); _safeMint(address_, numberOfTokens_); } /** * @notice whitelistSale is used for whitelist sale. * @param numberOfTokens_ quantity * @param signature_ merkel proof * @param discountSignature_ discount merkel proof */ function whitelistSale( uint64 numberOfTokens_, bytes32[] calldata signature_, bytes32[] calldata discountSignature_ ) external payable callerIsUser nonReentrant { require(isWhitelistSaleEnabled(), "whitelist sale has not enabled"); require( isWhitelistAddress(_msgSender(), signature_), "caller is not in whitelist or invalid signature" ); uint64 whitelistMinted = _getAux(_msgSender()) + numberOfTokens_; require( whitelistMinted <= whitelistSaleConfig.mintQuota, "max mint amount per wallet exceeded" ); uint256 price; if (isDiscountAddress(_msgSender(), discountSignature_)) { price = getWhitelistDiscountPrice(); uint256 startTokenId = _nextTokenId(); uint256 end = startTokenId + numberOfTokens_; for (uint256 i = startTokenId; i < end; i++) { setTokenDiscountSale(i); } } else { price = getWhitelistSalePrice(); } _sale(numberOfTokens_, price); _setAux(_msgSender(), whitelistMinted); } /** * @notice publicSale is used for public sale. * @param numberOfTokens_ quantity */ function publicSale(uint64 numberOfTokens_) external payable callerIsUser nonReentrant { require(isPublicSaleEnabled(), "public sale has not enabled"); _sale(numberOfTokens_, getPublicSalePrice()); } /** * @notice internal method, _sale is used to sell tokens at the specified unit price. * @param numberOfTokens_ quantity * @param price_ unit price */ function _sale(uint64 numberOfTokens_, uint256 price_) internal { require(numberOfTokens_ > 0, "invalid number of tokens"); require( numberOfTokens_ <= MAX_TOKEN_PER_MINT, "can only mint MAX_TOKEN_PER_MINT tokens at a time" ); require( totalMinted() + numberOfTokens_ <= MAX_TOKEN, "max supply exceeded" ); uint256 amount = price_ * numberOfTokens_; require(amount <= msg.value, "ether value sent is not correct"); _safeMint(_msgSender(), numberOfTokens_); refundExcessPayment(amount); } /** * @notice when the amount paid by the user exceeds the actual need, the refund logic will be executed. * @param amount_ the actual amount that should be paid */ function refundExcessPayment(uint256 amount_) private { if (msg.value > amount_) { payable(_msgSender()).transfer(msg.value - amount_); } } /** * @notice issuer withdraws the ETH temporarily stored in the contract through this method. */ function withdraw() external onlyOwner nonReentrant { require( block.timestamp > refundGuaranteeConfig.endTime, "Refund period not over" ); uint256 balance = address(this).balance; payable(_msgSender()).transfer(balance); emit Withdraw(_msgSender(), balance); } /***********************************| | Getter | |__________________________________*/ function isTokenRefunded(uint256 tokenId_) public view returns (bool) { return hasRefunded[tokenId_]; } function refundableTokensOfOwner(address owner) external view virtual returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for ( uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i ) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } uint256 size = 0; for (uint256 i = 0; i < tokenIds.length; ++i) { if (isTokenRefunded(tokenIds[i]) == false) { ++size; } } uint256 j = 0; uint256[] memory refundableTokens = new uint256[](size); for (uint256 i = 0; i < tokenIds.length; ++i) { if (isTokenRefunded(tokenIds[i]) == false) { refundableTokens[j++] = tokenIds[i]; } } return refundableTokens; } } function isRefundGuaranteeActive() public view returns (bool) { return (block.timestamp <= refundGuaranteeConfig.endTime); } function getRefundGuaranteeEndTime() public view returns (uint256) { return refundGuaranteeConfig.endTime; } function isTokenDiscountSale(uint256 tokenId_) public view returns (bool) { if (tokenId_ >= discountFields.length * 256) { return false; } uint256 i = tokenId_ / 256; uint256 j = tokenId_ % 256; return discountFields[i] & (1 << j) != 0; } function setTokenDiscountSale(uint256 tokenId_) private { require(tokenId_ < discountFields.length * 256, "out of range"); uint256 i = tokenId_ / 256; uint256 j = tokenId_ % 256; discountFields[i] = discountFields[i] | (1 << j); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual override returns (uint256) { return 1; } /** * @notice isWhitelistSaleEnabled is used to return whether whitelist sale has been enabled. */ function isWhitelistSaleEnabled() public view returns (bool) { if ( whitelistSaleConfig.endTime > 0 && block.timestamp > whitelistSaleConfig.endTime ) { return false; } return whitelistSaleConfig.startTime > 0 && block.timestamp > whitelistSaleConfig.startTime && whitelistSaleConfig.price > 0 && whitelistSaleConfig.merkleRoot != ""; } /** * @notice isPublicSaleEnabled is used to return whether the public sale has been enabled. */ function isPublicSaleEnabled() public view returns (bool) { return publicSaleConfig.startTime > 0 && block.timestamp > publicSaleConfig.startTime && publicSaleConfig.price > 0; } /** * @notice isDiscountAddress is used to verify whether the given address_ and signature_ belong to discountMerkleRoot. * @param address_ address of the caller * @param signature_ merkle proof */ function isDiscountAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { if (whitelistSaleConfig.discountMerkleRoot == "") { return false; } return MerkleProof.verify( signature_, whitelistSaleConfig.discountMerkleRoot, keccak256(abi.encodePacked(address_)) ); } /** * @notice isWhitelistAddress is used to verify whether the given address_ and signature_ belong to merkleRoot. * @param address_ address of the caller * @param signature_ merkle proof */ function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { if (whitelistSaleConfig.merkleRoot == "") { return false; } return MerkleProof.verify( signature_, whitelistSaleConfig.merkleRoot, keccak256(abi.encodePacked(address_)) ); } /** * @notice getPublicSalePrice is used to get the price of the public sale. * @return price */ function getPublicSalePrice() public view returns (uint256) { return publicSaleConfig.price; } /** * @notice getWhitelistDiscountPrice is used to get the price of the whitelist discount sale. * @return discountPrice */ function getWhitelistDiscountPrice() public view returns (uint256) { return whitelistSaleConfig.discountPrice; } /** * @notice getWhitelistSalePrice is used to get the price of the whitelist sale. * @return price */ function getWhitelistSalePrice() public view returns (uint256) { return whitelistSaleConfig.price; } /** * @notice totalMinted is used to return the total number of tokens minted. * Note that it does not decrease as the token is burnt. */ function totalMinted() public view returns (uint256) { return _totalMinted(); } /** * @notice _baseURI is used to override the _baseURI method. * @return baseURI */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI_ = _baseURI(); if (bytes(baseURI_).length == 0) { return revealingURI; } return string(abi.encodePacked(baseURI_, _toString(tokenId), ".json")); } /***********************************| | Setter | |__________________________________*/ /** * @notice setBaseURI is used to set the base URI in special cases. * @param baseURI_ baseURI */ function setBaseURI(string calldata baseURI_) external onlyOwner { baseURI = baseURI_; emit BaseURIChanged(baseURI_); } /** * @notice setRevealingURI is used to set the revealing URI in special cases. * @param revealingURI_ revealingURI */ function setRevealingURI(string calldata revealingURI_) external onlyOwner { revealingURI = revealingURI_; } /** * @notice setRefundGuaranteeConfig is used to set the configuration related to refund. * This process is under the supervision of the community. * @param config_ config */ function setRefundGuaranteeConfig(RefundGuaranteeConfig calldata config_) external onlyOwner { require( config_.refundAddress != address(0), "refund address must not be zero" ); require( config_.endTime >= refundGuaranteeConfig.endTime, "end time only delay" ); refundGuaranteeConfig = config_; emit RefundGuaranteeConfigChanged(config_); } /** * @notice setWhitelistSaleConfig is used to set the configuration related to whitelist sale. * This process is under the supervision of the community. * @param config_ config */ function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { require(config_.price > 0, "sale price must greater than zero"); require( config_.discountPrice > 0, "discount price must greater than zero" ); whitelistSaleConfig = config_; emit WhitelistSaleConfigChanged(config_); } /** * @notice setPublicSaleConfig is used to set the configuration related to public sale. * This process is under the supervision of the community. * @param config_ config */ function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { require(config_.price > 0, "sale price must greater than zero"); publicSaleConfig = config_; emit PublicSaleConfigChanged(config_); } /***********************************| | Pause | |__________________________________*/ /** * @notice hook function, used to intercept the transfer of token. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { super._beforeTokenTransfers(from, to, startTokenId, quantity); require(!paused(), "token transfer paused"); } /** * @notice for the purpose of protecting user assets, under extreme conditions, * the circulation of all tokens in the contract needs to be frozen. * This process is under the supervision of the community. */ function emergencyPause() external onlyOwner notSealed { _pause(); } /** * @notice unpause the contract */ function unpause() external onlyOwner notSealed { _unpause(); } /** * @notice when the project is stable enough, the issuer will call sealContract * to give up the permission to call emergencyPause and unpause. */ function sealContract() external onlyOwner { contractSealed = true; emit ContractSealed(); } /***********************************| | Modifier | |__________________________________*/ /** * @notice for security reasons, CA is not allowed to call sensitive methods. */ modifier callerIsUser() { require(tx.origin == _msgSender(), "caller is another contract"); _; } /** * @notice function call is only allowed when the contract has not been sealed */ modifier notSealed() { require(!contractSealed, "contract sealed"); _; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newBaseURI","type":"string"}],"name":"BaseURIChanged","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":[],"name":"ContractSealed","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":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"newRevealingURI","type":"string"}],"name":"RevealingURIChanged","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint64","name":"mintQuota","type":"uint64"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct AirMooncake.WhitelistSaleConfig","name":"config","type":"tuple"}],"name":"WhitelistSaleConfigChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_TOKEN","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKEN_PER_MINT","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"exchangeSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"exchangeableTokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"},{"internalType":"uint64","name":"numberOfTokens_","type":"uint64"}],"name":"giveaway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"hasExchanged","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"},{"internalType":"bytes32[]","name":"signature_","type":"bytes32[]"}],"name":"isWhitelistAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistSaleEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealingURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress_","type":"address"}],"name":"setContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"revealingURI_","type":"string"}],"name":"setRevealingURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"mintQuota","type":"uint64"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct AirMooncake.WhitelistSaleConfig","name":"config_","type":"tuple"}],"name":"setWhitelistSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"numberOfTokens_","type":"uint64"},{"internalType":"bytes32[]","name":"signature_","type":"bytes32[]"}],"name":"whitelistSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"whitelistSaleConfig","outputs":[{"internalType":"uint64","name":"mintQuota","type":"uint64"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040518060400160405280600c81526020016b416972204d6f6f6e63616b6560a01b81525060405180604001604052806002815260200161414d60f01b81525081600290805190602001906200006a929190620000fd565b50805162000080906003906020840190620000fd565b50506001600055506200009333620000ab565b6008805460ff60a01b191690556001600955620001e0565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200010b90620001a3565b90600052602060002090601f0160209004810192826200012f57600085556200017a565b82601f106200014a57805160ff19168380011785556200017a565b828001600101855582156200017a579182015b828111156200017a5782518255916020019190600101906200015d565b50620001889291506200018c565b5090565b5b808211156200018857600081556001016200018d565b600181811c90821680620001b857607f821691505b60208210811415620001da57634e487b7160e01b600052602260045260246000fd5b50919050565b6136ee80620001f06000396000f3fe6080604052600436106102fd5760003560e01c80636e1bd3231161018f578063bd28c354116100e1578063e1add7d41161008a578063ecbd68df11610064578063ecbd68df146108a9578063f2fde38b146108be578063f6b4dfb4146108de57600080fd5b8063e1add7d41461082d578063e61f84401461084d578063e985e9c51461086057600080fd5b8063cea73a25116100bb578063cea73a25146107da578063d41da0e0146107ed578063def601261461080d57600080fd5b8063bd28c35414610778578063c23dc68f1461078d578063c87b56dd146107ba57600080fd5b806395d89b4111610143578063a2309ff81161011d578063a2309ff814610725578063b65016371461073e578063b88d4fde1461075857600080fd5b806395d89b41146106d057806399a2557a146106e5578063a22cb4651461070557600080fd5b8063715018a611610174578063715018a61461067d5780638462151c146106925780638da5cb5b146106b257600080fd5b80636e1bd3231461064757806370a082311461065d57600080fd5b80634a9a7864116102535780635bbb2177116101fc578063656cf918116101d6578063656cf918146105c557806368bd580e1461061d5780636c0360eb1461063257600080fd5b80635bbb2177146105595780635c975abb146105865780636352211e146105a557600080fd5b806355f804b31161022d57806355f804b3146104db578063576fd94d146104fb5780635b5d54281461052957600080fd5b80634a9a78641461048457806351858e271461049957806354d5e7f8146104ae57600080fd5b806318160ddd116102b55780633f4ba83a1161028f5780633f4ba83a1461042f57806342842e0e14610444578063477bddaa1461046457600080fd5b806318160ddd146103d357806323b872dd146103fa5780633ccfd60b1461041a57600080fd5b8063081812fc116102e6578063081812fc14610359578063089cf9f914610391578063095ea7b3146103b357600080fd5b806301ffc9a71461030257806306fdde0314610337575b600080fd5b34801561030e57600080fd5b5061032261031d366004612daf565b6108fe565b60405190151581526020015b60405180910390f35b34801561034357600080fd5b5061034c61099b565b60405161032e9190612e24565b34801561036557600080fd5b50610379610374366004612e37565b610a2d565b6040516001600160a01b03909116815260200161032e565b34801561039d57600080fd5b506103b16103ac366004612e50565b610a8a565b005b3480156103bf57600080fd5b506103b16103ce366004612e7d565b610aea565b3480156103df57600080fd5b5060015460005403600019015b60405190815260200161032e565b34801561040657600080fd5b506103b1610415366004612ea9565b610bb0565b34801561042657600080fd5b506103b1610d9a565b34801561043b57600080fd5b506103b1610e67565b34801561045057600080fd5b506103b161045f366004612ea9565b610ecc565b34801561047057600080fd5b506103b161047f366004612eea565b610eec565b34801561049057600080fd5b5061034c610f23565b3480156104a557600080fd5b506103b1610fb1565b3480156104ba57600080fd5b506104ce6104c9366004612eea565b611014565b60405161032e9190612f07565b3480156104e757600080fd5b506103b16104f6366004612f3f565b611202565b34801561050757600080fd5b50610510600281565b60405167ffffffffffffffff909116815260200161032e565b34801561053557600080fd5b50610322610544366004612e37565b60126020526000908152604090205460ff1681565b34801561056557600080fd5b50610579610574366004612ffd565b611254565b60405161032e919061303f565b34801561059257600080fd5b50600854600160a01b900460ff16610322565b3480156105b157600080fd5b506103796105c0366004612e37565b611320565b3480156105d157600080fd5b50600a54600b54600c54600d546105f29367ffffffffffffffff1692919084565b6040805167ffffffffffffffff9095168552602085019390935291830152606082015260800161032e565b34801561062957600080fd5b506103b161132b565b34801561063e57600080fd5b5061034c61136b565b34801561065357600080fd5b50610510610fa081565b34801561066957600080fd5b506103ec610678366004612eea565b611378565b34801561068957600080fd5b506103b16113e0565b34801561069e57600080fd5b506104ce6106ad366004612eea565b6113f2565b3480156106be57600080fd5b506008546001600160a01b0316610379565b3480156106dc57600080fd5b5061034c6114fd565b3480156106f157600080fd5b506104ce6107003660046130bc565b61150c565b34801561071157600080fd5b506103b16107203660046130f1565b6116b1565b34801561073157600080fd5b50600054600019016103ec565b34801561074a57600080fd5b50600e546103229060ff1681565b34801561076457600080fd5b506103b1610773366004613176565b611765565b34801561078457600080fd5b50600d546103ec565b34801561079957600080fd5b506107ad6107a8366004612e37565b6117af565b60405161032e919061323a565b3480156107c657600080fd5b5061034c6107d5366004612e37565b611837565b6103b16107e8366004612ffd565b611953565b3480156107f957600080fd5b5061032261080836600461327f565b611c71565b34801561081957600080fd5b506103b1610828366004612f3f565b611d01565b34801561083957600080fd5b506103b16108483660046132ea565b611d47565b6103b161085b366004613318565b611ee7565b34801561086c57600080fd5b5061032261087b366004613338565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108b557600080fd5b50610322612164565b3480156108ca57600080fd5b506103b16108d9366004612eea565b612193565b3480156108ea57600080fd5b50601154610379906001600160a01b031681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316148061096157507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b8061099557507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600280546109aa90613366565b80601f01602080910402602001604051908101604052809291908181526020018280546109d690613366565b8015610a235780601f106109f857610100808354040283529160200191610a23565b820191906000526020600020905b815481529060010190602001808311610a0657829003601f168201915b5050505050905090565b6000610a3882612223565b610a6e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b610a92612258565b610aa0565b60405180910390fd5b80600a610aad828261339b565b9050507fac21250a6d4b0f5d657e054b0a47e1c748a4aa3750c69e5dd836c16bc0d79a0281604051610adf91906133e4565b60405180910390a150565b6000610af582611320565b9050336001600160a01b03821614610b4757610b11813361087b565b610b47576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610bbb826122b2565b9050836001600160a01b0316816001600160a01b031614610c08576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610c6e57610c38863361087b565b610c6e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610cae576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cbb8686866001612334565b8015610cc657600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610d515760018401600081815260046020526040902054610d4f576000548114610d4f5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610da2612258565b60026009541415610df55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b60026009556040514790339082156108fc029083906000818181858888f19350505050158015610e29573d6000803e3d6000fd5b5060405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506001600955565b610e6f612258565b600e5460ff1615610ec25760405162461bcd60e51b815260206004820152600f60248201527f636f6e7472616374207365616c656400000000000000000000000000000000006044820152606401610a97565b610eca61238e565b565b610ee783838360405180602001604052806000815250611765565b505050565b610ef4612258565b6011805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60108054610f3090613366565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5c90613366565b8015610fa95780601f10610f7e57610100808354040283529160200191610fa9565b820191906000526020600020905b815481529060010190602001808311610f8c57829003601f168201915b505050505081565b610fb9612258565b600e5460ff161561100c5760405162461bcd60e51b815260206004820152600f60248201527f636f6e7472616374207365616c656400000000000000000000000000000000006044820152606401610a97565b610eca6123e3565b6011546040517f8462151c0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152606092600092911690638462151c9060240160006040518083038186803b15801561107757600080fd5b505afa15801561108b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110b39190810190613425565b90506000805b825181101561111657601260008483815181106110d8576110d86134cb565b60209081029190910181015182528101919091526040016000205460ff1661110657611103826134f7565b91505b61110f816134f7565b90506110b9565b506000808267ffffffffffffffff8111156111335761113361312f565b60405190808252806020026020018201604052801561115c578160200160208202803683370190505b50905060005b84518110156111f85760126000868381518110611181576111816134cb565b60209081029190910181015182528101919091526040016000205460ff166111e8578481815181106111b5576111b56134cb565b60200260200101518284806111c9906134f7565b9550815181106111db576111db6134cb565b6020026020010181815250505b6111f1816134f7565b9050611162565b5095945050505050565b61120a612258565b611216600f8383612d00565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68282604051611248929190613512565b60405180910390a15050565b60608160008167ffffffffffffffff8111156112725761127261312f565b6040519080825280602002602001820160405280156112c457816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816112905790505b50905060005b828114611317576112f28686838181106112e6576112e66134cb565b905060200201356117af565b828281518110611304576113046134cb565b60209081029190910101526001016112ca565b50949350505050565b6000610995826122b2565b611333612258565b600e805460ff191660011790556040517fa0058887862c892ade184993a48c672897bca2e36ebf7fa2b4703d4805fc3a0190600090a1565b600f8054610f3090613366565b60006001600160a01b0382166113ba576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6113e8612258565b610eca6000612426565b6060600080600061140285611378565b905060008167ffffffffffffffff81111561141f5761141f61312f565b604051908082528060200260200182016040528015611448578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b8386146114f15761148381612485565b9150816040015115611494576114e9565b81516001600160a01b0316156114a957815194505b876001600160a01b0316856001600160a01b031614156114e957808387806001019850815181106114dc576114dc6134cb565b6020026020010181815250505b600101611473565b50909695505050505050565b6060600380546109aa90613366565b6060818310611547576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061155360005490565b9050600185101561156357600194505b8084111561156f578093505b600061157a87611378565b9050848610156115995785850381811015611593578091505b5061159d565b5060005b60008167ffffffffffffffff8111156115b8576115b861312f565b6040519080825280602002602001820160405280156115e1578160200160208202803683370190505b509050816115f45793506116aa92505050565b60006115ff886117af565b905060008160400151611610575080515b885b8881141580156116225750848714155b1561169e5761163081612485565b925082604001511561164157611696565b82516001600160a01b03161561165657825191505b8a6001600160a01b0316826001600160a01b031614156116965780848880600101995081518110611689576116896134cb565b6020026020010181815250505b600101611612565b50505092835250909150505b9392505050565b6001600160a01b0382163314156116f4576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b905090565b611770848484610bb0565b6001600160a01b0383163b156117a95761178c84848484612504565b6117a9576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061180857506000548310155b156118135792915050565b61181c83612485565b905080604001511561182e5792915050565b6116aa836125fb565b606061184282612223565b611878576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611882612673565b9050805160001415611921576010805461189b90613366565b80601f01602080910402602001604051908101604052809291908181526020018280546118c790613366565b80156119145780601f106118e957610100808354040283529160200191611914565b820191906000526020600020905b8154815290600101906020018083116118f757829003601f168201915b5050505050915050919050565b8061192b84612682565b60405160200161193c929190613541565b604051602081830303815290604052915050919050565b3233146119a25760405162461bcd60e51b815260206004820152601a60248201527f63616c6c657220697320616e6f7468657220636f6e74726163740000000000006044820152606401610a97565b600260095414156119f55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b600260095580611a03612164565b611a4f5760405162461bcd60e51b815260206004820152601d60248201527f65786368616e67652073616c6520686173206e6f7420656e61626c65640000006044820152606401610a97565b60008111611a9f5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e756d626572206f6620746f6b656e7300000000000000006044820152606401610a97565b611aa983836126c4565b611af55760405162461bcd60e51b815260206004820152601e60248201527f616c6c2044484120746f6b656e7320686173206e6f7420656e61626c656400006044820152606401610a97565b6000611b02826002613598565b9050610fa067ffffffffffffffff8216611b1f6000546000190190565b611b2991906135c8565b1115611b775760405162461bcd60e51b815260206004820152601360248201527f6d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a97565b6000611b82600d5490565b90506000611b9a67ffffffffffffffff8416836135e0565b905034811115611bec5760405162461bcd60e51b815260206004820152601f60248201527f65746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a97565b60005b84811015611c4e57600160126000898985818110611c0f57611c0f6134cb565b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611c46906134f7565b915050611bef565b50611c64335b8467ffffffffffffffff166127f6565b5050600160095550505050565b600c54600090611c83575060006116aa565b611cf983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c546040516bffffffffffffffffffffffff1960608b901b166020820152909250603401905060405160208183030381529060405280519060200120612814565b949350505050565b611d09612258565b611d1560108383612d00565b507f912509518a3aad94b6defb989c176d5c3e8dfde19dc0d77cad24d6cd8a06bc808282604051611248929190613512565b611d4f612258565b60026009541415611da25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b60026009556001600160a01b038216611dfd5760405162461bcd60e51b815260206004820152600c60248201527f7a65726f206164647265737300000000000000000000000000000000000000006044820152606401610a97565b60008167ffffffffffffffff1611611e575760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e756d626572206f6620746f6b656e7300000000000000006044820152606401610a97565b610fa067ffffffffffffffff8216611e726000546000190190565b611e7c91906135c8565b1115611eca5760405162461bcd60e51b815260206004820152601360248201527f6d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a97565b611ede828267ffffffffffffffff166127f6565b50506001600955565b323314611f365760405162461bcd60e51b815260206004820152601a60248201527f63616c6c657220697320616e6f7468657220636f6e74726163740000000000006044820152606401610a97565b60026009541415611f895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b6002600955611f96612164565b611fe25760405162461bcd60e51b815260206004820152601e60248201527f77686974656c6973742073616c6520686173206e6f7420656e61626c656400006044820152606401610a97565b611fed338383611c71565b61205f5760405162461bcd60e51b815260206004820152602f60248201527f63616c6c6572206973206e6f7420696e2077686974656c697374206f7220696e60448201527f76616c6964207369676e617475726500000000000000000000000000000000006064820152608401610a97565b3360009081526005602052604081205461207d90859060c01c6135ff565b600a5490915067ffffffffffffffff90811690821611156121065760405162461bcd60e51b815260206004820152602360248201527f6d6178206d696e7420616d6f756e74207065722077616c6c657420657863656560448201527f64656400000000000000000000000000000000000000000000000000000000006064820152608401610a97565b61211884612113600d5490565b61282a565b612159336001600160a01b03166000908152600560205260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff1660c084901b179055565b505060016009555050565b600b54600090158015906121795750600b5442115b8015612183575060015b8015611760575050600c54151590565b61219b612258565b6001600160a01b0381166122175760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a97565b61222081612426565b50565b600081600111158015612237575060005482105b8015610995575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b03163314610eca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a97565b600081806001116123025760005481101561230257600081815260046020526040902054600160e01b8116612300575b806116aa5750600019016000818152600460205260409020546122e2565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600160a01b900460ff16156117a95760405162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e736665722070617573656400000000000000000000006044820152606401610a97565b6123966129f2565b6008805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6123eb612a4b565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123c63390565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461099590604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061253990339089908890889060040161362b565b602060405180830381600087803b15801561255357600080fd5b505af1925050508015612583575060408051601f3d908101601f1916820190925261258091810190613667565b60015b6125de573d8080156125b1576040519150601f19603f3d011682016040523d82523d6000602084013e6125b6565b606091505b5080516125d6576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261099561262b836122b2565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6060600f80546109aa90613366565b604080516080019081905280825b600183039250600a81066030018353600a9004806126ad576126b2565b612690565b50819003601f19909101908152919050565b60008133825b828110156127ea57601260008787848181106126e8576126e86134cb565b602090810292909201358352508101919091526040016000205460ff16156127165760009350505050610995565b6011546000906001600160a01b0316636352211e88888581811061273c5761273c6134cb565b905060200201356040518263ffffffff1660e01b815260040161276191815260200190565b60206040518083038186803b15801561277957600080fd5b505afa15801561278d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127b19190613684565b9050826001600160a01b0316816001600160a01b0316146127d9576000945050505050610995565b506127e3816134f7565b90506126ca565b50600195945050505050565b612810828260405180602001604052806000815250612aa5565b5050565b6000826128218584612b12565b14949350505050565b60008267ffffffffffffffff16116128845760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e756d626572206f6620746f6b656e7300000000000000006044820152606401610a97565b600267ffffffffffffffff831611156129055760405162461bcd60e51b815260206004820152603160248201527f63616e206f6e6c79206d696e74204d41585f544f4b454e5f5045525f4d494e5460448201527f20746f6b656e7320617420612074696d650000000000000000000000000000006064820152608401610a97565b610fa067ffffffffffffffff83166129206000546000190190565b61292a91906135c8565b11156129785760405162461bcd60e51b815260206004820152601360248201527f6d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a97565b600061298e67ffffffffffffffff8416836135e0565b9050348111156129e05760405162461bcd60e51b815260206004820152601f60248201527f65746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a97565b6129e933611c54565b610ee781612b5f565b600854600160a01b900460ff16610eca5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a97565b600854600160a01b900460ff1615610eca5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a97565b612aaf8383612b9d565b6001600160a01b0383163b15610ee7576000548281035b612ad96000868380600101945086612504565b612af6576040516368d2bf6b60e11b815260040160405180910390fd5b818110612ac6578160005414612b0b57600080fd5b5050505050565b600081815b8451811015612b5757612b4382868381518110612b3657612b366134cb565b6020026020010151612cd4565b915080612b4f816134f7565b915050612b17565b509392505050565b8034111561222057336108fc612b7583346136a1565b6040518115909202916000818181858888f19350505050158015612810573d6000803e3d6000fd5b60005481612bd7576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612be46000848385612334565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612c9357808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612c5b565b5081612ccb576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6000818310612cf05760008281526020849052604090206116aa565b5060009182526020526040902090565b828054612d0c90613366565b90600052602060002090601f016020900481019282612d2e5760008555612d74565b82601f10612d475782800160ff19823516178555612d74565b82800160010185558215612d74579182015b82811115612d74578235825591602001919060010190612d59565b50612d80929150612d84565b5090565b5b80821115612d805760008155600101612d85565b6001600160e01b03198116811461222057600080fd5b600060208284031215612dc157600080fd5b81356116aa81612d99565b60005b83811015612de7578181015183820152602001612dcf565b838111156117a95750506000910152565b60008151808452612e10816020860160208601612dcc565b601f01601f19169290920160200192915050565b6020815260006116aa6020830184612df8565b600060208284031215612e4957600080fd5b5035919050565b600060808284031215612e6257600080fd5b50919050565b6001600160a01b038116811461222057600080fd5b60008060408385031215612e9057600080fd5b8235612e9b81612e68565b946020939093013593505050565b600080600060608486031215612ebe57600080fd5b8335612ec981612e68565b92506020840135612ed981612e68565b929592945050506040919091013590565b600060208284031215612efc57600080fd5b81356116aa81612e68565b6020808252825182820181905260009190848201906040850190845b818110156114f157835183529284019291840191600101612f23565b60008060208385031215612f5257600080fd5b823567ffffffffffffffff80821115612f6a57600080fd5b818501915085601f830112612f7e57600080fd5b813581811115612f8d57600080fd5b866020828501011115612f9f57600080fd5b60209290920196919550909350505050565b60008083601f840112612fc357600080fd5b50813567ffffffffffffffff811115612fdb57600080fd5b6020830191508360208260051b8501011115612ff657600080fd5b9250929050565b6000806020838503121561301057600080fd5b823567ffffffffffffffff81111561302757600080fd5b61303385828601612fb1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156114f1576130a98385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b928401926080929092019160010161305b565b6000806000606084860312156130d157600080fd5b83356130dc81612e68565b95602085013595506040909401359392505050565b6000806040838503121561310457600080fd5b823561310f81612e68565b91506020830135801515811461312457600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561316e5761316e61312f565b604052919050565b6000806000806080858703121561318c57600080fd5b843561319781612e68565b93506020858101356131a881612e68565b935060408601359250606086013567ffffffffffffffff808211156131cc57600080fd5b818801915088601f8301126131e057600080fd5b8135818111156131f2576131f261312f565b613204601f8201601f19168501613145565b9150808252898482850101111561321a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610995565b60008060006040848603121561329457600080fd5b833561329f81612e68565b9250602084013567ffffffffffffffff8111156132bb57600080fd5b6132c786828701612fb1565b9497909650939450505050565b67ffffffffffffffff8116811461222057600080fd5b600080604083850312156132fd57600080fd5b823561330881612e68565b91506020830135613124816132d4565b60008060006040848603121561332d57600080fd5b833561329f816132d4565b6000806040838503121561334b57600080fd5b823561335681612e68565b9150602083013561312481612e68565b600181811c9082168061337a57607f821691505b60208210811415612e6257634e487b7160e01b600052602260045260246000fd5b81356133a6816132d4565b67ffffffffffffffff811667ffffffffffffffff19835416178255506020820135600182015560408201356002820155606082013560038201555050565b6080810182356133f3816132d4565b67ffffffffffffffff811683525060208301356020830152604083013560408301526060830135606083015292915050565b6000602080838503121561343857600080fd5b825167ffffffffffffffff8082111561345057600080fd5b818501915085601f83011261346457600080fd5b8151818111156134765761347661312f565b8060051b9150613487848301613145565b81815291830184019184810190888411156134a157600080fd5b938501935b838510156134bf578451825293850193908501906134a6565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561350b5761350b6134e1565b5060010190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60008351613553818460208801612dcc565b835190830190613567818360208801612dcc565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b600067ffffffffffffffff808316818516818304811182151516156135bf576135bf6134e1565b02949350505050565b600082198211156135db576135db6134e1565b500190565b60008160001904831182151516156135fa576135fa6134e1565b500290565b600067ffffffffffffffff808316818516808303821115613622576136226134e1565b01949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261365d6080830184612df8565b9695505050505050565b60006020828403121561367957600080fd5b81516116aa81612d99565b60006020828403121561369657600080fd5b81516116aa81612e68565b6000828210156136b3576136b36134e1565b50039056fea264697066735822122046480e3f3fcf6c4b0886c159717115e1b0127ff6456046947599e2f5cb907c7664736f6c63430008090033
Deployed Bytecode
0x6080604052600436106102fd5760003560e01c80636e1bd3231161018f578063bd28c354116100e1578063e1add7d41161008a578063ecbd68df11610064578063ecbd68df146108a9578063f2fde38b146108be578063f6b4dfb4146108de57600080fd5b8063e1add7d41461082d578063e61f84401461084d578063e985e9c51461086057600080fd5b8063cea73a25116100bb578063cea73a25146107da578063d41da0e0146107ed578063def601261461080d57600080fd5b8063bd28c35414610778578063c23dc68f1461078d578063c87b56dd146107ba57600080fd5b806395d89b4111610143578063a2309ff81161011d578063a2309ff814610725578063b65016371461073e578063b88d4fde1461075857600080fd5b806395d89b41146106d057806399a2557a146106e5578063a22cb4651461070557600080fd5b8063715018a611610174578063715018a61461067d5780638462151c146106925780638da5cb5b146106b257600080fd5b80636e1bd3231461064757806370a082311461065d57600080fd5b80634a9a7864116102535780635bbb2177116101fc578063656cf918116101d6578063656cf918146105c557806368bd580e1461061d5780636c0360eb1461063257600080fd5b80635bbb2177146105595780635c975abb146105865780636352211e146105a557600080fd5b806355f804b31161022d57806355f804b3146104db578063576fd94d146104fb5780635b5d54281461052957600080fd5b80634a9a78641461048457806351858e271461049957806354d5e7f8146104ae57600080fd5b806318160ddd116102b55780633f4ba83a1161028f5780633f4ba83a1461042f57806342842e0e14610444578063477bddaa1461046457600080fd5b806318160ddd146103d357806323b872dd146103fa5780633ccfd60b1461041a57600080fd5b8063081812fc116102e6578063081812fc14610359578063089cf9f914610391578063095ea7b3146103b357600080fd5b806301ffc9a71461030257806306fdde0314610337575b600080fd5b34801561030e57600080fd5b5061032261031d366004612daf565b6108fe565b60405190151581526020015b60405180910390f35b34801561034357600080fd5b5061034c61099b565b60405161032e9190612e24565b34801561036557600080fd5b50610379610374366004612e37565b610a2d565b6040516001600160a01b03909116815260200161032e565b34801561039d57600080fd5b506103b16103ac366004612e50565b610a8a565b005b3480156103bf57600080fd5b506103b16103ce366004612e7d565b610aea565b3480156103df57600080fd5b5060015460005403600019015b60405190815260200161032e565b34801561040657600080fd5b506103b1610415366004612ea9565b610bb0565b34801561042657600080fd5b506103b1610d9a565b34801561043b57600080fd5b506103b1610e67565b34801561045057600080fd5b506103b161045f366004612ea9565b610ecc565b34801561047057600080fd5b506103b161047f366004612eea565b610eec565b34801561049057600080fd5b5061034c610f23565b3480156104a557600080fd5b506103b1610fb1565b3480156104ba57600080fd5b506104ce6104c9366004612eea565b611014565b60405161032e9190612f07565b3480156104e757600080fd5b506103b16104f6366004612f3f565b611202565b34801561050757600080fd5b50610510600281565b60405167ffffffffffffffff909116815260200161032e565b34801561053557600080fd5b50610322610544366004612e37565b60126020526000908152604090205460ff1681565b34801561056557600080fd5b50610579610574366004612ffd565b611254565b60405161032e919061303f565b34801561059257600080fd5b50600854600160a01b900460ff16610322565b3480156105b157600080fd5b506103796105c0366004612e37565b611320565b3480156105d157600080fd5b50600a54600b54600c54600d546105f29367ffffffffffffffff1692919084565b6040805167ffffffffffffffff9095168552602085019390935291830152606082015260800161032e565b34801561062957600080fd5b506103b161132b565b34801561063e57600080fd5b5061034c61136b565b34801561065357600080fd5b50610510610fa081565b34801561066957600080fd5b506103ec610678366004612eea565b611378565b34801561068957600080fd5b506103b16113e0565b34801561069e57600080fd5b506104ce6106ad366004612eea565b6113f2565b3480156106be57600080fd5b506008546001600160a01b0316610379565b3480156106dc57600080fd5b5061034c6114fd565b3480156106f157600080fd5b506104ce6107003660046130bc565b61150c565b34801561071157600080fd5b506103b16107203660046130f1565b6116b1565b34801561073157600080fd5b50600054600019016103ec565b34801561074a57600080fd5b50600e546103229060ff1681565b34801561076457600080fd5b506103b1610773366004613176565b611765565b34801561078457600080fd5b50600d546103ec565b34801561079957600080fd5b506107ad6107a8366004612e37565b6117af565b60405161032e919061323a565b3480156107c657600080fd5b5061034c6107d5366004612e37565b611837565b6103b16107e8366004612ffd565b611953565b3480156107f957600080fd5b5061032261080836600461327f565b611c71565b34801561081957600080fd5b506103b1610828366004612f3f565b611d01565b34801561083957600080fd5b506103b16108483660046132ea565b611d47565b6103b161085b366004613318565b611ee7565b34801561086c57600080fd5b5061032261087b366004613338565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108b557600080fd5b50610322612164565b3480156108ca57600080fd5b506103b16108d9366004612eea565b612193565b3480156108ea57600080fd5b50601154610379906001600160a01b031681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316148061096157507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b8061099557507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600280546109aa90613366565b80601f01602080910402602001604051908101604052809291908181526020018280546109d690613366565b8015610a235780601f106109f857610100808354040283529160200191610a23565b820191906000526020600020905b815481529060010190602001808311610a0657829003601f168201915b5050505050905090565b6000610a3882612223565b610a6e576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b610a92612258565b610aa0565b60405180910390fd5b80600a610aad828261339b565b9050507fac21250a6d4b0f5d657e054b0a47e1c748a4aa3750c69e5dd836c16bc0d79a0281604051610adf91906133e4565b60405180910390a150565b6000610af582611320565b9050336001600160a01b03821614610b4757610b11813361087b565b610b47576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610bbb826122b2565b9050836001600160a01b0316816001600160a01b031614610c08576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610c6e57610c38863361087b565b610c6e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610cae576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cbb8686866001612334565b8015610cc657600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610d515760018401600081815260046020526040902054610d4f576000548114610d4f5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610da2612258565b60026009541415610df55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b60026009556040514790339082156108fc029083906000818181858888f19350505050158015610e29573d6000803e3d6000fd5b5060405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506001600955565b610e6f612258565b600e5460ff1615610ec25760405162461bcd60e51b815260206004820152600f60248201527f636f6e7472616374207365616c656400000000000000000000000000000000006044820152606401610a97565b610eca61238e565b565b610ee783838360405180602001604052806000815250611765565b505050565b610ef4612258565b6011805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60108054610f3090613366565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5c90613366565b8015610fa95780601f10610f7e57610100808354040283529160200191610fa9565b820191906000526020600020905b815481529060010190602001808311610f8c57829003601f168201915b505050505081565b610fb9612258565b600e5460ff161561100c5760405162461bcd60e51b815260206004820152600f60248201527f636f6e7472616374207365616c656400000000000000000000000000000000006044820152606401610a97565b610eca6123e3565b6011546040517f8462151c0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152606092600092911690638462151c9060240160006040518083038186803b15801561107757600080fd5b505afa15801561108b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110b39190810190613425565b90506000805b825181101561111657601260008483815181106110d8576110d86134cb565b60209081029190910181015182528101919091526040016000205460ff1661110657611103826134f7565b91505b61110f816134f7565b90506110b9565b506000808267ffffffffffffffff8111156111335761113361312f565b60405190808252806020026020018201604052801561115c578160200160208202803683370190505b50905060005b84518110156111f85760126000868381518110611181576111816134cb565b60209081029190910181015182528101919091526040016000205460ff166111e8578481815181106111b5576111b56134cb565b60200260200101518284806111c9906134f7565b9550815181106111db576111db6134cb565b6020026020010181815250505b6111f1816134f7565b9050611162565b5095945050505050565b61120a612258565b611216600f8383612d00565b507f5411e8ebf1636d9e83d5fc4900bf80cbac82e8790da2a4c94db4895e889eedf68282604051611248929190613512565b60405180910390a15050565b60608160008167ffffffffffffffff8111156112725761127261312f565b6040519080825280602002602001820160405280156112c457816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816112905790505b50905060005b828114611317576112f28686838181106112e6576112e66134cb565b905060200201356117af565b828281518110611304576113046134cb565b60209081029190910101526001016112ca565b50949350505050565b6000610995826122b2565b611333612258565b600e805460ff191660011790556040517fa0058887862c892ade184993a48c672897bca2e36ebf7fa2b4703d4805fc3a0190600090a1565b600f8054610f3090613366565b60006001600160a01b0382166113ba576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6113e8612258565b610eca6000612426565b6060600080600061140285611378565b905060008167ffffffffffffffff81111561141f5761141f61312f565b604051908082528060200260200182016040528015611448578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081019190915290915060015b8386146114f15761148381612485565b9150816040015115611494576114e9565b81516001600160a01b0316156114a957815194505b876001600160a01b0316856001600160a01b031614156114e957808387806001019850815181106114dc576114dc6134cb565b6020026020010181815250505b600101611473565b50909695505050505050565b6060600380546109aa90613366565b6060818310611547576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061155360005490565b9050600185101561156357600194505b8084111561156f578093505b600061157a87611378565b9050848610156115995785850381811015611593578091505b5061159d565b5060005b60008167ffffffffffffffff8111156115b8576115b861312f565b6040519080825280602002602001820160405280156115e1578160200160208202803683370190505b509050816115f45793506116aa92505050565b60006115ff886117af565b905060008160400151611610575080515b885b8881141580156116225750848714155b1561169e5761163081612485565b925082604001511561164157611696565b82516001600160a01b03161561165657825191505b8a6001600160a01b0316826001600160a01b031614156116965780848880600101995081518110611689576116896134cb565b6020026020010181815250505b600101611612565b50505092835250909150505b9392505050565b6001600160a01b0382163314156116f4576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b905090565b611770848484610bb0565b6001600160a01b0383163b156117a95761178c84848484612504565b6117a9576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516080810182526000808252602082018190529181018290526060810191909152604080516080810182526000808252602082018190529181018290526060810191909152600183108061180857506000548310155b156118135792915050565b61181c83612485565b905080604001511561182e5792915050565b6116aa836125fb565b606061184282612223565b611878576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611882612673565b9050805160001415611921576010805461189b90613366565b80601f01602080910402602001604051908101604052809291908181526020018280546118c790613366565b80156119145780601f106118e957610100808354040283529160200191611914565b820191906000526020600020905b8154815290600101906020018083116118f757829003601f168201915b5050505050915050919050565b8061192b84612682565b60405160200161193c929190613541565b604051602081830303815290604052915050919050565b3233146119a25760405162461bcd60e51b815260206004820152601a60248201527f63616c6c657220697320616e6f7468657220636f6e74726163740000000000006044820152606401610a97565b600260095414156119f55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b600260095580611a03612164565b611a4f5760405162461bcd60e51b815260206004820152601d60248201527f65786368616e67652073616c6520686173206e6f7420656e61626c65640000006044820152606401610a97565b60008111611a9f5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e756d626572206f6620746f6b656e7300000000000000006044820152606401610a97565b611aa983836126c4565b611af55760405162461bcd60e51b815260206004820152601e60248201527f616c6c2044484120746f6b656e7320686173206e6f7420656e61626c656400006044820152606401610a97565b6000611b02826002613598565b9050610fa067ffffffffffffffff8216611b1f6000546000190190565b611b2991906135c8565b1115611b775760405162461bcd60e51b815260206004820152601360248201527f6d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a97565b6000611b82600d5490565b90506000611b9a67ffffffffffffffff8416836135e0565b905034811115611bec5760405162461bcd60e51b815260206004820152601f60248201527f65746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a97565b60005b84811015611c4e57600160126000898985818110611c0f57611c0f6134cb565b90506020020135815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611c46906134f7565b915050611bef565b50611c64335b8467ffffffffffffffff166127f6565b5050600160095550505050565b600c54600090611c83575060006116aa565b611cf983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c546040516bffffffffffffffffffffffff1960608b901b166020820152909250603401905060405160208183030381529060405280519060200120612814565b949350505050565b611d09612258565b611d1560108383612d00565b507f912509518a3aad94b6defb989c176d5c3e8dfde19dc0d77cad24d6cd8a06bc808282604051611248929190613512565b611d4f612258565b60026009541415611da25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b60026009556001600160a01b038216611dfd5760405162461bcd60e51b815260206004820152600c60248201527f7a65726f206164647265737300000000000000000000000000000000000000006044820152606401610a97565b60008167ffffffffffffffff1611611e575760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e756d626572206f6620746f6b656e7300000000000000006044820152606401610a97565b610fa067ffffffffffffffff8216611e726000546000190190565b611e7c91906135c8565b1115611eca5760405162461bcd60e51b815260206004820152601360248201527f6d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a97565b611ede828267ffffffffffffffff166127f6565b50506001600955565b323314611f365760405162461bcd60e51b815260206004820152601a60248201527f63616c6c657220697320616e6f7468657220636f6e74726163740000000000006044820152606401610a97565b60026009541415611f895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a97565b6002600955611f96612164565b611fe25760405162461bcd60e51b815260206004820152601e60248201527f77686974656c6973742073616c6520686173206e6f7420656e61626c656400006044820152606401610a97565b611fed338383611c71565b61205f5760405162461bcd60e51b815260206004820152602f60248201527f63616c6c6572206973206e6f7420696e2077686974656c697374206f7220696e60448201527f76616c6964207369676e617475726500000000000000000000000000000000006064820152608401610a97565b3360009081526005602052604081205461207d90859060c01c6135ff565b600a5490915067ffffffffffffffff90811690821611156121065760405162461bcd60e51b815260206004820152602360248201527f6d6178206d696e7420616d6f756e74207065722077616c6c657420657863656560448201527f64656400000000000000000000000000000000000000000000000000000000006064820152608401610a97565b61211884612113600d5490565b61282a565b612159336001600160a01b03166000908152600560205260409020805477ffffffffffffffffffffffffffffffffffffffffffffffff1660c084901b179055565b505060016009555050565b600b54600090158015906121795750600b5442115b8015612183575060015b8015611760575050600c54151590565b61219b612258565b6001600160a01b0381166122175760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a97565b61222081612426565b50565b600081600111158015612237575060005482105b8015610995575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b03163314610eca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a97565b600081806001116123025760005481101561230257600081815260046020526040902054600160e01b8116612300575b806116aa5750600019016000818152600460205260409020546122e2565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600160a01b900460ff16156117a95760405162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e736665722070617573656400000000000000000000006044820152606401610a97565b6123966129f2565b6008805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6123eb612a4b565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586123c63390565b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461099590604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061253990339089908890889060040161362b565b602060405180830381600087803b15801561255357600080fd5b505af1925050508015612583575060408051601f3d908101601f1916820190925261258091810190613667565b60015b6125de573d8080156125b1576040519150601f19603f3d011682016040523d82523d6000602084013e6125b6565b606091505b5080516125d6576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261099561262b836122b2565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6060600f80546109aa90613366565b604080516080019081905280825b600183039250600a81066030018353600a9004806126ad576126b2565b612690565b50819003601f19909101908152919050565b60008133825b828110156127ea57601260008787848181106126e8576126e86134cb565b602090810292909201358352508101919091526040016000205460ff16156127165760009350505050610995565b6011546000906001600160a01b0316636352211e88888581811061273c5761273c6134cb565b905060200201356040518263ffffffff1660e01b815260040161276191815260200190565b60206040518083038186803b15801561277957600080fd5b505afa15801561278d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127b19190613684565b9050826001600160a01b0316816001600160a01b0316146127d9576000945050505050610995565b506127e3816134f7565b90506126ca565b50600195945050505050565b612810828260405180602001604052806000815250612aa5565b5050565b6000826128218584612b12565b14949350505050565b60008267ffffffffffffffff16116128845760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e756d626572206f6620746f6b656e7300000000000000006044820152606401610a97565b600267ffffffffffffffff831611156129055760405162461bcd60e51b815260206004820152603160248201527f63616e206f6e6c79206d696e74204d41585f544f4b454e5f5045525f4d494e5460448201527f20746f6b656e7320617420612074696d650000000000000000000000000000006064820152608401610a97565b610fa067ffffffffffffffff83166129206000546000190190565b61292a91906135c8565b11156129785760405162461bcd60e51b815260206004820152601360248201527f6d617820737570706c79206578636565646564000000000000000000000000006044820152606401610a97565b600061298e67ffffffffffffffff8416836135e0565b9050348111156129e05760405162461bcd60e51b815260206004820152601f60248201527f65746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610a97565b6129e933611c54565b610ee781612b5f565b600854600160a01b900460ff16610eca5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a97565b600854600160a01b900460ff1615610eca5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a97565b612aaf8383612b9d565b6001600160a01b0383163b15610ee7576000548281035b612ad96000868380600101945086612504565b612af6576040516368d2bf6b60e11b815260040160405180910390fd5b818110612ac6578160005414612b0b57600080fd5b5050505050565b600081815b8451811015612b5757612b4382868381518110612b3657612b366134cb565b6020026020010151612cd4565b915080612b4f816134f7565b915050612b17565b509392505050565b8034111561222057336108fc612b7583346136a1565b6040518115909202916000818181858888f19350505050158015612810573d6000803e3d6000fd5b60005481612bd7576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612be46000848385612334565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612c9357808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612c5b565b5081612ccb576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6000818310612cf05760008281526020849052604090206116aa565b5060009182526020526040902090565b828054612d0c90613366565b90600052602060002090601f016020900481019282612d2e5760008555612d74565b82601f10612d475782800160ff19823516178555612d74565b82800160010185558215612d74579182015b82811115612d74578235825591602001919060010190612d59565b50612d80929150612d84565b5090565b5b80821115612d805760008155600101612d85565b6001600160e01b03198116811461222057600080fd5b600060208284031215612dc157600080fd5b81356116aa81612d99565b60005b83811015612de7578181015183820152602001612dcf565b838111156117a95750506000910152565b60008151808452612e10816020860160208601612dcc565b601f01601f19169290920160200192915050565b6020815260006116aa6020830184612df8565b600060208284031215612e4957600080fd5b5035919050565b600060808284031215612e6257600080fd5b50919050565b6001600160a01b038116811461222057600080fd5b60008060408385031215612e9057600080fd5b8235612e9b81612e68565b946020939093013593505050565b600080600060608486031215612ebe57600080fd5b8335612ec981612e68565b92506020840135612ed981612e68565b929592945050506040919091013590565b600060208284031215612efc57600080fd5b81356116aa81612e68565b6020808252825182820181905260009190848201906040850190845b818110156114f157835183529284019291840191600101612f23565b60008060208385031215612f5257600080fd5b823567ffffffffffffffff80821115612f6a57600080fd5b818501915085601f830112612f7e57600080fd5b813581811115612f8d57600080fd5b866020828501011115612f9f57600080fd5b60209290920196919550909350505050565b60008083601f840112612fc357600080fd5b50813567ffffffffffffffff811115612fdb57600080fd5b6020830191508360208260051b8501011115612ff657600080fd5b9250929050565b6000806020838503121561301057600080fd5b823567ffffffffffffffff81111561302757600080fd5b61303385828601612fb1565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156114f1576130a98385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b928401926080929092019160010161305b565b6000806000606084860312156130d157600080fd5b83356130dc81612e68565b95602085013595506040909401359392505050565b6000806040838503121561310457600080fd5b823561310f81612e68565b91506020830135801515811461312457600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561316e5761316e61312f565b604052919050565b6000806000806080858703121561318c57600080fd5b843561319781612e68565b93506020858101356131a881612e68565b935060408601359250606086013567ffffffffffffffff808211156131cc57600080fd5b818801915088601f8301126131e057600080fd5b8135818111156131f2576131f261312f565b613204601f8201601f19168501613145565b9150808252898482850101111561321a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610995565b60008060006040848603121561329457600080fd5b833561329f81612e68565b9250602084013567ffffffffffffffff8111156132bb57600080fd5b6132c786828701612fb1565b9497909650939450505050565b67ffffffffffffffff8116811461222057600080fd5b600080604083850312156132fd57600080fd5b823561330881612e68565b91506020830135613124816132d4565b60008060006040848603121561332d57600080fd5b833561329f816132d4565b6000806040838503121561334b57600080fd5b823561335681612e68565b9150602083013561312481612e68565b600181811c9082168061337a57607f821691505b60208210811415612e6257634e487b7160e01b600052602260045260246000fd5b81356133a6816132d4565b67ffffffffffffffff811667ffffffffffffffff19835416178255506020820135600182015560408201356002820155606082013560038201555050565b6080810182356133f3816132d4565b67ffffffffffffffff811683525060208301356020830152604083013560408301526060830135606083015292915050565b6000602080838503121561343857600080fd5b825167ffffffffffffffff8082111561345057600080fd5b818501915085601f83011261346457600080fd5b8151818111156134765761347661312f565b8060051b9150613487848301613145565b81815291830184019184810190888411156134a157600080fd5b938501935b838510156134bf578451825293850193908501906134a6565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561350b5761350b6134e1565b5060010190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b60008351613553818460208801612dcc565b835190830190613567818360208801612dcc565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b600067ffffffffffffffff808316818516818304811182151516156135bf576135bf6134e1565b02949350505050565b600082198211156135db576135db6134e1565b500190565b60008160001904831182151516156135fa576135fa6134e1565b500290565b600067ffffffffffffffff808316818516808303821115613622576136226134e1565b01949350505050565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261365d6080830184612df8565b9695505050505050565b60006020828403121561367957600080fd5b81516116aa81612d99565b60006020828403121561369657600080fd5b81516116aa81612e68565b6000828210156136b3576136b36134e1565b50039056fea264697066735822122046480e3f3fcf6c4b0886c159717115e1b0127ff6456046947599e2f5cb907c7664736f6c63430008090033
Deployed Bytecode Sourcemap
565:12261:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9112:630:7;;;;;;;;;;-1:-1:-1;9112:630:7;;;;;:::i;:::-;;:::i;:::-;;;611:14:11;;604:22;586:41;;574:2;559:18;9112:630:7;;;;;;;;9996:98;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;16309:214::-;;;;;;;;;;-1:-1:-1;16309:214:7;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1738:55:11;;;1720:74;;1708:2;1693:18;16309:214:7;1574:226:11;10747:279:5;;;;;;;;;;-1:-1:-1;10747:279:5;;;;;:::i;:::-;;:::i;:::-;;15769:390:7;;;;;;;;;;-1:-1:-1;15769:390:7;;;;;:::i;:::-;;:::i;5851:317::-;;;;;;;;;;-1:-1:-1;6791:1:5;6121:12:7;5912:7;6105:13;:28;-1:-1:-1;;6105:46:7;5851:317;;;2640:25:11;;;2628:2;2613:18;5851:317:7;2494:177:11;19918:2756:7;;;;;;;;;;-1:-1:-1;19918:2756:7;;;;;:::i;:::-;;:::i;5489:203:5:-;;;;;;;;;;;;;:::i;11918:75::-;;;;;;;;;;;;;:::i;22765:179:7:-;;;;;;;;;;-1:-1:-1;22765:179:7;;;;;:::i;:::-;;:::i;9833:124:5:-;;;;;;;;;;-1:-1:-1;9833:124:5;;;;;:::i;:::-;;:::i;1256:26::-;;;;;;;;;;;;;:::i;11780:80::-;;;;;;;;;;;;;:::i;5825:739::-;;;;;;;;;;-1:-1:-1;5825:739:5;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;10082:139::-;;;;;;;;;;-1:-1:-1;10082:139:5;;;;;:::i;:::-;;:::i;1093:45::-;;;;;;;;;;;;1137:1;1093:45;;;;;4797:18:11;4785:31;;;4767:50;;4755:2;4740:18;1093:45:5;4623:200:11;1325:44:5;;;;;;;;;;-1:-1:-1;1325:44:5;;;;;:::i;:::-;;;;;;;;;;;;;;;;1641:513:9;;;;;;;;;;-1:-1:-1;1641:513:9;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1615:84:1:-;;;;;;;;;;-1:-1:-1;1685:7:1;;-1:-1:-1;;;1685:7:1;;;;1615:84;;11348:150:7;;;;;;;;;;-1:-1:-1;11348:150:7;;;;;:::i;:::-;;:::i;1145:46:5:-;;;;;;;;;;-1:-1:-1;1145:46:5;;;;;;;;;;;;;;;;;;;;;7007:18:11;6995:31;;;6977:50;;7058:2;7043:18;;7036:34;;;;7086:18;;;7079:34;7144:2;7129:18;;7122:34;6964:3;6949:19;1145:46:5;6748:414:11;12168:112:5;;;;;;;;;;;;;:::i;1229:21::-;;;;;;;;;;;;;:::i;1048:39::-;;;;;;;;;;;;1083:4;1048:39;;7002:230:7;;;;;;;;;;-1:-1:-1;7002:230:7;;;;;:::i;:::-;;:::i;1831:101:0:-;;;;;;;;;;;;;:::i;5417:879:9:-;;;;;;;;;;-1:-1:-1;5417:879:9;;;;;:::i;:::-;;:::i;1201:85:0:-;;;;;;;;;;-1:-1:-1;1273:6:0;;-1:-1:-1;;;;;1273:6:0;1201:85;;10165:102:7;;;;;;;;;;;;;:::i;2528:2454:9:-;;;;;;;;;;-1:-1:-1;2528:2454:9;;;;;:::i;:::-;;:::i;16850:303:7:-;;;;;;;;;;-1:-1:-1;16850:303:7;;;;;:::i;:::-;;:::i;8906:91:5:-;;;;;;;;;;-1:-1:-1;8950:7:5;6503:13:7;-1:-1:-1;;6503:31:7;8906:91:5;;1197:26;;;;;;;;;;-1:-1:-1;1197:26:5;;;;;;;;23525:388:7;;;;;;;;;;-1:-1:-1;23525:388:7;;;;;:::i;:::-;;:::i;8631:112:5:-;;;;;;;;;;-1:-1:-1;8711:25:5;;8631:112;;1070:418:9;;;;;;;;;;-1:-1:-1;1070:418:9;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;9279:421:5:-;;;;;;;;;;-1:-1:-1;9279:421:5;;;;;:::i;:::-;;:::i;1746:882::-;;;;;;:::i;:::-;;:::i;8084:419::-;;;;;;;;;;-1:-1:-1;8084:419:5;;;;;:::i;:::-;;:::i;10366:169::-;;;;;;;;;;-1:-1:-1;10366:169:5;;;;;:::i;:::-;;:::i;2949:416::-;;;;;;;;;;-1:-1:-1;2949:416:5;;;;;:::i;:::-;;:::i;3521:695::-;;;;;;:::i;:::-;;:::i;17303:162:7:-;;;;;;;;;;-1:-1:-1;17303:162:7;;;;;:::i;:::-;-1:-1:-1;;;;;17423:25:7;;;17400:4;17423:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;17303:162;6918:291:5;;;;;;;;;;;;;:::i;2081:198:0:-;;;;;;;;;;-1:-1:-1;2081:198:0;;;;;:::i;:::-;;:::i;1288:30:5:-;;;;;;;;;;-1:-1:-1;1288:30:5;;;;-1:-1:-1;;;;;1288:30:5;;;9112:630:7;9197:4;9515:25;-1:-1:-1;;;;;;9515:25:7;;;;:101;;-1:-1:-1;9591:25:7;-1:-1:-1;;;;;;9591:25:7;;;9515:101;:177;;;-1:-1:-1;9667:25:7;-1:-1:-1;;;;;;9667:25:7;;;9515:177;9496:196;9112:630;-1:-1:-1;;9112:630:7:o;9996:98::-;10050:13;10082:5;10075:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9996:98;:::o;16309:214::-;16385:7;16409:16;16417:7;16409;:16::i;:::-;16404:64;;16434:34;;;;;;;;;;;;;;16404:64;-1:-1:-1;16486:24:7;;;;:15;:24;;;;;:30;-1:-1:-1;;;;;16486:30:7;;16309:214::o;10747:279:5:-;1094:13:0;:11;:13::i;:::-;10866:64:5::1;::::0;::::1;;;;;;;;;10962:7:::0;10940:19:::1;:29;10962:7:::0;10940:19;:29:::1;:::i;:::-;;;;10984:35;11011:7;10984:35;;;;;;:::i;:::-;;;;;;;;10747:279:::0;:::o;15769:390:7:-;15849:13;15865:16;15873:7;15865;:16::i;:::-;15849:32;-1:-1:-1;39008:10:7;-1:-1:-1;;;;;15896:28:7;;;15892:172;;15943:44;15960:5;39008:10;17303:162;:::i;15943:44::-;15938:126;;16014:35;;;;;;;;;;;;;;15938:126;16074:24;;;;:15;:24;;;;;;:35;;-1:-1:-1;;16074:35:7;-1:-1:-1;;;;;16074:35:7;;;;;;;;;16124:28;;16074:24;;16124:28;;;;;;;15839:320;15769:390;;:::o;19918:2756::-;20047:27;20077;20096:7;20077:18;:27::i;:::-;20047:57;;20160:4;-1:-1:-1;;;;;20119:45:7;20135:19;-1:-1:-1;;;;;20119:45:7;;20115:86;;20173:28;;;;;;;;;;;;;;20115:86;20213:27;19057:24;;;:15;:24;;;;;19275:26;;39008:10;18694:30;;;-1:-1:-1;;;;;18391:28:7;;18672:20;;;18669:56;20396:179;;20488:43;20505:4;39008:10;17303:162;:::i;20488:43::-;20483:92;;20540:35;;;;;;;;;;;;;;20483:92;-1:-1:-1;;;;;20590:16:7;;20586:52;;20615:23;;;;;;;;;;;;;;20586:52;20649:43;20671:4;20677:2;20681:7;20690:1;20649:21;:43::i;:::-;20781:15;20778:157;;;20919:1;20898:19;20891:30;20778:157;-1:-1:-1;;;;;21307:24:7;;;;;;;:18;:24;;;;;;21305:26;;-1:-1:-1;;21305:26:7;;;21375:22;;;;;;;;;21373:24;;-1:-1:-1;21373:24:7;;;14660:11;14635:23;14631:41;14618:63;-1:-1:-1;;;14618:63:7;21661:26;;;;:17;:26;;;;;:172;-1:-1:-1;;;21950:47:7;;21946:617;;22054:1;22044:11;;22022:19;22175:30;;;:17;:30;;;;;;22171:378;;22311:13;;22296:11;:28;22292:239;;22456:30;;;;:17;:30;;;;;:52;;;22292:239;22004:559;21946:617;22607:7;22603:2;-1:-1:-1;;;;;22588:27:7;22597:4;-1:-1:-1;;;;;22588:27:7;;;;;;;;;;;20037:2637;;;19918:2756;;;:::o;5489:203:5:-;1094:13:0;:11;:13::i;:::-;1744:1:2::1;2325:7;;:19;;2317:63;;;::::0;-1:-1:-1;;;2317:63:2;;14043:2:11;2317:63:2::1;::::0;::::1;14025:21:11::0;14082:2;14062:18;;;14055:30;14121:33;14101:18;;;14094:61;14172:18;;2317:63:2::1;13841:355:11::0;2317:63:2::1;1744:1;2455:7;:18:::0;5600:39:5::2;::::0;5569:21:::2;::::0;39008:10:7;;5600:39:5;::::2;;;::::0;5569:21;;5600:39:::2;::::0;;;5569:21;39008:10:7;5600:39:5;::::2;;;;;;;;;;;;;::::0;::::2;;;;;-1:-1:-1::0;5654:31:5::2;::::0;2640:25:11;;;39008:10:7;;5654:31:5::2;::::0;2628:2:11;2613:18;5654:31:5::2;;;;;;;-1:-1:-1::0;1701:1:2::1;2628:7;:22:::0;5489:203:5:o;11918:75::-;1094:13:0;:11;:13::i;:::-;12772:14:5::1;::::0;::::1;;12771:15;12763:43;;;::::0;-1:-1:-1;;;12763:43:5;;14403:2:11;12763:43:5::1;::::0;::::1;14385:21:11::0;14442:2;14422:18;;;14415:30;14481:17;14461:18;;;14454:45;14516:18;;12763:43:5::1;14201:339:11::0;12763:43:5::1;11976:10:::2;:8;:10::i;:::-;11918:75::o:0;22765:179:7:-;22898:39;22915:4;22921:2;22925:7;22898:39;;;;;;;;;;;;:16;:39::i;:::-;22765:179;;;:::o;9833:124:5:-;1094:13:0;:11;:13::i;:::-;9916:15:5::1;:34:::0;;-1:-1:-1;;9916:34:5::1;-1:-1:-1::0;;;;;9916:34:5;;;::::1;::::0;;;::::1;::::0;;9833:124::o;1256:26::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;11780:80::-;1094:13:0;:11;:13::i;:::-;12772:14:5::1;::::0;::::1;;12771:15;12763:43;;;::::0;-1:-1:-1;;;12763:43:5;;14403:2:11;12763:43:5::1;::::0;::::1;14385:21:11::0;14442:2;14422:18;;;14415:30;14481:17;14461:18;;;14454:45;14516:18;;12763:43:5::1;14201:339:11::0;12763:43:5::1;11845:8:::2;:6;:8::i;5825:739::-:0;6007:15;;5996:70;;;;;-1:-1:-1;;;;;1738:55:11;;;5996:70:5;;;1720:74:11;5938:16:5;;5970:23;;6007:15;;;5996:41;;1693:18:11;;5996:70:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5996:70:5;;;;;;;;;;;;:::i;:::-;5970:96;;6077:12;6108:9;6103:145;6127:6;:13;6123:1;:17;6103:145;;;6165:12;:23;6178:6;6185:1;6178:9;;;;;;;;:::i;:::-;;;;;;;;;;;;6165:23;;;;;;;;;;-1:-1:-1;6165:23:5;;;;6161:77;;6217:6;;;:::i;:::-;;;6161:77;6142:3;;;:::i;:::-;;;6103:145;;;;6258:9;6281:35;6333:4;6319:19;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6319:19:5;;6281:57;;6353:9;6348:174;6372:6;:13;6368:1;:17;6348:174;;;6410:12;:23;6423:6;6430:1;6423:9;;;;;;;;:::i;:::-;;;;;;;;;;;;6410:23;;;;;;;;;;-1:-1:-1;6410:23:5;;;;6406:106;;6488:6;6495:1;6488:9;;;;;;;;:::i;:::-;;;;;;;6462:18;6481:3;;;;;:::i;:::-;;;6462:23;;;;;;;;:::i;:::-;;;;;;:35;;;;;6406:106;6387:3;;;:::i;:::-;;;6348:174;;;-1:-1:-1;6539:18:5;5825:739;-1:-1:-1;;;;;5825:739:5:o;10082:139::-;1094:13:0;:11;:13::i;:::-;10157:18:5::1;:7;10167:8:::0;;10157:18:::1;:::i;:::-;;10190:24;10205:8;;10190:24;;;;;;;:::i;:::-;;;;;;;;10082:139:::0;;:::o;1641:513:9:-;1780:23;1868:8;1843:22;1868:8;1934:36;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1934:36:9;;-1:-1:-1;;1934:36:9;;;;;;;;;;;;1897:73;;1989:9;1984:123;2005:14;2000:1;:19;1984:123;;2060:32;2080:8;;2089:1;2080:11;;;;;;;:::i;:::-;;;;;;;2060:19;:32::i;:::-;2044:10;2055:1;2044:13;;;;;;;;:::i;:::-;;;;;;;;;;:48;2021:3;;1984:123;;;-1:-1:-1;2127:10:9;1641:513;-1:-1:-1;;;;1641:513:9:o;11348:150:7:-;11420:7;11462:27;11481:7;11462:18;:27::i;12168:112:5:-;1094:13:0;:11;:13::i;:::-;12221:14:5::1;:21:::0;;-1:-1:-1;;12221:21:5::1;12238:4;12221:21;::::0;;12257:16:::1;::::0;::::1;::::0;12221:14:::1;::::0;12257:16:::1;12168:112::o:0;1229:21::-;;;;;;;:::i;7002:230:7:-;7074:7;-1:-1:-1;;;;;7097:19:7;;7093:60;;7125:28;;;;;;;;;;;;;;7093:60;-1:-1:-1;;;;;;7170:25:7;;;;;:18;:25;;;;;;1317:13;7170:55;;7002:230::o;1831:101:0:-;1094:13;:11;:13::i;:::-;1895:30:::1;1922:1;1895:18;:30::i;5417:879:9:-:0;5495:16;5547:19;5580:25;5619:22;5644:16;5654:5;5644:9;:16::i;:::-;5619:41;;5674:25;5716:14;5702:29;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5702:29:9;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5674:57:9;;-1:-1:-1;6791:1:5;5790:461:9;5839:14;5824:11;:29;5790:461;;5890:15;5903:1;5890:12;:15::i;:::-;5878:27;;5927:9;:16;;;5923:71;;;5967:8;;5923:71;6015:14;;-1:-1:-1;;;;;6015:28:9;;6011:109;;6087:14;;;-1:-1:-1;6011:109:9;6162:5;-1:-1:-1;;;;;6141:26:9;:17;-1:-1:-1;;;;;6141:26:9;;6137:100;;;6217:1;6191:8;6200:13;;;;;;6191:23;;;;;;;;:::i;:::-;;;;;;:27;;;;;6137:100;5855:3;;5790:461;;;-1:-1:-1;6271:8:9;;5417:879;-1:-1:-1;;;;;;5417:879:9:o;10165:102:7:-;10221:13;10253:7;10246:14;;;;;:::i;2528:2454:9:-;2667:16;2732:4;2723:5;:13;2719:45;;2745:19;;;;;;;;;;;;;;2719:45;2778:19;2811:17;2831:14;5602:7:7;5628:13;;5547:101;2831:14:9;2811:34;-1:-1:-1;6791:1:5;2921:5:9;:23;2917:85;;;6791:1:5;2964:23:9;;2917:85;3076:9;3069:4;:16;3065:71;;;3112:9;3105:16;;3065:71;3149:25;3177:16;3187:5;3177:9;:16::i;:::-;3149:44;;3368:4;3360:5;:12;3356:271;;;3414:12;;;3448:31;;;3444:109;;;3523:11;3503:31;;3444:109;3374:193;3356:271;;;-1:-1:-1;3611:1:9;3356:271;3640:25;3682:17;3668:32;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3668:32:9;-1:-1:-1;3640:60:9;-1:-1:-1;3718:22:9;3714:76;;3767:8;-1:-1:-1;3760:15:9;;-1:-1:-1;;;3760:15:9;3714:76;3931:31;3965:26;3985:5;3965:19;:26::i;:::-;3931:60;;4005:25;4247:9;:16;;;4242:90;;-1:-1:-1;4303:14:9;;4242:90;4362:5;4345:467;4374:4;4369:1;:9;;:45;;;;;4397:17;4382:11;:32;;4369:45;4345:467;;;4451:15;4464:1;4451:12;:15::i;:::-;4439:27;;4488:9;:16;;;4484:71;;;4528:8;;4484:71;4576:14;;-1:-1:-1;;;;;4576:28:9;;4572:109;;4648:14;;;-1:-1:-1;4572:109:9;4723:5;-1:-1:-1;;;;;4702:26:9;:17;-1:-1:-1;;;;;4702:26:9;;4698:100;;;4778:1;4752:8;4761:13;;;;;;4752:23;;;;;;;;:::i;:::-;;;;;;:27;;;;;4698:100;4416:3;;4345:467;;;-1:-1:-1;;;4894:29:9;;;-1:-1:-1;4901:8:9;;-1:-1:-1;;2528:2454:9;;;;;;:::o;16850:303:7:-;-1:-1:-1;;;;;16948:31:7;;39008:10;16948:31;16944:61;;;16988:17;;;;;;;;;;;;;;16944:61;39008:10;17016:39;;;;:18;:39;;;;;;;;-1:-1:-1;;;;;17016:49:7;;;;;;;;;;;;:60;;-1:-1:-1;;17016:60:7;;;;;;;;;;17091:55;;586:41:11;;;17016:49:7;;39008:10;17091:55;;559:18:11;17091:55:7;;;;;;;16850:303;;:::o;8976:14:5:-;8969:21;;8906:91;:::o;23525:388:7:-;23686:31;23699:4;23705:2;23709:7;23686:12;:31::i;:::-;-1:-1:-1;;;;;23731:14:7;;;:19;23727:180;;23769:56;23800:4;23806:2;23810:7;23819:5;23769:30;:56::i;:::-;23764:143;;23852:40;;-1:-1:-1;;;23852:40:7;;;;;;;;;;;23764:143;23525:388;;;;:::o;1070:418:9:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6791:1:5;1232:7:9;:25;:54;;;-1:-1:-1;5602:7:7;5628:13;1261:7:9;:25;;1232:54;1228:101;;;1309:9;1070:418;-1:-1:-1;;1070:418:9:o;1228:101::-;1350:21;1363:7;1350:12;:21::i;:::-;1338:33;;1385:9;:16;;;1381:63;;;1424:9;1070:418;-1:-1:-1;;1070:418:9:o;1381:63::-;1460:21;1473:7;1460:12;:21::i;9279:421:5:-;9392:13;9426:16;9434:7;9426;:16::i;:::-;9421:59;;9451:29;;;;;;;;;;;;;;9421:59;9491:22;9516:10;:8;:10::i;:::-;9491:35;;9546:8;9540:22;9566:1;9540:27;9536:77;;;9590:12;9583:19;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9279:421;;;:::o;9536:77::-;9654:8;9664:18;9674:7;9664:9;:18::i;:::-;9637:55;;;;;;;;;:::i;:::-;;;;;;;;;;;;;9623:70;;;9279:421;;;:::o;1746:882::-;12553:9;39008:10:7;12553:25:5;12545:64;;;;-1:-1:-1;;;12545:64:5;;17243:2:11;12545:64:5;;;17225:21:11;17282:2;17262:18;;;17255:30;17321:28;17301:18;;;17294:56;17367:18;;12545:64:5;17041:350:11;12545:64:5;1744:1:2::1;2325:7;;:19;;2317:63;;;::::0;-1:-1:-1;;;2317:63:2;;14043:2:11;2317:63:2::1;::::0;::::1;14025:21:11::0;14082:2;14062:18;;;14055:30;14121:33;14101:18;;;14094:61;14172:18;;2317:63:2::1;13841:355:11::0;2317:63:2::1;1744:1;2455:7;:18:::0;1901:8:5;1934:24:::2;:22;:24::i;:::-;1926:66;;;::::0;-1:-1:-1;;;1926:66:5;;17598:2:11;1926:66:5::2;::::0;::::2;17580:21:11::0;17637:2;17617:18;;;17610:30;17676:31;17656:18;;;17649:59;17725:18;;1926:66:5::2;17396:353:11::0;1926:66:5::2;2017:1;2010:4;:8;2002:45;;;::::0;-1:-1:-1;;;2002:45:5;;17956:2:11;2002:45:5::2;::::0;::::2;17938:21:11::0;17995:2;17975:18;;;17968:30;18034:26;18014:18;;;18007:54;18078:18;;2002:45:5::2;17754:348:11::0;2002:45:5::2;2065:28;2084:8;;2065:18;:28::i;:::-;2057:71;;;::::0;-1:-1:-1;;;2057:71:5;;18309:2:11;2057:71:5::2;::::0;::::2;18291:21:11::0;18348:2;18328:18;;;18321:30;18387:32;18367:18;;;18360:60;18437:18;;2057:71:5::2;18107:354:11::0;2057:71:5::2;2139:21;2163:16;2170:4:::0;2178:1:::2;2163:16;:::i;:::-;2139:40:::0;-1:-1:-1;1083:4:5::2;2210:43;:30:::0;::::2;:13;8950:7:::0;6503:13:7;-1:-1:-1;;6503:31:7;;8906:91:5;2210:13:::2;:30;;;;:::i;:::-;:43;;2189:109;;;::::0;-1:-1:-1;;;2189:109:5;;19076:2:11;2189:109:5::2;::::0;::::2;19058:21:11::0;19115:2;19095:18;;;19088:30;19154:21;19134:18;;;19127:49;19193:18;;2189:109:5::2;18874:343:11::0;2189:109:5::2;2309:13;2325:23;8711:25:::0;;;8631:112;2325:23:::2;2309:39:::0;-1:-1:-1;2358:14:5::2;2375:22;;::::0;::::2;2309:39:::0;2375:22:::2;:::i;:::-;2358:39;;2425:9;2415:6;:19;;2407:63;;;::::0;-1:-1:-1;;;2407:63:5;;19597:2:11;2407:63:5::2;::::0;::::2;19579:21:11::0;19636:2;19616:18;;;19609:30;19675:33;19655:18;;;19648:61;19726:18;;2407:63:5::2;19395:355:11::0;2407:63:5::2;2486:9;2481:92;2505:4;2501:1;:8;2481:92;;;2558:4;2530:12;:25;2543:8;;2552:1;2543:11;;;;;;;:::i;:::-;;;;;;;2530:25;;;;;;;;;;;;:32;;;;;;;;;;;;;;;;;;2511:3;;;;;:::i;:::-;;;;2481:92;;;-1:-1:-1::0;2582:39:5::2;39008:10:7::0;2592:12:5::2;2606:14;2582:39;;:9;:39::i;:::-;-1:-1:-1::0;;1701:1:2::1;2628:7;:22:::0;-1:-1:-1;;;;1746:882:5:o;8084:419::-;8230:30;;8206:4;;8226:79;;-1:-1:-1;8289:5:5;8282:12;;8226:79;8333:163;8369:10;;8333:163;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8397:30:5;;8455:26;;-1:-1:-1;;19904:2:11;19900:15;;;19896:53;8455:26:5;;;19884:66:11;8397:30:5;;-1:-1:-1;19966:12:11;;;-1:-1:-1;8455:26:5;;;;;;;;;;;;8445:37;;;;;;8333:18;:163::i;:::-;8314:182;8084:419;-1:-1:-1;;;;8084:419:5:o;10366:169::-;1094:13:0;:11;:13::i;:::-;10451:28:5::1;:12;10466:13:::0;;10451:28:::1;:::i;:::-;;10494:34;10514:13;;10494:34;;;;;;;:::i;2949:416::-:0;1094:13:0;:11;:13::i;:::-;1744:1:2::1;2325:7;;:19;;2317:63;;;::::0;-1:-1:-1;;;2317:63:2;;14043:2:11;2317:63:2::1;::::0;::::1;14025:21:11::0;14082:2;14062:18;;;14055:30;14121:33;14101:18;;;14094:61;14172:18;;2317:63:2::1;13841:355:11::0;2317:63:2::1;1744:1;2455:7;:18:::0;-1:-1:-1;;;;;3087:22:5;::::2;3079:47;;;::::0;-1:-1:-1;;;3079:47:5;;20191:2:11;3079:47:5::2;::::0;::::2;20173:21:11::0;20230:2;20210:18;;;20203:30;20269:14;20249:18;;;20242:42;20301:18;;3079:47:5::2;19989:336:11::0;3079:47:5::2;3162:1;3144:15;:19;;;3136:56;;;::::0;-1:-1:-1;;;3136:56:5;;17956:2:11;3136:56:5::2;::::0;::::2;17938:21:11::0;17995:2;17975:18;;;17968:30;18034:26;18014:18;;;18007:54;18078:18;;3136:56:5::2;17754:348:11::0;3136:56:5::2;1083:4;3223:44;:31:::0;::::2;:13;8950:7:::0;6503:13:7;-1:-1:-1;;6503:31:7;;8906:91:5;3223:13:::2;:31;;;;:::i;:::-;:44;;3202:110;;;::::0;-1:-1:-1;;;3202:110:5;;19076:2:11;3202:110:5::2;::::0;::::2;19058:21:11::0;19115:2;19095:18;;;19088:30;19154:21;19134:18;;;19127:49;19193:18;;3202:110:5::2;18874:343:11::0;3202:110:5::2;3322:36;3332:8;3342:15;3322:36;;:9;:36::i;:::-;-1:-1:-1::0;;1701:1:2::1;2628:7;:22:::0;2949:416:5:o;3521:695::-;12553:9;39008:10:7;12553:25:5;12545:64;;;;-1:-1:-1;;;12545:64:5;;17243:2:11;12545:64:5;;;17225:21:11;17282:2;17262:18;;;17255:30;17321:28;17301:18;;;17294:56;17367:18;;12545:64:5;17041:350:11;12545:64:5;1744:1:2::1;2325:7;;:19;;2317:63;;;::::0;-1:-1:-1;;;2317:63:2;;14043:2:11;2317:63:2::1;::::0;::::1;14025:21:11::0;14082:2;14062:18;;;14055:30;14121:33;14101:18;;;14094:61;14172:18;;2317:63:2::1;13841:355:11::0;2317:63:2::1;1744:1;2455:7;:18:::0;3682:24:5::2;:22;:24::i;:::-;3674:67;;;::::0;-1:-1:-1;;;3674:67:5;;20532:2:11;3674:67:5::2;::::0;::::2;20514:21:11::0;20571:2;20551:18;;;20544:30;20610:32;20590:18;;;20583:60;20660:18;;3674:67:5::2;20330:354:11::0;3674:67:5::2;3772:44;39008:10:7::0;3805::5::2;;3772:18;:44::i;:::-;3751:138;;;::::0;-1:-1:-1;;;3751:138:5;;20891:2:11;3751:138:5::2;::::0;::::2;20873:21:11::0;20930:2;20910:18;;;20903:30;20969:34;20949:18;;;20942:62;21040:17;21020:18;;;21013:45;21075:19;;3751:138:5::2;20689:411:11::0;3751:138:5::2;39008:10:7::0;3899:22:5::2;7954:25:7::0;;;:18;:25;;;;;;3924:39:5::2;::::0;3948:15;;1682:3:7;7954:40;3924:39:5::2;:::i;:::-;4013:19;:29:::0;3899:64;;-1:-1:-1;4013:29:5::2;::::0;;::::2;3994:48:::0;;::::2;;;3973:130;;;::::0;-1:-1:-1;;;3973:130:5;;21548:2:11;3973:130:5::2;::::0;::::2;21530:21:11::0;21587:2;21567:18;;;21560:30;21626:34;21606:18;;;21599:62;21697:5;21677:18;;;21670:33;21720:19;;3973:130:5::2;21346:399:11::0;3973:130:5::2;4114:47;4120:15;4137:23;8711:25:::0;;;8631:112;4137:23:::2;4114:5;:47::i;:::-;4171:38;39008:10:7::0;-1:-1:-1;;;;;8272:25:7;8255:14;8272:25;;;:18;:25;;;;;;;1824:14;8466:32;1682:3;8503:24;;;8465:63;8538:34;;8184:395;4171:38:5::2;-1:-1:-1::0;;1701:1:2::1;2628:7;:22:::0;-1:-1:-1;;3521:695:5:o;6918:291::-;7008:29;;6973:4;;7008:33;;;;:96;;-1:-1:-1;7075:29:5;;7057:15;:47;7008:96;:142;;;;-1:-1:-1;7120:30:5;7008:142;:194;;;;-1:-1:-1;;7166:30:5;;:36;;;6918:291::o;2081:198:0:-;1094:13;:11;:13::i;:::-;-1:-1:-1;;;;;2169:22:0;::::1;2161:73;;;::::0;-1:-1:-1;;;2161:73:0;;21952:2:11;2161:73:0::1;::::0;::::1;21934:21:11::0;21991:2;21971:18;;;21964:30;22030:34;22010:18;;;22003:62;22101:8;22081:18;;;22074:36;22127:19;;2161:73:0::1;21750:402:11::0;2161:73:0::1;2244:28;2263:8;2244:18;:28::i;:::-;2081:198:::0;:::o;17714:277:7:-;17779:4;17833:7;6791:1:5;17814:26:7;;:65;;;;;17866:13;;17856:7;:23;17814:65;:151;;;;-1:-1:-1;;17916:26:7;;;;:17;:26;;;;;;-1:-1:-1;;;17916:44:7;:49;;17714:277::o;1359:130:0:-;1273:6;;-1:-1:-1;;;;;1273:6:0;39008:10:7;1422:23:0;1414:68;;;;-1:-1:-1;;;1414:68:0;;22359:2:11;1414:68:0;;;22341:21:11;;;22378:18;;;22371:30;22437:34;22417:18;;;22410:62;22489:18;;1414:68:0;22157:356:11;12472:1249:7;12539:7;12573;;6791:1:5;12619:23:7;12615:1042;;12671:13;;12664:4;:20;12660:997;;;12708:14;12725:23;;;:17;:23;;;;;;-1:-1:-1;;;12812:24:7;;12808:831;;13467:111;13474:11;13467:111;;-1:-1:-1;;;13544:6:7;13526:25;;;;:17;:25;;;;;;13467:111;;12808:831;12686:971;12660:997;13683:31;;;;;;;;;;;;;;11246:292:5;1685:7:1;;-1:-1:-1;;;1685:7:1;;;;11496:9:5;11488:43;;;;-1:-1:-1;;;11488:43:5;;22720:2:11;11488:43:5;;;22702:21:11;22759:2;22739:18;;;22732:30;22798:23;22778:18;;;22771:51;22839:18;;11488:43:5;22518:345:11;2433:117:1;1486:16;:14;:16::i;:::-;2491:7:::1;:15:::0;;-1:-1:-1;;;;2491:15:1::1;::::0;;2521:22:::1;39008:10:7::0;2530:12:1::1;2521:22;::::0;-1:-1:-1;;;;;1738:55:11;;;1720:74;;1708:2;1693:18;2521:22:1::1;;;;;;;2433:117::o:0;2186:115::-;1239:19;:17;:19::i;:::-;2245:7:::1;:14:::0;;-1:-1:-1;;;;2245:14:1::1;-1:-1:-1::0;;;2245:14:1::1;::::0;;2274:20:::1;2281:12;39008:10:7::0;;38922:103;2433:187:0;2525:6;;;-1:-1:-1;;;;;2541:17:0;;;-1:-1:-1;;2541:17:0;;;;;;;2573:40;;2525:6;;;2541:17;2525:6;;2573:40;;2506:16;;2573:40;2496:124;2433:187;:::o;11936:159:7:-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12063:24:7;;;;:17;:24;;;;;;12044:44;;-1:-1:-1;;;;;;;;;;;;;13924:41:7;;;;1961:3;14009:33;;;13975:68;;-1:-1:-1;;;13975:68:7;-1:-1:-1;;;14072:24:7;;:29;;-1:-1:-1;;;14053:48:7;;;;2470:3;14140:28;;;;-1:-1:-1;;;14111:58:7;-1:-1:-1;13815:361:7;25939:697;26117:88;;-1:-1:-1;;;26117:88:7;;26097:4;;-1:-1:-1;;;;;26117:45:7;;;;;:88;;39008:10;;26184:4;;26190:7;;26199:5;;26117:88;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26117:88:7;;;;;;;;-1:-1:-1;;26117:88:7;;;;;;;;;;;;:::i;:::-;;;26113:517;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;26395:13:7;;26391:229;;26440:40;;-1:-1:-1;;;26440:40:7;;;;;;;;;;;26391:229;26580:6;26574:13;26565:6;26561:2;26557:15;26550:38;26113:517;-1:-1:-1;;;;;;26273:64:7;-1:-1:-1;;;26273:64:7;;-1:-1:-1;25939:697:7;;;;;;:::o;11681:164::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11791:47:7;11810:27;11829:7;11810:18;:27::i;:::-;-1:-1:-1;;;;;;;;;;;;;13924:41:7;;;;1961:3;14009:33;;;13975:68;;-1:-1:-1;;;13975:68:7;-1:-1:-1;;;14072:24:7;;:29;;-1:-1:-1;;;14053:48:7;;;;2470:3;14140:28;;;;-1:-1:-1;;;14111:58:7;-1:-1:-1;13815:361:7;9107:106:5;9167:13;9199:7;9192:14;;;;;:::i;39122:1548:7:-;39599:4;39593:11;;39606:4;39589:22;39683:17;;;;39589:22;40033:5;40015:419;40080:1;40075:3;40071:11;40064:18;;40248:2;40242:4;40238:13;40234:2;40230:22;40225:3;40217:36;40340:2;40330:13;;;40395:25;;40413:5;;40395:25;40015:419;;;-1:-1:-1;40462:13:7;;;-1:-1:-1;;40575:14:7;;;40635:19;;;40575:14;39122:1548;-1:-1:-1;39122:1548:7:o;7341:522:5:-;7445:4;7480:8;39008:10:7;7445:4:5;7544:292;7568:4;7564:1;:8;7544:292;;;7597:12;:25;7610:8;;7619:1;7610:11;;;;;;;:::i;:::-;;;;;;;;;;7597:25;;-1:-1:-1;7597:25:5;;;;;;;;-1:-1:-1;7597:25:5;;;;7593:76;;;7649:5;7642:12;;;;;;;7593:76;7709:15;;7682:13;;-1:-1:-1;;;;;7709:15:5;7698:35;7734:8;;7743:1;7734:11;;;;;;;:::i;:::-;;;;;;;7698:48;;;;;;;;;;;;;2640:25:11;;2628:2;2613:18;;2494:177;7698:48:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7682:64;;7773:6;-1:-1:-1;;;;;7764:15:5;:5;-1:-1:-1;;;;;7764:15:5;;7760:66;;7806:5;7799:12;;;;;;;;7760:66;-1:-1:-1;7574:3:5;;;:::i;:::-;;;7544:292;;;-1:-1:-1;7852:4:5;;7341:522;-1:-1:-1;;;;;7341:522:5:o;32908:110:7:-;32984:27;32994:2;32998:8;32984:27;;;;;;;;;;;;:9;:27::i;:::-;32908:110;;:::o;1153:184:4:-;1274:4;1326;1297:25;1310:5;1317:4;1297:12;:25::i;:::-;:33;;1153:184;-1:-1:-1;;;;1153:184:4:o;4399:611:5:-;4499:1;4481:15;:19;;;4473:56;;;;-1:-1:-1;;;4473:56:5;;17956:2:11;4473:56:5;;;17938:21:11;17995:2;17975:18;;;17968:30;18034:26;18014:18;;;18007:54;18078:18;;4473:56:5;17754:348:11;4473:56:5;1137:1;4560:37;;;;;4539:133;;;;-1:-1:-1;;;4539:133:5;;24097:2:11;4539:133:5;;;24079:21:11;24136:2;24116:18;;;24109:30;24175:34;24155:18;;;24148:62;24246:19;24226:18;;;24219:47;24283:19;;4539:133:5;23895:413:11;4539:133:5;1083:4;4703:44;:31;;:13;8950:7;6503:13:7;-1:-1:-1;;6503:31:7;;8906:91:5;4703:13;:31;;;;:::i;:::-;:44;;4682:110;;;;-1:-1:-1;;;4682:110:5;;19076:2:11;4682:110:5;;;19058:21:11;19115:2;19095:18;;;19088:30;19154:21;19134:18;;;19127:49;19193:18;;4682:110:5;18874:343:11;4682:110:5;4802:14;4819:24;;;;:6;:24;:::i;:::-;4802:41;;4871:9;4861:6;:19;;4853:63;;;;-1:-1:-1;;;4853:63:5;;19597:2:11;4853:63:5;;;19579:21:11;19636:2;19616:18;;;19609:30;19675:33;19655:18;;;19648:61;19726:18;;4853:63:5;19395:355:11;4853:63:5;4926:40;39008:10:7;4936:12:5;38922:103:7;4926:40:5;4976:27;4996:6;4976:19;:27::i;1945:106:1:-;1685:7;;-1:-1:-1;;;1685:7:1;;;;2003:41;;;;-1:-1:-1;;;2003:41:1;;24515:2:11;2003:41:1;;;24497:21:11;24554:2;24534:18;;;24527:30;24593:22;24573:18;;;24566:50;24633:18;;2003:41:1;24313:344:11;1767:106:1;1685:7;;-1:-1:-1;;;1685:7:1;;;;1836:9;1828:38;;;;-1:-1:-1;;;1828:38:1;;24864:2:11;1828:38:1;;;24846:21:11;24903:2;24883:18;;;24876:30;24942:18;24922;;;24915:46;24978:18;;1828:38:1;24662:340:11;32160:669:7;32286:19;32292:2;32296:8;32286:5;:19::i;:::-;-1:-1:-1;;;;;32344:14:7;;;:19;32340:473;;32383:11;32397:13;32444:14;;;32476:229;32506:62;32545:1;32549:2;32553:7;;;;;;32562:5;32506:30;:62::i;:::-;32501:165;;32603:40;;-1:-1:-1;;;32603:40:7;;;;;;;;;;;32501:165;32700:3;32692:5;:11;32476:229;;32785:3;32768:13;;:20;32764:34;;32790:8;;;32764:34;32365:448;;32160:669;;;:::o;1991:290:4:-;2074:7;2116:4;2074:7;2130:116;2154:5;:12;2150:1;:16;2130:116;;;2202:33;2212:12;2226:5;2232:1;2226:8;;;;;;;;:::i;:::-;;;;;;;2202:9;:33::i;:::-;2187:48;-1:-1:-1;2168:3:4;;;;:::i;:::-;;;;2130:116;;;-1:-1:-1;2262:12:4;1991:290;-1:-1:-1;;;1991:290:4:o;5200:171:5:-;5280:7;5268:9;:19;5264:101;;;39008:10:7;5303:51:5;5334:19;5346:7;5334:9;:19;:::i;:::-;5303:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27082:2396:7;27154:20;27177:13;27204;27200:44;;27226:18;;;;;;;;;;;;;;27200:44;27255:61;27285:1;27289:2;27293:12;27307:8;27255:21;:61::i;:::-;-1:-1:-1;;;;;27719:22:7;;;;;;:18;:22;;;;1452:2;27719:22;;;:71;;27757:32;27745:45;;27719:71;;;28026:31;;;:17;:31;;;;;-1:-1:-1;15080:15:7;;15054:24;15050:46;14660:11;14635:23;14631:41;14628:52;14618:63;;28026:170;;28255:23;;;;28026:31;;27719:22;;28744:25;27719:22;;28600:328;29005:1;28991:12;28987:20;28946:339;29045:3;29036:7;29033:16;28946:339;;29259:7;29249:8;29246:1;29219:25;29216:1;29213;29208:59;29097:1;29084:15;28946:339;;;-1:-1:-1;29316:13:7;29312:45;;29338:19;;;;;;;;;;;;;;29312:45;29372:13;:19;-1:-1:-1;22765:179:7;;;:::o;8054:147:4:-;8117:7;8147:1;8143;:5;:51;;8275:13;8366:15;;;8401:4;8394:15;;;8447:4;8431:21;;8143:51;;;-1:-1:-1;8275:13:4;8366:15;;;8401:4;8394:15;8447:4;8431:21;;;8054:147::o;-1:-1:-1:-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;14:177:11;-1:-1:-1;;;;;;92:5:11;88:78;81:5;78:89;68:117;;181:1;178;171:12;196:245;254:6;307:2;295:9;286:7;282:23;278:32;275:52;;;323:1;320;313:12;275:52;362:9;349:23;381:30;405:5;381:30;:::i;638:258::-;710:1;720:113;734:6;731:1;728:13;720:113;;;810:11;;;804:18;791:11;;;784:39;756:2;749:10;720:113;;;851:6;848:1;845:13;842:48;;;-1:-1:-1;;886:1:11;868:16;;861:27;638:258::o;901:::-;943:3;981:5;975:12;1008:6;1003:3;996:19;1024:63;1080:6;1073:4;1068:3;1064:14;1057:4;1050:5;1046:16;1024:63;:::i;:::-;1141:2;1120:15;-1:-1:-1;;1116:29:11;1107:39;;;;1148:4;1103:50;;901:258;-1:-1:-1;;901:258:11:o;1164:220::-;1313:2;1302:9;1295:21;1276:4;1333:45;1374:2;1363:9;1359:18;1351:6;1333:45;:::i;1389:180::-;1448:6;1501:2;1489:9;1480:7;1476:23;1472:32;1469:52;;;1517:1;1514;1507:12;1469:52;-1:-1:-1;1540:23:11;;1389:180;-1:-1:-1;1389:180:11:o;1805:205::-;1902:6;1955:3;1943:9;1934:7;1930:23;1926:33;1923:53;;;1972:1;1969;1962:12;1923:53;-1:-1:-1;1995:9:11;1805:205;-1:-1:-1;1805:205:11:o;2015:154::-;-1:-1:-1;;;;;2094:5:11;2090:54;2083:5;2080:65;2070:93;;2159:1;2156;2149:12;2174:315;2242:6;2250;2303:2;2291:9;2282:7;2278:23;2274:32;2271:52;;;2319:1;2316;2309:12;2271:52;2358:9;2345:23;2377:31;2402:5;2377:31;:::i;:::-;2427:5;2479:2;2464:18;;;;2451:32;;-1:-1:-1;;;2174:315:11:o;2676:456::-;2753:6;2761;2769;2822:2;2810:9;2801:7;2797:23;2793:32;2790:52;;;2838:1;2835;2828:12;2790:52;2877:9;2864:23;2896:31;2921:5;2896:31;:::i;:::-;2946:5;-1:-1:-1;3003:2:11;2988:18;;2975:32;3016:33;2975:32;3016:33;:::i;:::-;2676:456;;3068:7;;-1:-1:-1;;;3122:2:11;3107:18;;;;3094:32;;2676:456::o;3137:247::-;3196:6;3249:2;3237:9;3228:7;3224:23;3220:32;3217:52;;;3265:1;3262;3255:12;3217:52;3304:9;3291:23;3323:31;3348:5;3323:31;:::i;3389:632::-;3560:2;3612:21;;;3682:13;;3585:18;;;3704:22;;;3531:4;;3560:2;3783:15;;;;3757:2;3742:18;;;3531:4;3826:169;3840:6;3837:1;3834:13;3826:169;;;3901:13;;3889:26;;3970:15;;;;3935:12;;;;3862:1;3855:9;3826:169;;4026:592;4097:6;4105;4158:2;4146:9;4137:7;4133:23;4129:32;4126:52;;;4174:1;4171;4164:12;4126:52;4214:9;4201:23;4243:18;4284:2;4276:6;4273:14;4270:34;;;4300:1;4297;4290:12;4270:34;4338:6;4327:9;4323:22;4313:32;;4383:7;4376:4;4372:2;4368:13;4364:27;4354:55;;4405:1;4402;4395:12;4354:55;4445:2;4432:16;4471:2;4463:6;4460:14;4457:34;;;4487:1;4484;4477:12;4457:34;4532:7;4527:2;4518:6;4514:2;4510:15;4506:24;4503:37;4500:57;;;4553:1;4550;4543:12;4500:57;4584:2;4576:11;;;;;4606:6;;-1:-1:-1;4026:592:11;;-1:-1:-1;;;;4026:592:11:o;4828:367::-;4891:8;4901:6;4955:3;4948:4;4940:6;4936:17;4932:27;4922:55;;4973:1;4970;4963:12;4922:55;-1:-1:-1;4996:20:11;;5039:18;5028:30;;5025:50;;;5071:1;5068;5061:12;5025:50;5108:4;5100:6;5096:17;5084:29;;5168:3;5161:4;5151:6;5148:1;5144:14;5136:6;5132:27;5128:38;5125:47;5122:67;;;5185:1;5182;5175:12;5122:67;4828:367;;;;;:::o;5200:437::-;5286:6;5294;5347:2;5335:9;5326:7;5322:23;5318:32;5315:52;;;5363:1;5360;5353:12;5315:52;5403:9;5390:23;5436:18;5428:6;5425:30;5422:50;;;5468:1;5465;5458:12;5422:50;5507:70;5569:7;5560:6;5549:9;5545:22;5507:70;:::i;:::-;5596:8;;5481:96;;-1:-1:-1;5200:437:11;-1:-1:-1;;;;5200:437:11:o;6019:724::-;6254:2;6306:21;;;6376:13;;6279:18;;;6398:22;;;6225:4;;6254:2;6477:15;;;;6451:2;6436:18;;;6225:4;6520:197;6534:6;6531:1;6528:13;6520:197;;;6583:52;6631:3;6622:6;6616:13;-1:-1:-1;;;;;5732:5:11;5726:12;5722:61;5717:3;5710:74;5845:18;5837:4;5830:5;5826:16;5820:23;5816:48;5809:4;5804:3;5800:14;5793:72;5928:4;5921:5;5917:16;5911:23;5904:31;5897:39;5890:4;5885:3;5881:14;5874:63;5998:8;5990:4;5983:5;5979:16;5973:23;5969:38;5962:4;5957:3;5953:14;5946:62;;;5642:372;6583:52;6692:15;;;;6664:4;6655:14;;;;;6556:1;6549:9;6520:197;;7167:383;7244:6;7252;7260;7313:2;7301:9;7292:7;7288:23;7284:32;7281:52;;;7329:1;7326;7319:12;7281:52;7368:9;7355:23;7387:31;7412:5;7387:31;:::i;:::-;7437:5;7489:2;7474:18;;7461:32;;-1:-1:-1;7540:2:11;7525:18;;;7512:32;;7167:383;-1:-1:-1;;;7167:383:11:o;7555:416::-;7620:6;7628;7681:2;7669:9;7660:7;7656:23;7652:32;7649:52;;;7697:1;7694;7687:12;7649:52;7736:9;7723:23;7755:31;7780:5;7755:31;:::i;:::-;7805:5;-1:-1:-1;7862:2:11;7847:18;;7834:32;7904:15;;7897:23;7885:36;;7875:64;;7935:1;7932;7925:12;7875:64;7958:7;7948:17;;;7555:416;;;;;:::o;7976:184::-;-1:-1:-1;;;8025:1:11;8018:88;8125:4;8122:1;8115:15;8149:4;8146:1;8139:15;8165:275;8236:2;8230:9;8301:2;8282:13;;-1:-1:-1;;8278:27:11;8266:40;;8336:18;8321:34;;8357:22;;;8318:62;8315:88;;;8383:18;;:::i;:::-;8419:2;8412:22;8165:275;;-1:-1:-1;8165:275:11:o;8445:1108::-;8540:6;8548;8556;8564;8617:3;8605:9;8596:7;8592:23;8588:33;8585:53;;;8634:1;8631;8624:12;8585:53;8673:9;8660:23;8692:31;8717:5;8692:31;:::i;:::-;8742:5;-1:-1:-1;8766:2:11;8805:18;;;8792:32;8833:33;8792:32;8833:33;:::i;:::-;8885:7;-1:-1:-1;8939:2:11;8924:18;;8911:32;;-1:-1:-1;8994:2:11;8979:18;;8966:32;9017:18;9047:14;;;9044:34;;;9074:1;9071;9064:12;9044:34;9112:6;9101:9;9097:22;9087:32;;9157:7;9150:4;9146:2;9142:13;9138:27;9128:55;;9179:1;9176;9169:12;9128:55;9215:2;9202:16;9237:2;9233;9230:10;9227:36;;;9243:18;;:::i;:::-;9285:53;9328:2;9309:13;;-1:-1:-1;;9305:27:11;9301:36;;9285:53;:::i;:::-;9272:66;;9361:2;9354:5;9347:17;9401:7;9396:2;9391;9387;9383:11;9379:20;9376:33;9373:53;;;9422:1;9419;9412:12;9373:53;9477:2;9472;9468;9464:11;9459:2;9452:5;9448:14;9435:45;9521:1;9516:2;9511;9504:5;9500:14;9496:23;9489:34;;9542:5;9532:15;;;;;8445:1108;;;;;;;:::o;9558:268::-;5726:12;;-1:-1:-1;;;;;5722:61:11;5710:74;;5837:4;5826:16;;;5820:23;5845:18;5816:48;5800:14;;;5793:72;5928:4;5917:16;;;5911:23;5904:31;5897:39;5881:14;;;5874:63;5990:4;5979:16;;;5973:23;5998:8;5969:38;5953:14;;;5946:62;9756:3;9741:19;;9769:51;5642:372;9831:572;9926:6;9934;9942;9995:2;9983:9;9974:7;9970:23;9966:32;9963:52;;;10011:1;10008;10001:12;9963:52;10050:9;10037:23;10069:31;10094:5;10069:31;:::i;:::-;10119:5;-1:-1:-1;10175:2:11;10160:18;;10147:32;10202:18;10191:30;;10188:50;;;10234:1;10231;10224:12;10188:50;10273:70;10335:7;10326:6;10315:9;10311:22;10273:70;:::i;:::-;9831:572;;10362:8;;-1:-1:-1;10247:96:11;;-1:-1:-1;;;;9831:572:11:o;10408:129::-;10493:18;10486:5;10482:30;10475:5;10472:41;10462:69;;10527:1;10524;10517:12;10542:386;10609:6;10617;10670:2;10658:9;10649:7;10645:23;10641:32;10638:52;;;10686:1;10683;10676:12;10638:52;10725:9;10712:23;10744:31;10769:5;10744:31;:::i;:::-;10794:5;-1:-1:-1;10851:2:11;10836:18;;10823:32;10864;10823;10864;:::i;10933:570::-;11027:6;11035;11043;11096:2;11084:9;11075:7;11071:23;11067:32;11064:52;;;11112:1;11109;11102:12;11064:52;11151:9;11138:23;11170:30;11194:5;11170:30;:::i;11508:388::-;11576:6;11584;11637:2;11625:9;11616:7;11612:23;11608:32;11605:52;;;11653:1;11650;11643:12;11605:52;11692:9;11679:23;11711:31;11736:5;11711:31;:::i;:::-;11761:5;-1:-1:-1;11818:2:11;11803:18;;11790:32;11831:33;11790:32;11831:33;:::i;11901:437::-;11980:1;11976:12;;;;12023;;;12044:61;;12098:4;12090:6;12086:17;12076:27;;12044:61;12151:2;12143:6;12140:14;12120:18;12117:38;12114:218;;;-1:-1:-1;;;12185:1:11;12178:88;12289:4;12286:1;12279:15;12317:4;12314:1;12307:15;12745:519;12932:5;12919:19;12947:32;12971:7;12947:32;:::i;:::-;13060:18;13051:7;13047:32;13025:18;13021:23;13014:4;13008:11;13004:41;13001:79;12995:4;12988:93;;13135:2;13128:5;13124:14;13111:28;13107:1;13101:4;13097:12;13090:50;13194:2;13187:5;13183:14;13170:28;13166:1;13160:4;13156:12;13149:50;13253:2;13246:5;13242:14;13229:28;13225:1;13219:4;13215:12;13208:50;12745:519;;:::o;13269:567::-;13477:3;13462:19;;13503:20;;13532:30;13503:20;13532:30;:::i;:::-;13600:18;13593:5;13589:30;13578:9;13571:49;;13683:4;13675:6;13671:17;13658:31;13651:4;13640:9;13636:20;13629:61;13753:4;13745:6;13741:17;13728:31;13721:4;13710:9;13706:20;13699:61;13823:4;13815:6;13811:17;13798:31;13791:4;13780:9;13776:20;13769:61;13269:567;;;;:::o;14545:936::-;14640:6;14671:2;14714;14702:9;14693:7;14689:23;14685:32;14682:52;;;14730:1;14727;14720:12;14682:52;14763:9;14757:16;14792:18;14833:2;14825:6;14822:14;14819:34;;;14849:1;14846;14839:12;14819:34;14887:6;14876:9;14872:22;14862:32;;14932:7;14925:4;14921:2;14917:13;14913:27;14903:55;;14954:1;14951;14944:12;14903:55;14983:2;14977:9;15005:2;15001;14998:10;14995:36;;;15011:18;;:::i;:::-;15057:2;15054:1;15050:10;15040:20;;15080:28;15104:2;15100;15096:11;15080:28;:::i;:::-;15142:15;;;15212:11;;;15208:20;;;15173:12;;;;15240:19;;;15237:39;;;15272:1;15269;15262:12;15237:39;15296:11;;;;15316:135;15332:6;15327:3;15324:15;15316:135;;;15398:10;;15386:23;;15349:12;;;;15429;;;;15316:135;;;15470:5;14545:936;-1:-1:-1;;;;;;;;14545:936:11:o;15486:184::-;-1:-1:-1;;;15535:1:11;15528:88;15635:4;15632:1;15625:15;15659:4;15656:1;15649:15;15675:184;-1:-1:-1;;;15724:1:11;15717:88;15824:4;15821:1;15814:15;15848:4;15845:1;15838:15;15864:135;15903:3;-1:-1:-1;;15924:17:11;;15921:43;;;15944:18;;:::i;:::-;-1:-1:-1;15991:1:11;15980:13;;15864:135::o;16004:390::-;16163:2;16152:9;16145:21;16202:6;16197:2;16186:9;16182:18;16175:34;16259:6;16251;16246:2;16235:9;16231:18;16218:48;16315:1;16286:22;;;16310:2;16282:31;;;16275:42;;;;16378:2;16357:15;;;-1:-1:-1;;16353:29:11;16338:45;16334:54;;16004:390;-1:-1:-1;16004:390:11:o;16399:637::-;16679:3;16717:6;16711:13;16733:53;16779:6;16774:3;16767:4;16759:6;16755:17;16733:53;:::i;:::-;16849:13;;16808:16;;;;16871:57;16849:13;16808:16;16905:4;16893:17;;16871:57;:::i;:::-;16993:7;16950:20;;16979:22;;;17028:1;17017:13;;16399:637;-1:-1:-1;;;;16399:637:11:o;18466:270::-;18505:7;18537:18;18582:2;18579:1;18575:10;18612:2;18609:1;18605:10;18668:3;18664:2;18660:12;18655:3;18652:21;18645:3;18638:11;18631:19;18627:47;18624:73;;;18677:18;;:::i;:::-;18717:13;;18466:270;-1:-1:-1;;;;18466:270:11:o;18741:128::-;18781:3;18812:1;18808:6;18805:1;18802:13;18799:39;;;18818:18;;:::i;:::-;-1:-1:-1;18854:9:11;;18741:128::o;19222:168::-;19262:7;19328:1;19324;19320:6;19316:14;19313:1;19310:21;19305:1;19298:9;19291:17;19287:45;19284:71;;;19335:18;;:::i;:::-;-1:-1:-1;19375:9:11;;19222:168::o;21105:236::-;21144:3;21172:18;21217:2;21214:1;21210:10;21247:2;21244:1;21240:10;21278:3;21274:2;21270:12;21265:3;21262:21;21259:47;;;21286:18;;:::i;:::-;21322:13;;21105:236;-1:-1:-1;;;;21105:236:11:o;22868:512::-;23062:4;-1:-1:-1;;;;;23172:2:11;23164:6;23160:15;23149:9;23142:34;23224:2;23216:6;23212:15;23207:2;23196:9;23192:18;23185:43;;23264:6;23259:2;23248:9;23244:18;23237:34;23307:3;23302:2;23291:9;23287:18;23280:31;23328:46;23369:3;23358:9;23354:19;23346:6;23328:46;:::i;:::-;23320:54;22868:512;-1:-1:-1;;;;;;22868:512:11:o;23385:249::-;23454:6;23507:2;23495:9;23486:7;23482:23;23478:32;23475:52;;;23523:1;23520;23513:12;23475:52;23555:9;23549:16;23574:30;23598:5;23574:30;:::i;23639:251::-;23709:6;23762:2;23750:9;23741:7;23737:23;23733:32;23730:52;;;23778:1;23775;23768:12;23730:52;23810:9;23804:16;23829:31;23854:5;23829:31;:::i;25007:125::-;25047:4;25075:1;25072;25069:8;25066:34;;;25080:18;;:::i;:::-;-1:-1:-1;25117:9:11;;25007:125::o
Swarm Source
ipfs://46480e3f3fcf6c4b0886c159717115e1b0127ff6456046947599e2f5cb907c76
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.