Overview
TokenID
4820
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
LuckyPunxNFT
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; /* 77 77 77 77 77 77 77 77 77 ,adPPYba, 77 ,d7 7b d7 7b,dPPYba, 77 77 7b,dPPYba, 7b, ,d7 77 77 77 a7" "" 77 ,a7" `7b d7' 77P' "7a 77 77 77P' `"7a `Y7, ,7P' 77 77 77 7b 7777[ `7b d7' 77 d7 77 77 77 77 )777( 77 "7a, ,a77 "7a, ,aa 77`"Yba, `7b,d7' 77b, ,a7" "7a, ,a77 77 77 ,d7" "7b, 77 `"YbbdP'Y7 `"Ybbd7"' 77 `Y7a Y77' 77`YbbdP"' `"YbbdP'Y7 77 77 7P' `Y7 d7' 77 d7' 77 */ import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "../interfaces/ILPXMetadata.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract LuckyPunxNFT is ERC721A, ERC721AQueryable, Ownable, DefaultOperatorFilterer, ReentrancyGuard { using Strings for uint256; using SafeERC20 for IERC20; uint64 public maxSupply = 7777; uint64 public maxPerWallet = 2; uint64 public whitelistMaxPerWallet = 3; uint64 public constant ROYALTY_FEE = 63; uint64 public maxLuckLevel = 5; uint256 public constant PUBLIC_SALE_PRICE = 0 ether; uint256 public constant WHITELIST_SALE_PRICE = 0 ether; address public metadataContractAddress; string public PROVENANCE_HASH; enum MintPhase{ CLOSED, WL, PUBLIC } MintPhase public phase = MintPhase.CLOSED; string public baseURI; bytes32 private whitelistHash; mapping (address => uint256) whitelistClaimedCount; mapping (uint256 => uint256) luckLevel; event MetadataContractAddressUpdated(address _address); event ActivePhaseUpdated(MintPhase _phase); event PaymentWithdrawalByOwner(uint256 _amount); /* Modifiers */ /// Modifier to limit access to modified calls to real users not contracts modifier callerIsUser() { require(tx.origin == msg.sender, "Contracts can not call this method."); _; } // Modifier to stop minting if not in public mint phase modifier publicMintIsLive() { require(phase == MintPhase.PUBLIC, "Public mint is not live."); _; } // Modifier to stop minting if not in public mint phase modifier whitelistMintIsLive() { require(phase == MintPhase.WL, "Whitelist mint is not live."); _; } // Modifier to check that we have enough supply to mint the requested quantity modifier canMintQuantity(uint256 _quantity) { require(totalSupply() + _quantity <= maxSupply, "Sold out!"); _; } // Modifier to check the correct amount has been transfered for the quantity and price modifier correctPricePaid(uint256 _price, uint256 _quantity) { require(msg.value == _quantity * _price, "Please send the correct amount in order to mint."); _; } // Modifier to check if token is a valid token modifier isIssuedToken(uint256 _tokenId) { require(_tokenId <= totalSupply(), "Invalid tokenId"); _; } /* Intialise and Minting */ /// @param _maxSupply The maximum supply constructor( uint64 _maxSupply ) ERC721A("LuckyPunxOffical", "LPXNFT") { require(_maxSupply >= 1, "Max supply must be 1 or higher"); maxSupply = _maxSupply; } /// Mints LPXNFT for public purchases /// @param _quantity The amount in ETHER function publicMint(uint256 _quantity) external payable publicMintIsLive canMintQuantity(_quantity) correctPricePaid(PUBLIC_SALE_PRICE, _quantity) callerIsUser { require(balanceOf(msg.sender) + _quantity <= maxPerWallet, "You have minted your max allowance."); _safeMint(msg.sender, _quantity); } /// Mints LPXNFT for whiteListAddresses /// @param _quantity The amount in ETHER function whitelistMint( uint256 _quantity, bytes32[] calldata _merkleProof ) external payable whitelistMintIsLive() canMintQuantity(_quantity) correctPricePaid(WHITELIST_SALE_PRICE, _quantity) callerIsUser { require(balanceOf(msg.sender) + _quantity <= whitelistMaxPerWallet, "You have minted your max allowance."); require(whitelistClaimedCount[msg.sender] + _quantity <= whitelistMaxPerWallet, "You have claimed your max allowance."); require(verifyAddress(_quantity, _merkleProof, whitelistHash), "You are not on the whitelist for this quantity."); whitelistClaimedCount[msg.sender] += _quantity; _safeMint(msg.sender, _quantity); } /* Public Functions */ /// Return the base URI function getBaseURI() external view returns (string memory) { return baseURI; } // Allows the token owner to agree to burning their token. Implements ERC721 underlying protected _burn // This may be used to combine the lucky7 club amulet and NFT in the future. function burn(uint256 tokenId) public virtual { _burn(tokenId, true); } /* Private Functions */ /// verifies whitelist address agaisnt merkel root hash /// @param _merkleProof the proof of the hashed address function verifyAddress(uint256 _quantity, bytes32[] calldata _merkleProof, bytes32 _merkleRoot) private view returns (bool) { bytes32 leaf = keccak256(abi.encode(msg.sender, _quantity + whitelistClaimedCount[msg.sender])); return MerkleProof.verify(_merkleProof, _merkleRoot, leaf); } /* Owner Only Functions for admin */ /// Reserve NFTs for owners function reserveNFTs(uint256 _quantity) external canMintQuantity(_quantity) onlyOwner { _safeMint(msg.sender, _quantity); } /// withdraw funds from contract function withdraw(uint256 _amount) external onlyOwner { uint256 balance = address(this).balance; require(_amount <= balance, 'not enough funds'); emit PaymentWithdrawalByOwner(_amount); payable(msg.sender).transfer(_amount); } /// withdraw all funds from contract function withdrawAll() external onlyOwner { uint256 balance = address(this).balance; emit PaymentWithdrawalByOwner(balance); payable(msg.sender).transfer(balance); } /// withdraw funds as other tokens /// @param _token the token to transfer into function withdrawTokens(IERC20 _token) external onlyOwner nonReentrant { uint256 balance = _token.balanceOf(address(this)); emit PaymentWithdrawalByOwner(balance); _token.safeTransfer(msg.sender, balance); } /// set max supply /// @param _maxSupply max number of tokens function setMaxSupply(uint64 _maxSupply) external onlyOwner { require(_maxSupply >= 1, 'Max supply should be 1 or higher'); maxSupply = _maxSupply; } /// sets the merkle root hash for whitelist verification /// @param _whitelistHash merkle root function setWhitelistHash(bytes32 _whitelistHash) external onlyOwner { require(_whitelistHash != bytes32(0), "whitelistHash is not set."); whitelistHash = _whitelistHash; } /// toggles publicPhase function togglePublic() external onlyOwner { phase = phase != MintPhase.PUBLIC ? MintPhase.PUBLIC : MintPhase.CLOSED; emit ActivePhaseUpdated(phase); } /// toggles publicPhase function toggleWhitelist() external onlyOwner { phase = phase != MintPhase.WL ? MintPhase.WL : MintPhase.CLOSED; emit ActivePhaseUpdated(phase); } /// sets the max per wallet /// @param _number Number to set as max per waller function setMaxPerWallet(uint64 _number) external onlyOwner { require(_number < 5, "Can't set to more than 5 per wallet"); maxPerWallet = _number; } /// Set the base URI for metadata /// @param _uri the URI for the metadata store function setBaseURI(string memory _uri) external onlyOwner { baseURI = _uri; } /// Set the contract address for the contract handling rendering metadata /// so we can update the metadata when holders level up and hopefully to swap to /// an onchain implementation in the future /// @param _address contract address function setMetadataAddress(address _address) external onlyOwner { require(_address != address(0), "Invalid contract address"); metadataContractAddress = _address; emit MetadataContractAddressUpdated(_address); } // Set the Luck Level for a given NFT owner address: @todo should use erc721a _setAux? // @param _tokenId // @param _level Luck level function setLuckLevel(uint256 _tokenId, uint256 _level) external isIssuedToken(_tokenId) onlyOwner { luckLevel[_tokenId] = _level; } // Get the lucklevel for a token function getLuckLevel(uint256 _tokenId) public view isIssuedToken(_tokenId) returns (uint256) { return luckLevel[_tokenId]; } // Set the provenance hash for the collection function setProvenance(string memory _hash) external onlyOwner { PROVENANCE_HASH = _hash; } /// Routes to the metadataContract as set by owner /// @param _tokenId The token to get the metadata for function tokenURI(uint256 _tokenId) public view override(ERC721A, IERC721A) returns (string memory) { require(_exists(_tokenId), "Token does not exist."); string memory json = ILPXMetadata(metadataContractAddress).tokenURI(_tokenId); return json; } /* Overrides */ /** * @dev See {IERC721-setApprovalForAll}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function setApprovalForAll(address operator, bool approved) public override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } /** * @dev See {IERC721-approve}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function approve(address operator, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } /** * @dev See {IERC721-transferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function transferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. * In this example the added modifier ensures that the operator is allowed by the OperatorFilterRegistry. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// 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 v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// 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 (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; /* 77 77 77 77 77 77 77 77 77 ,adPPYba, 77 ,d7 7b d7 7b,dPPYba, 77 77 7b,dPPYba, 7b, ,d7 77 77 77 a7" "" 77 ,a7" `7b d7' 77P' "7a 77 77 77P' `"7a `Y7, ,7P' 77 77 77 7b 7777[ `7b d7' 77 d7 77 77 77 77 )777( 77 "7a, ,a77 "7a, ,aa 77`"Yba, `7b,d7' 77b, ,a7" "7a, ,a77 77 77 ,d7" "7b, 77 `"YbbdP'Y7 `"Ybbd7"' 77 `Y7a Y77' 77`YbbdP"' `"YbbdP'Y7 77 77 7P' `Y7 d7' 77 d7' 77 */ interface ILPXMetadata { function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint64","name":"_maxSupply","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":false,"internalType":"enum LuckyPunxNFT.MintPhase","name":"_phase","type":"uint8"}],"name":"ActivePhaseUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"}],"name":"MetadataContractAddressUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"PaymentWithdrawalByOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_SALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTY_FEE","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_SALE_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","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":"getBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getLuckLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLuckLevel","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"phase","outputs":[{"internalType":"enum LuckyPunxNFT.MintPhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"reserveNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_level","type":"uint256"}],"name":"setLuckLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_number","type":"uint64"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_maxSupply","type":"uint64"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setMetadataAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_whitelistHash","type":"bytes32"}],"name":"setWhitelistHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"togglePublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistMaxPerWallet","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052611e61600a60006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506002600a60086101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506003600a60106101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506005600a60186101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506000600d60006101000a81548160ff02191690836002811115620000d657620000d562000540565b5b0217905550348015620000e857600080fd5b506040516200665f3803806200665f83398181016040528101906200010e9190620005b9565b733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280601081526020017f4c75636b7950756e784f66666963616c000000000000000000000000000000008152506040518060400160405280600681526020017f4c50584e465400000000000000000000000000000000000000000000000000008152508160029081620001a2919062000865565b508060039081620001b4919062000865565b50620001c56200046d60201b60201c565b6000819055505050620001ed620001e16200047260201b60201c565b6200047a60201b60201c565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115620003e2578015620002a8576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16637d3e3dbe30846040518363ffffffff1660e01b81526004016200026e92919062000991565b600060405180830381600087803b1580156200028957600080fd5b505af11580156200029e573d6000803e3d6000fd5b50505050620003e1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161462000362576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663a0af290330846040518363ffffffff1660e01b81526004016200032892919062000991565b600060405180830381600087803b1580156200034357600080fd5b505af115801562000358573d6000803e3d6000fd5b50505050620003e0565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16634420e486306040518263ffffffff1660e01b8152600401620003ab9190620009be565b600060405180830381600087803b158015620003c657600080fd5b505af1158015620003db573d6000803e3d6000fd5b505050505b5b5b5050600160098190555060018167ffffffffffffffff1610156200043d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620004349062000a3c565b60405180910390fd5b80600a60006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505062000a5e565b600090565b600033905090565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600080fd5b600067ffffffffffffffff82169050919050565b620005938162000574565b81146200059f57600080fd5b50565b600081519050620005b38162000588565b92915050565b600060208284031215620005d257620005d16200056f565b5b6000620005e284828501620005a2565b91505092915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200066d57607f821691505b60208210810362000683576200068262000625565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620006ed7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620006ae565b620006f98683620006ae565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000746620007406200073a8462000711565b6200071b565b62000711565b9050919050565b6000819050919050565b620007628362000725565b6200077a62000771826200074d565b848454620006bb565b825550505050565b600090565b6200079162000782565b6200079e81848462000757565b505050565b5b81811015620007c657620007ba60008262000787565b600181019050620007a4565b5050565b601f8211156200081557620007df8162000689565b620007ea846200069e565b81016020851015620007fa578190505b6200081262000809856200069e565b830182620007a3565b50505b505050565b600082821c905092915050565b60006200083a600019846008026200081a565b1980831691505092915050565b600062000855838362000827565b9150826002028217905092915050565b6200087082620005eb565b67ffffffffffffffff8111156200088c576200088b620005f6565b5b62000898825462000654565b620008a5828285620007ca565b600060209050601f831160018114620008dd5760008415620008c8578287015190505b620008d4858262000847565b86555062000944565b601f198416620008ed8662000689565b60005b828110156200091757848901518255600182019150602085019450602081019050620008f0565b8683101562000937578489015162000933601f89168262000827565b8355505b6001600288020188555050505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000979826200094c565b9050919050565b6200098b816200096c565b82525050565b6000604082019050620009a8600083018562000980565b620009b7602083018462000980565b9392505050565b6000602082019050620009d5600083018462000980565b92915050565b600082825260208201905092915050565b7f4d617820737570706c79206d7573742062652031206f72206869676865720000600082015250565b600062000a24601e83620009db565b915062000a3182620009ec565b602082019050919050565b6000602082019050818103600083015262000a578162000a15565b9050919050565b615bf18062000a6e6000396000f3fe6080604052600436106102e45760003560e01c8063714c539811610190578063bc7df091116100dc578063e17b25af11610095578063f2fde38b1161006f578063f2fde38b14610ad4578063f6000c7a14610afd578063ff1b655614610b28578063ffe630b514610b53576102e4565b8063e17b25af14610a43578063e74772d814610a6c578063e985e9c514610a97576102e4565b8063bc7df0911461092e578063bc912e1a14610957578063c23dc68f14610982578063c87b56dd146109bf578063d2cab056146109fc578063d5abeb0114610a18576102e4565b806395d89b41116101495780639c4f3d0a116101235780639c4f3d0a14610895578063a22cb465146108be578063b1c9fe6e146108e7578063b88d4fde14610912576102e4565b806395d89b4114610816578063981d87711461084157806399a2557a14610858576102e4565b8063714c53981461073e578063715018a6146107695780637e15144b146107805780638462151c14610797578063853828b6146107d45780638da5cb5b146107eb576102e4565b8063335477fc1161024f57806349df728c116102085780636352211e116101e25780636352211e1461065c57806364762817146106995780636c0360eb146106d657806370a0823114610701576102e4565b806349df728c146105cd57806355f804b3146105f65780635bbb21771461061f576102e4565b8063335477fc146104de5780633e9f610b1461050957806341f434341461053257806342842e0e1461055d57806342966c6814610579578063453c2310146105a2576102e4565b80630da5f0ad116102a15780630da5f0ad1461040057806318160ddd146104295780631b60a0721461045457806323b872dd1461047d5780632db11544146104995780632e1a7d4d146104b5576102e4565b806301ffc9a7146102e957806306fdde031461032657806307e89ec014610351578063081812fc1461037c578063095ea7b3146103b95780630d2206d0146103d5575b600080fd5b3480156102f557600080fd5b50610310600480360381019061030b9190613d74565b610b7c565b60405161031d9190613dbc565b60405180910390f35b34801561033257600080fd5b5061033b610c0e565b6040516103489190613e67565b60405180910390f35b34801561035d57600080fd5b50610366610ca0565b6040516103739190613ea2565b60405180910390f35b34801561038857600080fd5b506103a3600480360381019061039e9190613ee9565b610ca5565b6040516103b09190613f57565b60405180910390f35b6103d360048036038101906103ce9190613f9e565b610d24565b005b3480156103e157600080fd5b506103ea610d3d565b6040516103f79190614001565b60405180910390f35b34801561040c57600080fd5b506104276004803603810190610422919061401c565b610d57565b005b34801561043557600080fd5b5061043e610dc7565b60405161044b9190613ea2565b60405180910390f35b34801561046057600080fd5b5061047b60048036038101906104769190614092565b610dde565b005b610497600480360381019061049291906140bf565b610e35565b005b6104b360048036038101906104ae9190613ee9565b610e84565b005b3480156104c157600080fd5b506104dc60048036038101906104d79190613ee9565b6110b3565b005b3480156104ea57600080fd5b506104f3611185565b6040516105009190614001565b60405180910390f35b34801561051557600080fd5b50610530600480360381019061052b919061413e565b61118a565b005b34801561053e57600080fd5b5061054761120b565b60405161055491906141ca565b60405180910390f35b610577600480360381019061057291906140bf565b61121d565b005b34801561058557600080fd5b506105a0600480360381019061059b9190613ee9565b61126c565b005b3480156105ae57600080fd5b506105b761127a565b6040516105c49190614001565b60405180910390f35b3480156105d957600080fd5b506105f460048036038101906105ef9190614223565b611294565b005b34801561060257600080fd5b5061061d60048036038101906106189190614385565b6113d5565b005b34801561062b57600080fd5b506106466004803603810190610641919061442e565b6113f0565b60405161065391906145ca565b60405180910390f35b34801561066857600080fd5b50610683600480360381019061067e9190613ee9565b6114b3565b6040516106909190613f57565b60405180910390f35b3480156106a557600080fd5b506106c060048036038101906106bb9190613ee9565b6114c5565b6040516106cd9190613ea2565b60405180910390f35b3480156106e257600080fd5b506106eb61152e565b6040516106f89190613e67565b60405180910390f35b34801561070d57600080fd5b50610728600480360381019061072391906145ec565b6115bc565b6040516107359190613ea2565b60405180910390f35b34801561074a57600080fd5b50610753611674565b6040516107609190613e67565b60405180910390f35b34801561077557600080fd5b5061077e611706565b005b34801561078c57600080fd5b5061079561171a565b005b3480156107a357600080fd5b506107be60048036038101906107b991906145ec565b6117d8565b6040516107cb91906146d7565b60405180910390f35b3480156107e057600080fd5b506107e961191b565b005b3480156107f757600080fd5b506108006119a9565b60405161080d9190613f57565b60405180910390f35b34801561082257600080fd5b5061082b6119d3565b6040516108389190613e67565b60405180910390f35b34801561084d57600080fd5b50610856611a65565b005b34801561086457600080fd5b5061087f600480360381019061087a91906146f9565b611b22565b60405161088c91906146d7565b60405180910390f35b3480156108a157600080fd5b506108bc60048036038101906108b7919061413e565b611d2e565b005b3480156108ca57600080fd5b506108e560048036038101906108e09190614778565b611db0565b005b3480156108f357600080fd5b506108fc611dc9565b604051610909919061482f565b60405180910390f35b61092c600480360381019061092791906148eb565b611ddc565b005b34801561093a57600080fd5b5061095560048036038101906109509190613ee9565b611e2d565b005b34801561096357600080fd5b5061096c611eb9565b6040516109799190613ea2565b60405180910390f35b34801561098e57600080fd5b506109a960048036038101906109a49190613ee9565b611ebe565b6040516109b691906149c3565b60405180910390f35b3480156109cb57600080fd5b506109e660048036038101906109e19190613ee9565b611f28565b6040516109f39190613e67565b60405180910390f35b610a166004803603810190610a119190614a34565b612020565b005b348015610a2457600080fd5b50610a2d6123a2565b604051610a3a9190614001565b60405180910390f35b348015610a4f57600080fd5b50610a6a6004803603810190610a6591906145ec565b6123bc565b005b348015610a7857600080fd5b50610a816124ae565b604051610a8e9190613f57565b60405180910390f35b348015610aa357600080fd5b50610abe6004803603810190610ab99190614a94565b6124d4565b604051610acb9190613dbc565b60405180910390f35b348015610ae057600080fd5b50610afb6004803603810190610af691906145ec565b612568565b005b348015610b0957600080fd5b50610b126125eb565b604051610b1f9190614001565b60405180910390f35b348015610b3457600080fd5b50610b3d612605565b604051610b4a9190613e67565b60405180910390f35b348015610b5f57600080fd5b50610b7a6004803603810190610b759190614385565b612693565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610bd757506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610c075750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b606060028054610c1d90614b03565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4990614b03565b8015610c965780601f10610c6b57610100808354040283529160200191610c96565b820191906000526020600020905b815481529060010190602001808311610c7957829003601f168201915b5050505050905090565b600081565b6000610cb0826126ae565b610ce6576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610d2e8161270d565b610d38838361280a565b505050565b600a60189054906101000a900467ffffffffffffffff1681565b81610d60610dc7565b811115610da2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9990614b80565b60405180910390fd5b610daa61294e565b816011600085815260200190815260200160002081905550505050565b6000610dd16129cc565b6001546000540303905090565b610de661294e565b6000801b8103610e2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2290614bec565b60405180910390fd5b80600f8190555050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e7357610e723361270d565b5b610e7e8484846129d1565b50505050565b600280811115610e9757610e966147b8565b5b600d60009054906101000a900460ff166002811115610eb957610eb86147b8565b5b14610ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef090614c58565b60405180910390fd5b80600a60009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681610f24610dc7565b610f2e9190614ca7565b1115610f6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6690614d27565b60405180910390fd5b6000828181610f7e9190614d47565b3414610fbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb690614dfb565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461102d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102490614e8d565b60405180910390fd5b600a60089054906101000a900467ffffffffffffffff1667ffffffffffffffff1684611058336115bc565b6110629190614ca7565b11156110a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109a90614f1f565b60405180910390fd5b6110ad3385612cf3565b50505050565b6110bb61294e565b600047905080821115611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90614f8b565b60405180910390fd5b7fe6995d981a05e2f3d0adaebb01fc440584216e510c59d358ba9dd149bf0b29ab826040516111329190613ea2565b60405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611180573d6000803e3d6000fd5b505050565b603f81565b61119261294e565b60058167ffffffffffffffff16106111df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d69061501d565b60405180910390fd5b80600a60086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461125b5761125a3361270d565b5b611266848484612d11565b50505050565b611277816001612d31565b50565b600a60089054906101000a900467ffffffffffffffff1681565b61129c61294e565b6002600954036112e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d890615089565b60405180910390fd5b600260098190555060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113249190613f57565b602060405180830381865afa158015611341573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136591906150be565b90507fe6995d981a05e2f3d0adaebb01fc440584216e510c59d358ba9dd149bf0b29ab816040516113969190613ea2565b60405180910390a16113c933828473ffffffffffffffffffffffffffffffffffffffff16612f839092919063ffffffff16565b50600160098190555050565b6113dd61294e565b80600e90816113ec919061528d565b5050565b6060600083839050905060008167ffffffffffffffff8111156114165761141561425a565b5b60405190808252806020026020018201604052801561144f57816020015b61143c613cb9565b8152602001906001900390816114345790505b50905060005b8281146114a75761147e8686838181106114725761147161535f565b5b90506020020135611ebe565b8282815181106114915761149061535f565b5b6020026020010181905250806001019050611455565b50809250505092915050565b60006114be82613009565b9050919050565b6000816114d0610dc7565b811115611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150990614b80565b60405180910390fd5b6011600084815260200190815260200160002054915050919050565b600e805461153b90614b03565b80601f016020809104026020016040519081016040528092919081815260200182805461156790614b03565b80156115b45780601f10611589576101008083540402835291602001916115b4565b820191906000526020600020905b81548152906001019060200180831161159757829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611623576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6060600e805461168390614b03565b80601f01602080910402602001604051908101604052809291908181526020018280546116af90614b03565b80156116fc5780601f106116d1576101008083540402835291602001916116fc565b820191906000526020600020905b8154815290600101906020018083116116df57829003601f168201915b5050505050905090565b61170e61294e565b61171860006130d5565b565b61172261294e565b60016002811115611736576117356147b8565b5b600d60009054906101000a900460ff166002811115611758576117576147b8565b5b03611764576000611767565b60015b600d60006101000a81548160ff0219169083600281111561178b5761178a6147b8565b5b02179055507f618c43efaa1f48ff78a58f07021c029bd7498dee3b3b7ed7844f7502cb1cad68600d60009054906101000a900460ff166040516117ce919061482f565b60405180910390a1565b606060008060006117e8856115bc565b905060008167ffffffffffffffff8111156118065761180561425a565b5b6040519080825280602002602001820160405280156118345781602001602082028036833780820191505090505b50905061183f613cb9565b60006118496129cc565b90505b83861461190d5761185c8161319b565b9150816040015161190257600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16146118a757816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361190157808387806001019850815181106118f4576118f361535f565b5b6020026020010181815250505b5b80600101905061184c565b508195505050505050919050565b61192361294e565b60004790507fe6995d981a05e2f3d0adaebb01fc440584216e510c59d358ba9dd149bf0b29ab816040516119579190613ea2565b60405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156119a5573d6000803e3d6000fd5b5050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546119e290614b03565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0e90614b03565b8015611a5b5780601f10611a3057610100808354040283529160200191611a5b565b820191906000526020600020905b815481529060010190602001808311611a3e57829003601f168201915b5050505050905090565b611a6d61294e565b600280811115611a8057611a7f6147b8565b5b600d60009054906101000a900460ff166002811115611aa257611aa16147b8565b5b03611aae576000611ab1565b60025b600d60006101000a81548160ff02191690836002811115611ad557611ad46147b8565b5b02179055507f618c43efaa1f48ff78a58f07021c029bd7498dee3b3b7ed7844f7502cb1cad68600d60009054906101000a900460ff16604051611b18919061482f565b60405180910390a1565b6060818310611b5d576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611b686131c6565b9050611b726129cc565b851015611b8457611b816129cc565b94505b80841115611b90578093505b6000611b9b876115bc565b905084861015611bbe576000868603905081811015611bb8578091505b50611bc3565b600090505b60008167ffffffffffffffff811115611bdf57611bde61425a565b5b604051908082528060200260200182016040528015611c0d5781602001602082028036833780820191505090505b50905060008203611c245780945050505050611d27565b6000611c2f88611ebe565b905060008160400151611c4457816000015190505b60008990505b888114158015611c5a5750848714155b15611d1957611c688161319b565b92508260400151611d0e57600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611cb357826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d0d5780848880600101995081518110611d0057611cff61535f565b5b6020026020010181815250505b5b806001019050611c4a565b508583528296505050505050505b9392505050565b611d3661294e565b60018167ffffffffffffffff161015611d84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7b906153da565b60405180910390fd5b80600a60006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b81611dba8161270d565b611dc483836131cf565b505050565b600d60009054906101000a900460ff1681565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e1a57611e193361270d565b5b611e26858585856132da565b5050505050565b80600a60009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681611e58610dc7565b611e629190614ca7565b1115611ea3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9a90614d27565b60405180910390fd5b611eab61294e565b611eb53383612cf3565b5050565b600081565b611ec6613cb9565b611ece613cb9565b611ed66129cc565b831080611eea5750611ee66131c6565b8310155b15611ef85780915050611f23565b611f018361319b565b9050806040015115611f165780915050611f23565b611f1f8361334d565b9150505b919050565b6060611f33826126ae565b611f72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6990615446565b60405180910390fd5b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c87b56dd846040518263ffffffff1660e01b8152600401611fcf9190613ea2565b600060405180830381865afa158015611fec573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061201591906154d6565b905080915050919050565b60016002811115612034576120336147b8565b5b600d60009054906101000a900460ff166002811115612056576120556147b8565b5b14612096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161208d9061556b565b60405180910390fd5b82600a60009054906101000a900467ffffffffffffffff1667ffffffffffffffff16816120c1610dc7565b6120cb9190614ca7565b111561210c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210390614d27565b60405180910390fd5b600084818161211b9190614d47565b341461215c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215390614dfb565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c190614e8d565b60405180910390fd5b600a60109054906101000a900467ffffffffffffffff1667ffffffffffffffff16866121f5336115bc565b6121ff9190614ca7565b1115612240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223790614f1f565b60405180910390fd5b600a60109054906101000a900467ffffffffffffffff1667ffffffffffffffff1686601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122ac9190614ca7565b11156122ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e4906155fd565b60405180910390fd5b6122fb868686600f5461336d565b61233a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123319061568f565b60405180910390fd5b85601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546123899190614ca7565b9250508190555061239a3387612cf3565b505050505050565b600a60009054906101000a900467ffffffffffffffff1681565b6123c461294e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242a906156fb565b60405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fa6375348ec6f00fff8306bb897b0a08eb1a029b5ff13898a15d188f163919b42816040516124a39190613f57565b60405180910390a150565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61257061294e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d69061578d565b60405180910390fd5b6125e8816130d5565b50565b600a60109054906101000a900467ffffffffffffffff1681565b600c805461261290614b03565b80601f016020809104026020016040519081016040528092919081815260200182805461263e90614b03565b801561268b5780601f106126605761010080835404028352916020019161268b565b820191906000526020600020905b81548152906001019060200180831161266e57829003601f168201915b505050505081565b61269b61294e565b80600c90816126aa919061528d565b5050565b6000816126b96129cc565b111580156126c8575060005482105b8015612706575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115612807576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b81526004016127849291906157ad565b602060405180830381865afa1580156127a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c591906157eb565b61280657806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016127fd9190613f57565b60405180910390fd5b5b50565b6000612815826114b3565b90508073ffffffffffffffffffffffffffffffffffffffff1661283661343c565b73ffffffffffffffffffffffffffffffffffffffff1614612899576128628161285d61343c565b6124d4565b612898576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b612956613444565b73ffffffffffffffffffffffffffffffffffffffff166129746119a9565b73ffffffffffffffffffffffffffffffffffffffff16146129ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129c190615864565b60405180910390fd5b565b600090565b60006129dc82613009565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612a43576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612a4f8461344c565b91509150612a658187612a6061343c565b613473565b612ab157612a7a86612a7561343c565b6124d4565b612ab0576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612b17576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612b2486868660016134b7565b8015612b2f57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612bfd85612bd98888876134bd565b7c0200000000000000000000000000000000000000000000000000000000176134e5565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612c835760006001850190506000600460008381526020019081526020016000205403612c81576000548114612c80578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612ceb8686866001613510565b505050505050565b612d0d828260405180602001604052806000815250613516565b5050565b612d2c83838360405180602001604052806000815250611ddc565b505050565b6000612d3c83613009565b90506000819050600080612d4f8661344c565b915091508415612db857612d6b8184612d6661343c565b613473565b612db757612d8083612d7b61343c565b6124d4565b612db6576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b612dc68360008860016134b7565b8015612dd157600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612e7983612e36856000886134bd565b7c02000000000000000000000000000000000000000000000000000000007c010000000000000000000000000000000000000000000000000000000017176134e5565b600460008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603612eff5760006001870190506000600460008381526020019081526020016000205403612efd576000548114612efc578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f69836000886001613510565b600160008154809291906001019190505550505050505050565b6130048363a9059cbb60e01b8484604051602401612fa2929190615884565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506135b3565b505050565b600080829050806130186129cc565b1161309e5760005481101561309d5760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082160361309b575b60008103613091576004600083600190039350838152602001908152602001600020549050613067565b80925050506130d0565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6131a3613cb9565b6131bf600460008481526020019081526020016000205461367a565b9050919050565b60008054905090565b80600760006131dc61343c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661328961343c565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516132ce9190613dbc565b60405180910390a35050565b6132e5848484610e35565b60008373ffffffffffffffffffffffffffffffffffffffff163b146133475761331084848484613730565b613346576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b613355613cb9565b61336661336183613009565b61367a565b9050919050565b60008033601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054876133bc9190614ca7565b6040516020016133cd929190615884565b604051602081830303815290604052805190602001209050613431858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508483613880565b915050949350505050565b600033905090565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86134d4868684613897565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b61352083836138a0565b60008373ffffffffffffffffffffffffffffffffffffffff163b146135ae57600080549050600083820390505b6135606000868380600101945086613730565b613596576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061354d5781600054146135ab57600080fd5b50505b505050565b6000613615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613a5b9092919063ffffffff16565b9050600081511115613675578080602001905181019061363591906157eb565b613674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161366b9061591f565b60405180910390fd5b5b505050565b613682613cb9565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261375661343c565b8786866040518563ffffffff1660e01b81526004016137789493929190615994565b6020604051808303816000875af19250505080156137b457506040513d601f19601f820116820180604052508101906137b191906159f5565b60015b61382d573d80600081146137e4576040519150601f19603f3d011682016040523d82523d6000602084013e6137e9565b606091505b506000815103613825576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60008261388d8584613a73565b1490509392505050565b60009392505050565b600080549050600082036138e0576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6138ed60008483856134b7565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506139648361395560008660006134bd565b61395e85613ac9565b176134e5565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114613a0557808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506139ca565b5060008203613a40576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050613a566000848385613510565b505050565b6060613a6a8484600085613ad9565b90509392505050565b60008082905060005b8451811015613abe57613aa982868381518110613a9c57613a9b61535f565b5b6020026020010151613bed565b91508080613ab690615a22565b915050613a7c565b508091505092915050565b60006001821460e11b9050919050565b606082471015613b1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b1590615adc565b60405180910390fd5b613b2785613c18565b613b66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b5d90615b48565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613b8f9190615ba4565b60006040518083038185875af1925050503d8060008114613bcc576040519150601f19603f3d011682016040523d82523d6000602084013e613bd1565b606091505b5091509150613be1828286613c3b565b92505050949350505050565b6000818310613c0557613c008284613ca2565b613c10565b613c0f8383613ca2565b5b905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613c4b57829050613c9b565b600083511115613c5e5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613c929190613e67565b60405180910390fd5b9392505050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613d5181613d1c565b8114613d5c57600080fd5b50565b600081359050613d6e81613d48565b92915050565b600060208284031215613d8a57613d89613d12565b5b6000613d9884828501613d5f565b91505092915050565b60008115159050919050565b613db681613da1565b82525050565b6000602082019050613dd16000830184613dad565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613e11578082015181840152602081019050613df6565b60008484015250505050565b6000601f19601f8301169050919050565b6000613e3982613dd7565b613e438185613de2565b9350613e53818560208601613df3565b613e5c81613e1d565b840191505092915050565b60006020820190508181036000830152613e818184613e2e565b905092915050565b6000819050919050565b613e9c81613e89565b82525050565b6000602082019050613eb76000830184613e93565b92915050565b613ec681613e89565b8114613ed157600080fd5b50565b600081359050613ee381613ebd565b92915050565b600060208284031215613eff57613efe613d12565b5b6000613f0d84828501613ed4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613f4182613f16565b9050919050565b613f5181613f36565b82525050565b6000602082019050613f6c6000830184613f48565b92915050565b613f7b81613f36565b8114613f8657600080fd5b50565b600081359050613f9881613f72565b92915050565b60008060408385031215613fb557613fb4613d12565b5b6000613fc385828601613f89565b9250506020613fd485828601613ed4565b9150509250929050565b600067ffffffffffffffff82169050919050565b613ffb81613fde565b82525050565b60006020820190506140166000830184613ff2565b92915050565b6000806040838503121561403357614032613d12565b5b600061404185828601613ed4565b925050602061405285828601613ed4565b9150509250929050565b6000819050919050565b61406f8161405c565b811461407a57600080fd5b50565b60008135905061408c81614066565b92915050565b6000602082840312156140a8576140a7613d12565b5b60006140b68482850161407d565b91505092915050565b6000806000606084860312156140d8576140d7613d12565b5b60006140e686828701613f89565b93505060206140f786828701613f89565b925050604061410886828701613ed4565b9150509250925092565b61411b81613fde565b811461412657600080fd5b50565b60008135905061413881614112565b92915050565b60006020828403121561415457614153613d12565b5b600061416284828501614129565b91505092915050565b6000819050919050565b600061419061418b61418684613f16565b61416b565b613f16565b9050919050565b60006141a282614175565b9050919050565b60006141b482614197565b9050919050565b6141c4816141a9565b82525050565b60006020820190506141df60008301846141bb565b92915050565b60006141f082613f36565b9050919050565b614200816141e5565b811461420b57600080fd5b50565b60008135905061421d816141f7565b92915050565b60006020828403121561423957614238613d12565b5b60006142478482850161420e565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61429282613e1d565b810181811067ffffffffffffffff821117156142b1576142b061425a565b5b80604052505050565b60006142c4613d08565b90506142d08282614289565b919050565b600067ffffffffffffffff8211156142f0576142ef61425a565b5b6142f982613e1d565b9050602081019050919050565b82818337600083830152505050565b6000614328614323846142d5565b6142ba565b90508281526020810184848401111561434457614343614255565b5b61434f848285614306565b509392505050565b600082601f83011261436c5761436b614250565b5b813561437c848260208601614315565b91505092915050565b60006020828403121561439b5761439a613d12565b5b600082013567ffffffffffffffff8111156143b9576143b8613d17565b5b6143c584828501614357565b91505092915050565b600080fd5b600080fd5b60008083601f8401126143ee576143ed614250565b5b8235905067ffffffffffffffff81111561440b5761440a6143ce565b5b602083019150836020820283011115614427576144266143d3565b5b9250929050565b6000806020838503121561444557614444613d12565b5b600083013567ffffffffffffffff81111561446357614462613d17565b5b61446f858286016143d8565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6144b081613f36565b82525050565b6144bf81613fde565b82525050565b6144ce81613da1565b82525050565b600062ffffff82169050919050565b6144ec816144d4565b82525050565b60808201600082015161450860008501826144a7565b50602082015161451b60208501826144b6565b50604082015161452e60408501826144c5565b50606082015161454160608501826144e3565b50505050565b600061455383836144f2565b60808301905092915050565b6000602082019050919050565b60006145778261447b565b6145818185614486565b935061458c83614497565b8060005b838110156145bd5781516145a48882614547565b97506145af8361455f565b925050600181019050614590565b5085935050505092915050565b600060208201905081810360008301526145e4818461456c565b905092915050565b60006020828403121561460257614601613d12565b5b600061461084828501613f89565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61464e81613e89565b82525050565b60006146608383614645565b60208301905092915050565b6000602082019050919050565b600061468482614619565b61468e8185614624565b935061469983614635565b8060005b838110156146ca5781516146b18882614654565b97506146bc8361466c565b92505060018101905061469d565b5085935050505092915050565b600060208201905081810360008301526146f18184614679565b905092915050565b60008060006060848603121561471257614711613d12565b5b600061472086828701613f89565b935050602061473186828701613ed4565b925050604061474286828701613ed4565b9150509250925092565b61475581613da1565b811461476057600080fd5b50565b6000813590506147728161474c565b92915050565b6000806040838503121561478f5761478e613d12565b5b600061479d85828601613f89565b92505060206147ae85828601614763565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106147f8576147f76147b8565b5b50565b6000819050614809826147e7565b919050565b6000614819826147fb565b9050919050565b6148298161480e565b82525050565b60006020820190506148446000830184614820565b92915050565b600067ffffffffffffffff8211156148655761486461425a565b5b61486e82613e1d565b9050602081019050919050565b600061488e6148898461484a565b6142ba565b9050828152602081018484840111156148aa576148a9614255565b5b6148b5848285614306565b509392505050565b600082601f8301126148d2576148d1614250565b5b81356148e284826020860161487b565b91505092915050565b6000806000806080858703121561490557614904613d12565b5b600061491387828801613f89565b945050602061492487828801613f89565b935050604061493587828801613ed4565b925050606085013567ffffffffffffffff81111561495657614955613d17565b5b614962878288016148bd565b91505092959194509250565b60808201600082015161498460008501826144a7565b50602082015161499760208501826144b6565b5060408201516149aa60408501826144c5565b5060608201516149bd60608501826144e3565b50505050565b60006080820190506149d8600083018461496e565b92915050565b60008083601f8401126149f4576149f3614250565b5b8235905067ffffffffffffffff811115614a1157614a106143ce565b5b602083019150836020820283011115614a2d57614a2c6143d3565b5b9250929050565b600080600060408486031215614a4d57614a4c613d12565b5b6000614a5b86828701613ed4565b935050602084013567ffffffffffffffff811115614a7c57614a7b613d17565b5b614a88868287016149de565b92509250509250925092565b60008060408385031215614aab57614aaa613d12565b5b6000614ab985828601613f89565b9250506020614aca85828601613f89565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614b1b57607f821691505b602082108103614b2e57614b2d614ad4565b5b50919050565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b6000614b6a600f83613de2565b9150614b7582614b34565b602082019050919050565b60006020820190508181036000830152614b9981614b5d565b9050919050565b7f77686974656c69737448617368206973206e6f74207365742e00000000000000600082015250565b6000614bd6601983613de2565b9150614be182614ba0565b602082019050919050565b60006020820190508181036000830152614c0581614bc9565b9050919050565b7f5075626c6963206d696e74206973206e6f74206c6976652e0000000000000000600082015250565b6000614c42601883613de2565b9150614c4d82614c0c565b602082019050919050565b60006020820190508181036000830152614c7181614c35565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614cb282613e89565b9150614cbd83613e89565b9250828201905080821115614cd557614cd4614c78565b5b92915050565b7f536f6c64206f7574210000000000000000000000000000000000000000000000600082015250565b6000614d11600983613de2565b9150614d1c82614cdb565b602082019050919050565b60006020820190508181036000830152614d4081614d04565b9050919050565b6000614d5282613e89565b9150614d5d83613e89565b9250828202614d6b81613e89565b91508282048414831517614d8257614d81614c78565b5b5092915050565b7f506c656173652073656e642074686520636f727265637420616d6f756e74206960008201527f6e206f7264657220746f206d696e742e00000000000000000000000000000000602082015250565b6000614de5603083613de2565b9150614df082614d89565b604082019050919050565b60006020820190508181036000830152614e1481614dd8565b9050919050565b7f436f6e7472616374732063616e206e6f742063616c6c2074686973206d65746860008201527f6f642e0000000000000000000000000000000000000000000000000000000000602082015250565b6000614e77602383613de2565b9150614e8282614e1b565b604082019050919050565b60006020820190508181036000830152614ea681614e6a565b9050919050565b7f596f752068617665206d696e74656420796f7572206d617820616c6c6f77616e60008201527f63652e0000000000000000000000000000000000000000000000000000000000602082015250565b6000614f09602383613de2565b9150614f1482614ead565b604082019050919050565b60006020820190508181036000830152614f3881614efc565b9050919050565b7f6e6f7420656e6f7567682066756e647300000000000000000000000000000000600082015250565b6000614f75601083613de2565b9150614f8082614f3f565b602082019050919050565b60006020820190508181036000830152614fa481614f68565b9050919050565b7f43616e27742073657420746f206d6f7265207468616e2035207065722077616c60008201527f6c65740000000000000000000000000000000000000000000000000000000000602082015250565b6000615007602383613de2565b915061501282614fab565b604082019050919050565b6000602082019050818103600083015261503681614ffa565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000615073601f83613de2565b915061507e8261503d565b602082019050919050565b600060208201905081810360008301526150a281615066565b9050919050565b6000815190506150b881613ebd565b92915050565b6000602082840312156150d4576150d3613d12565b5b60006150e2848285016150a9565b91505092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261514d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82615110565b6151578683615110565b95508019841693508086168417925050509392505050565b600061518a61518561518084613e89565b61416b565b613e89565b9050919050565b6000819050919050565b6151a48361516f565b6151b86151b082615191565b84845461511d565b825550505050565b600090565b6151cd6151c0565b6151d881848461519b565b505050565b5b818110156151fc576151f16000826151c5565b6001810190506151de565b5050565b601f82111561524157615212816150eb565b61521b84615100565b8101602085101561522a578190505b61523e61523685615100565b8301826151dd565b50505b505050565b600082821c905092915050565b600061526460001984600802615246565b1980831691505092915050565b600061527d8383615253565b9150826002028217905092915050565b61529682613dd7565b67ffffffffffffffff8111156152af576152ae61425a565b5b6152b98254614b03565b6152c4828285615200565b600060209050601f8311600181146152f757600084156152e5578287015190505b6152ef8582615271565b865550615357565b601f198416615305866150eb565b60005b8281101561532d57848901518255600182019150602085019450602081019050615308565b8683101561534a5784890151615346601f891682615253565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4d617820737570706c792073686f756c642062652031206f7220686967686572600082015250565b60006153c4602083613de2565b91506153cf8261538e565b602082019050919050565b600060208201905081810360008301526153f3816153b7565b9050919050565b7f546f6b656e20646f6573206e6f742065786973742e0000000000000000000000600082015250565b6000615430601583613de2565b915061543b826153fa565b602082019050919050565b6000602082019050818103600083015261545f81615423565b9050919050565b6000615479615474846142d5565b6142ba565b90508281526020810184848401111561549557615494614255565b5b6154a0848285613df3565b509392505050565b600082601f8301126154bd576154bc614250565b5b81516154cd848260208601615466565b91505092915050565b6000602082840312156154ec576154eb613d12565b5b600082015167ffffffffffffffff81111561550a57615509613d17565b5b615516848285016154a8565b91505092915050565b7f57686974656c697374206d696e74206973206e6f74206c6976652e0000000000600082015250565b6000615555601b83613de2565b91506155608261551f565b602082019050919050565b6000602082019050818103600083015261558481615548565b9050919050565b7f596f75206861766520636c61696d656420796f7572206d617820616c6c6f776160008201527f6e63652e00000000000000000000000000000000000000000000000000000000602082015250565b60006155e7602483613de2565b91506155f28261558b565b604082019050919050565b60006020820190508181036000830152615616816155da565b9050919050565b7f596f7520617265206e6f74206f6e207468652077686974656c69737420666f7260008201527f2074686973207175616e746974792e0000000000000000000000000000000000602082015250565b6000615679602f83613de2565b91506156848261561d565b604082019050919050565b600060208201905081810360008301526156a88161566c565b9050919050565b7f496e76616c696420636f6e747261637420616464726573730000000000000000600082015250565b60006156e5601883613de2565b91506156f0826156af565b602082019050919050565b60006020820190508181036000830152615714816156d8565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615777602683613de2565b91506157828261571b565b604082019050919050565b600060208201905081810360008301526157a68161576a565b9050919050565b60006040820190506157c26000830185613f48565b6157cf6020830184613f48565b9392505050565b6000815190506157e58161474c565b92915050565b60006020828403121561580157615800613d12565b5b600061580f848285016157d6565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061584e602083613de2565b915061585982615818565b602082019050919050565b6000602082019050818103600083015261587d81615841565b9050919050565b60006040820190506158996000830185613f48565b6158a66020830184613e93565b9392505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615909602a83613de2565b9150615914826158ad565b604082019050919050565b60006020820190508181036000830152615938816158fc565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006159668261593f565b615970818561594a565b9350615980818560208601613df3565b61598981613e1d565b840191505092915050565b60006080820190506159a96000830187613f48565b6159b66020830186613f48565b6159c36040830185613e93565b81810360608301526159d5818461595b565b905095945050505050565b6000815190506159ef81613d48565b92915050565b600060208284031215615a0b57615a0a613d12565b5b6000615a19848285016159e0565b91505092915050565b6000615a2d82613e89565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a5f57615a5e614c78565b5b600182019050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000615ac6602683613de2565b9150615ad182615a6a565b604082019050919050565b60006020820190508181036000830152615af581615ab9565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615b32601d83613de2565b9150615b3d82615afc565b602082019050919050565b60006020820190508181036000830152615b6181615b25565b9050919050565b600081905092915050565b6000615b7e8261593f565b615b888185615b68565b9350615b98818560208601613df3565b80840191505092915050565b6000615bb08284615b73565b91508190509291505056fea264697066735822122014a8d38bcdf3f7b2f83be1d7c6fbcf1be1b51e84beb250e359813885c1d9e4f564736f6c634300081100330000000000000000000000000000000000000000000000000000000000001e61
Deployed Bytecode
0x6080604052600436106102e45760003560e01c8063714c539811610190578063bc7df091116100dc578063e17b25af11610095578063f2fde38b1161006f578063f2fde38b14610ad4578063f6000c7a14610afd578063ff1b655614610b28578063ffe630b514610b53576102e4565b8063e17b25af14610a43578063e74772d814610a6c578063e985e9c514610a97576102e4565b8063bc7df0911461092e578063bc912e1a14610957578063c23dc68f14610982578063c87b56dd146109bf578063d2cab056146109fc578063d5abeb0114610a18576102e4565b806395d89b41116101495780639c4f3d0a116101235780639c4f3d0a14610895578063a22cb465146108be578063b1c9fe6e146108e7578063b88d4fde14610912576102e4565b806395d89b4114610816578063981d87711461084157806399a2557a14610858576102e4565b8063714c53981461073e578063715018a6146107695780637e15144b146107805780638462151c14610797578063853828b6146107d45780638da5cb5b146107eb576102e4565b8063335477fc1161024f57806349df728c116102085780636352211e116101e25780636352211e1461065c57806364762817146106995780636c0360eb146106d657806370a0823114610701576102e4565b806349df728c146105cd57806355f804b3146105f65780635bbb21771461061f576102e4565b8063335477fc146104de5780633e9f610b1461050957806341f434341461053257806342842e0e1461055d57806342966c6814610579578063453c2310146105a2576102e4565b80630da5f0ad116102a15780630da5f0ad1461040057806318160ddd146104295780631b60a0721461045457806323b872dd1461047d5780632db11544146104995780632e1a7d4d146104b5576102e4565b806301ffc9a7146102e957806306fdde031461032657806307e89ec014610351578063081812fc1461037c578063095ea7b3146103b95780630d2206d0146103d5575b600080fd5b3480156102f557600080fd5b50610310600480360381019061030b9190613d74565b610b7c565b60405161031d9190613dbc565b60405180910390f35b34801561033257600080fd5b5061033b610c0e565b6040516103489190613e67565b60405180910390f35b34801561035d57600080fd5b50610366610ca0565b6040516103739190613ea2565b60405180910390f35b34801561038857600080fd5b506103a3600480360381019061039e9190613ee9565b610ca5565b6040516103b09190613f57565b60405180910390f35b6103d360048036038101906103ce9190613f9e565b610d24565b005b3480156103e157600080fd5b506103ea610d3d565b6040516103f79190614001565b60405180910390f35b34801561040c57600080fd5b506104276004803603810190610422919061401c565b610d57565b005b34801561043557600080fd5b5061043e610dc7565b60405161044b9190613ea2565b60405180910390f35b34801561046057600080fd5b5061047b60048036038101906104769190614092565b610dde565b005b610497600480360381019061049291906140bf565b610e35565b005b6104b360048036038101906104ae9190613ee9565b610e84565b005b3480156104c157600080fd5b506104dc60048036038101906104d79190613ee9565b6110b3565b005b3480156104ea57600080fd5b506104f3611185565b6040516105009190614001565b60405180910390f35b34801561051557600080fd5b50610530600480360381019061052b919061413e565b61118a565b005b34801561053e57600080fd5b5061054761120b565b60405161055491906141ca565b60405180910390f35b610577600480360381019061057291906140bf565b61121d565b005b34801561058557600080fd5b506105a0600480360381019061059b9190613ee9565b61126c565b005b3480156105ae57600080fd5b506105b761127a565b6040516105c49190614001565b60405180910390f35b3480156105d957600080fd5b506105f460048036038101906105ef9190614223565b611294565b005b34801561060257600080fd5b5061061d60048036038101906106189190614385565b6113d5565b005b34801561062b57600080fd5b506106466004803603810190610641919061442e565b6113f0565b60405161065391906145ca565b60405180910390f35b34801561066857600080fd5b50610683600480360381019061067e9190613ee9565b6114b3565b6040516106909190613f57565b60405180910390f35b3480156106a557600080fd5b506106c060048036038101906106bb9190613ee9565b6114c5565b6040516106cd9190613ea2565b60405180910390f35b3480156106e257600080fd5b506106eb61152e565b6040516106f89190613e67565b60405180910390f35b34801561070d57600080fd5b50610728600480360381019061072391906145ec565b6115bc565b6040516107359190613ea2565b60405180910390f35b34801561074a57600080fd5b50610753611674565b6040516107609190613e67565b60405180910390f35b34801561077557600080fd5b5061077e611706565b005b34801561078c57600080fd5b5061079561171a565b005b3480156107a357600080fd5b506107be60048036038101906107b991906145ec565b6117d8565b6040516107cb91906146d7565b60405180910390f35b3480156107e057600080fd5b506107e961191b565b005b3480156107f757600080fd5b506108006119a9565b60405161080d9190613f57565b60405180910390f35b34801561082257600080fd5b5061082b6119d3565b6040516108389190613e67565b60405180910390f35b34801561084d57600080fd5b50610856611a65565b005b34801561086457600080fd5b5061087f600480360381019061087a91906146f9565b611b22565b60405161088c91906146d7565b60405180910390f35b3480156108a157600080fd5b506108bc60048036038101906108b7919061413e565b611d2e565b005b3480156108ca57600080fd5b506108e560048036038101906108e09190614778565b611db0565b005b3480156108f357600080fd5b506108fc611dc9565b604051610909919061482f565b60405180910390f35b61092c600480360381019061092791906148eb565b611ddc565b005b34801561093a57600080fd5b5061095560048036038101906109509190613ee9565b611e2d565b005b34801561096357600080fd5b5061096c611eb9565b6040516109799190613ea2565b60405180910390f35b34801561098e57600080fd5b506109a960048036038101906109a49190613ee9565b611ebe565b6040516109b691906149c3565b60405180910390f35b3480156109cb57600080fd5b506109e660048036038101906109e19190613ee9565b611f28565b6040516109f39190613e67565b60405180910390f35b610a166004803603810190610a119190614a34565b612020565b005b348015610a2457600080fd5b50610a2d6123a2565b604051610a3a9190614001565b60405180910390f35b348015610a4f57600080fd5b50610a6a6004803603810190610a6591906145ec565b6123bc565b005b348015610a7857600080fd5b50610a816124ae565b604051610a8e9190613f57565b60405180910390f35b348015610aa357600080fd5b50610abe6004803603810190610ab99190614a94565b6124d4565b604051610acb9190613dbc565b60405180910390f35b348015610ae057600080fd5b50610afb6004803603810190610af691906145ec565b612568565b005b348015610b0957600080fd5b50610b126125eb565b604051610b1f9190614001565b60405180910390f35b348015610b3457600080fd5b50610b3d612605565b604051610b4a9190613e67565b60405180910390f35b348015610b5f57600080fd5b50610b7a6004803603810190610b759190614385565b612693565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610bd757506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610c075750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b606060028054610c1d90614b03565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4990614b03565b8015610c965780601f10610c6b57610100808354040283529160200191610c96565b820191906000526020600020905b815481529060010190602001808311610c7957829003601f168201915b5050505050905090565b600081565b6000610cb0826126ae565b610ce6576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610d2e8161270d565b610d38838361280a565b505050565b600a60189054906101000a900467ffffffffffffffff1681565b81610d60610dc7565b811115610da2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9990614b80565b60405180910390fd5b610daa61294e565b816011600085815260200190815260200160002081905550505050565b6000610dd16129cc565b6001546000540303905090565b610de661294e565b6000801b8103610e2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2290614bec565b60405180910390fd5b80600f8190555050565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610e7357610e723361270d565b5b610e7e8484846129d1565b50505050565b600280811115610e9757610e966147b8565b5b600d60009054906101000a900460ff166002811115610eb957610eb86147b8565b5b14610ef9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef090614c58565b60405180910390fd5b80600a60009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681610f24610dc7565b610f2e9190614ca7565b1115610f6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6690614d27565b60405180910390fd5b6000828181610f7e9190614d47565b3414610fbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb690614dfb565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461102d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102490614e8d565b60405180910390fd5b600a60089054906101000a900467ffffffffffffffff1667ffffffffffffffff1684611058336115bc565b6110629190614ca7565b11156110a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109a90614f1f565b60405180910390fd5b6110ad3385612cf3565b50505050565b6110bb61294e565b600047905080821115611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90614f8b565b60405180910390fd5b7fe6995d981a05e2f3d0adaebb01fc440584216e510c59d358ba9dd149bf0b29ab826040516111329190613ea2565b60405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611180573d6000803e3d6000fd5b505050565b603f81565b61119261294e565b60058167ffffffffffffffff16106111df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d69061501d565b60405180910390fd5b80600a60086101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461125b5761125a3361270d565b5b611266848484612d11565b50505050565b611277816001612d31565b50565b600a60089054906101000a900467ffffffffffffffff1681565b61129c61294e565b6002600954036112e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d890615089565b60405180910390fd5b600260098190555060008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016113249190613f57565b602060405180830381865afa158015611341573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136591906150be565b90507fe6995d981a05e2f3d0adaebb01fc440584216e510c59d358ba9dd149bf0b29ab816040516113969190613ea2565b60405180910390a16113c933828473ffffffffffffffffffffffffffffffffffffffff16612f839092919063ffffffff16565b50600160098190555050565b6113dd61294e565b80600e90816113ec919061528d565b5050565b6060600083839050905060008167ffffffffffffffff8111156114165761141561425a565b5b60405190808252806020026020018201604052801561144f57816020015b61143c613cb9565b8152602001906001900390816114345790505b50905060005b8281146114a75761147e8686838181106114725761147161535f565b5b90506020020135611ebe565b8282815181106114915761149061535f565b5b6020026020010181905250806001019050611455565b50809250505092915050565b60006114be82613009565b9050919050565b6000816114d0610dc7565b811115611512576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150990614b80565b60405180910390fd5b6011600084815260200190815260200160002054915050919050565b600e805461153b90614b03565b80601f016020809104026020016040519081016040528092919081815260200182805461156790614b03565b80156115b45780601f10611589576101008083540402835291602001916115b4565b820191906000526020600020905b81548152906001019060200180831161159757829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611623576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6060600e805461168390614b03565b80601f01602080910402602001604051908101604052809291908181526020018280546116af90614b03565b80156116fc5780601f106116d1576101008083540402835291602001916116fc565b820191906000526020600020905b8154815290600101906020018083116116df57829003601f168201915b5050505050905090565b61170e61294e565b61171860006130d5565b565b61172261294e565b60016002811115611736576117356147b8565b5b600d60009054906101000a900460ff166002811115611758576117576147b8565b5b03611764576000611767565b60015b600d60006101000a81548160ff0219169083600281111561178b5761178a6147b8565b5b02179055507f618c43efaa1f48ff78a58f07021c029bd7498dee3b3b7ed7844f7502cb1cad68600d60009054906101000a900460ff166040516117ce919061482f565b60405180910390a1565b606060008060006117e8856115bc565b905060008167ffffffffffffffff8111156118065761180561425a565b5b6040519080825280602002602001820160405280156118345781602001602082028036833780820191505090505b50905061183f613cb9565b60006118496129cc565b90505b83861461190d5761185c8161319b565b9150816040015161190257600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16146118a757816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361190157808387806001019850815181106118f4576118f361535f565b5b6020026020010181815250505b5b80600101905061184c565b508195505050505050919050565b61192361294e565b60004790507fe6995d981a05e2f3d0adaebb01fc440584216e510c59d358ba9dd149bf0b29ab816040516119579190613ea2565b60405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156119a5573d6000803e3d6000fd5b5050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546119e290614b03565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0e90614b03565b8015611a5b5780601f10611a3057610100808354040283529160200191611a5b565b820191906000526020600020905b815481529060010190602001808311611a3e57829003601f168201915b5050505050905090565b611a6d61294e565b600280811115611a8057611a7f6147b8565b5b600d60009054906101000a900460ff166002811115611aa257611aa16147b8565b5b03611aae576000611ab1565b60025b600d60006101000a81548160ff02191690836002811115611ad557611ad46147b8565b5b02179055507f618c43efaa1f48ff78a58f07021c029bd7498dee3b3b7ed7844f7502cb1cad68600d60009054906101000a900460ff16604051611b18919061482f565b60405180910390a1565b6060818310611b5d576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611b686131c6565b9050611b726129cc565b851015611b8457611b816129cc565b94505b80841115611b90578093505b6000611b9b876115bc565b905084861015611bbe576000868603905081811015611bb8578091505b50611bc3565b600090505b60008167ffffffffffffffff811115611bdf57611bde61425a565b5b604051908082528060200260200182016040528015611c0d5781602001602082028036833780820191505090505b50905060008203611c245780945050505050611d27565b6000611c2f88611ebe565b905060008160400151611c4457816000015190505b60008990505b888114158015611c5a5750848714155b15611d1957611c688161319b565b92508260400151611d0e57600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611cb357826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611d0d5780848880600101995081518110611d0057611cff61535f565b5b6020026020010181815250505b5b806001019050611c4a565b508583528296505050505050505b9392505050565b611d3661294e565b60018167ffffffffffffffff161015611d84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7b906153da565b60405180910390fd5b80600a60006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050565b81611dba8161270d565b611dc483836131cf565b505050565b600d60009054906101000a900460ff1681565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611e1a57611e193361270d565b5b611e26858585856132da565b5050505050565b80600a60009054906101000a900467ffffffffffffffff1667ffffffffffffffff1681611e58610dc7565b611e629190614ca7565b1115611ea3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9a90614d27565b60405180910390fd5b611eab61294e565b611eb53383612cf3565b5050565b600081565b611ec6613cb9565b611ece613cb9565b611ed66129cc565b831080611eea5750611ee66131c6565b8310155b15611ef85780915050611f23565b611f018361319b565b9050806040015115611f165780915050611f23565b611f1f8361334d565b9150505b919050565b6060611f33826126ae565b611f72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6990615446565b60405180910390fd5b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c87b56dd846040518263ffffffff1660e01b8152600401611fcf9190613ea2565b600060405180830381865afa158015611fec573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061201591906154d6565b905080915050919050565b60016002811115612034576120336147b8565b5b600d60009054906101000a900460ff166002811115612056576120556147b8565b5b14612096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161208d9061556b565b60405180910390fd5b82600a60009054906101000a900467ffffffffffffffff1667ffffffffffffffff16816120c1610dc7565b6120cb9190614ca7565b111561210c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210390614d27565b60405180910390fd5b600084818161211b9190614d47565b341461215c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215390614dfb565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c190614e8d565b60405180910390fd5b600a60109054906101000a900467ffffffffffffffff1667ffffffffffffffff16866121f5336115bc565b6121ff9190614ca7565b1115612240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223790614f1f565b60405180910390fd5b600a60109054906101000a900467ffffffffffffffff1667ffffffffffffffff1686601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122ac9190614ca7565b11156122ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e4906155fd565b60405180910390fd5b6122fb868686600f5461336d565b61233a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123319061568f565b60405180910390fd5b85601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546123899190614ca7565b9250508190555061239a3387612cf3565b505050505050565b600a60009054906101000a900467ffffffffffffffff1681565b6123c461294e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242a906156fb565b60405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fa6375348ec6f00fff8306bb897b0a08eb1a029b5ff13898a15d188f163919b42816040516124a39190613f57565b60405180910390a150565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61257061294e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125d69061578d565b60405180910390fd5b6125e8816130d5565b50565b600a60109054906101000a900467ffffffffffffffff1681565b600c805461261290614b03565b80601f016020809104026020016040519081016040528092919081815260200182805461263e90614b03565b801561268b5780601f106126605761010080835404028352916020019161268b565b820191906000526020600020905b81548152906001019060200180831161266e57829003601f168201915b505050505081565b61269b61294e565b80600c90816126aa919061528d565b5050565b6000816126b96129cc565b111580156126c8575060005482105b8015612706575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115612807576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b81526004016127849291906157ad565b602060405180830381865afa1580156127a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127c591906157eb565b61280657806040517fede71dcc0000000000000000000000000000000000000000000000000000000081526004016127fd9190613f57565b60405180910390fd5b5b50565b6000612815826114b3565b90508073ffffffffffffffffffffffffffffffffffffffff1661283661343c565b73ffffffffffffffffffffffffffffffffffffffff1614612899576128628161285d61343c565b6124d4565b612898576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b612956613444565b73ffffffffffffffffffffffffffffffffffffffff166129746119a9565b73ffffffffffffffffffffffffffffffffffffffff16146129ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129c190615864565b60405180910390fd5b565b600090565b60006129dc82613009565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612a43576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080612a4f8461344c565b91509150612a658187612a6061343c565b613473565b612ab157612a7a86612a7561343c565b6124d4565b612ab0576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612b17576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612b2486868660016134b7565b8015612b2f57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550612bfd85612bd98888876134bd565b7c0200000000000000000000000000000000000000000000000000000000176134e5565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612c835760006001850190506000600460008381526020019081526020016000205403612c81576000548114612c80578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612ceb8686866001613510565b505050505050565b612d0d828260405180602001604052806000815250613516565b5050565b612d2c83838360405180602001604052806000815250611ddc565b505050565b6000612d3c83613009565b90506000819050600080612d4f8661344c565b915091508415612db857612d6b8184612d6661343c565b613473565b612db757612d8083612d7b61343c565b6124d4565b612db6576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b5b612dc68360008860016134b7565b8015612dd157600082555b600160806001901b03600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612e7983612e36856000886134bd565b7c02000000000000000000000000000000000000000000000000000000007c010000000000000000000000000000000000000000000000000000000017176134e5565b600460008881526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000851603612eff5760006001870190506000600460008381526020019081526020016000205403612efd576000548114612efc578460046000838152602001908152602001600020819055505b5b505b85600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612f69836000886001613510565b600160008154809291906001019190505550505050505050565b6130048363a9059cbb60e01b8484604051602401612fa2929190615884565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506135b3565b505050565b600080829050806130186129cc565b1161309e5760005481101561309d5760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082160361309b575b60008103613091576004600083600190039350838152602001908152602001600020549050613067565b80925050506130d0565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6131a3613cb9565b6131bf600460008481526020019081526020016000205461367a565b9050919050565b60008054905090565b80600760006131dc61343c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff1661328961343c565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516132ce9190613dbc565b60405180910390a35050565b6132e5848484610e35565b60008373ffffffffffffffffffffffffffffffffffffffff163b146133475761331084848484613730565b613346576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b613355613cb9565b61336661336183613009565b61367a565b9050919050565b60008033601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054876133bc9190614ca7565b6040516020016133cd929190615884565b604051602081830303815290604052805190602001209050613431858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050508483613880565b915050949350505050565b600033905090565b600033905090565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86134d4868684613897565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b61352083836138a0565b60008373ffffffffffffffffffffffffffffffffffffffff163b146135ae57600080549050600083820390505b6135606000868380600101945086613730565b613596576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061354d5781600054146135ab57600080fd5b50505b505050565b6000613615826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613a5b9092919063ffffffff16565b9050600081511115613675578080602001905181019061363591906157eb565b613674576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161366b9061591f565b60405180910390fd5b5b505050565b613682613cb9565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261375661343c565b8786866040518563ffffffff1660e01b81526004016137789493929190615994565b6020604051808303816000875af19250505080156137b457506040513d601f19601f820116820180604052508101906137b191906159f5565b60015b61382d573d80600081146137e4576040519150601f19603f3d011682016040523d82523d6000602084013e6137e9565b606091505b506000815103613825576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60008261388d8584613a73565b1490509392505050565b60009392505050565b600080549050600082036138e0576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6138ed60008483856134b7565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506139648361395560008660006134bd565b61395e85613ac9565b176134e5565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b818114613a0557808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001810190506139ca565b5060008203613a40576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000819055505050613a566000848385613510565b505050565b6060613a6a8484600085613ad9565b90509392505050565b60008082905060005b8451811015613abe57613aa982868381518110613a9c57613a9b61535f565b5b6020026020010151613bed565b91508080613ab690615a22565b915050613a7c565b508091505092915050565b60006001821460e11b9050919050565b606082471015613b1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b1590615adc565b60405180910390fd5b613b2785613c18565b613b66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b5d90615b48565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613b8f9190615ba4565b60006040518083038185875af1925050503d8060008114613bcc576040519150601f19603f3d011682016040523d82523d6000602084013e613bd1565b606091505b5091509150613be1828286613c3b565b92505050949350505050565b6000818310613c0557613c008284613ca2565b613c10565b613c0f8383613ca2565b5b905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613c4b57829050613c9b565b600083511115613c5e5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613c929190613e67565b60405180910390fd5b9392505050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613d5181613d1c565b8114613d5c57600080fd5b50565b600081359050613d6e81613d48565b92915050565b600060208284031215613d8a57613d89613d12565b5b6000613d9884828501613d5f565b91505092915050565b60008115159050919050565b613db681613da1565b82525050565b6000602082019050613dd16000830184613dad565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613e11578082015181840152602081019050613df6565b60008484015250505050565b6000601f19601f8301169050919050565b6000613e3982613dd7565b613e438185613de2565b9350613e53818560208601613df3565b613e5c81613e1d565b840191505092915050565b60006020820190508181036000830152613e818184613e2e565b905092915050565b6000819050919050565b613e9c81613e89565b82525050565b6000602082019050613eb76000830184613e93565b92915050565b613ec681613e89565b8114613ed157600080fd5b50565b600081359050613ee381613ebd565b92915050565b600060208284031215613eff57613efe613d12565b5b6000613f0d84828501613ed4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613f4182613f16565b9050919050565b613f5181613f36565b82525050565b6000602082019050613f6c6000830184613f48565b92915050565b613f7b81613f36565b8114613f8657600080fd5b50565b600081359050613f9881613f72565b92915050565b60008060408385031215613fb557613fb4613d12565b5b6000613fc385828601613f89565b9250506020613fd485828601613ed4565b9150509250929050565b600067ffffffffffffffff82169050919050565b613ffb81613fde565b82525050565b60006020820190506140166000830184613ff2565b92915050565b6000806040838503121561403357614032613d12565b5b600061404185828601613ed4565b925050602061405285828601613ed4565b9150509250929050565b6000819050919050565b61406f8161405c565b811461407a57600080fd5b50565b60008135905061408c81614066565b92915050565b6000602082840312156140a8576140a7613d12565b5b60006140b68482850161407d565b91505092915050565b6000806000606084860312156140d8576140d7613d12565b5b60006140e686828701613f89565b93505060206140f786828701613f89565b925050604061410886828701613ed4565b9150509250925092565b61411b81613fde565b811461412657600080fd5b50565b60008135905061413881614112565b92915050565b60006020828403121561415457614153613d12565b5b600061416284828501614129565b91505092915050565b6000819050919050565b600061419061418b61418684613f16565b61416b565b613f16565b9050919050565b60006141a282614175565b9050919050565b60006141b482614197565b9050919050565b6141c4816141a9565b82525050565b60006020820190506141df60008301846141bb565b92915050565b60006141f082613f36565b9050919050565b614200816141e5565b811461420b57600080fd5b50565b60008135905061421d816141f7565b92915050565b60006020828403121561423957614238613d12565b5b60006142478482850161420e565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61429282613e1d565b810181811067ffffffffffffffff821117156142b1576142b061425a565b5b80604052505050565b60006142c4613d08565b90506142d08282614289565b919050565b600067ffffffffffffffff8211156142f0576142ef61425a565b5b6142f982613e1d565b9050602081019050919050565b82818337600083830152505050565b6000614328614323846142d5565b6142ba565b90508281526020810184848401111561434457614343614255565b5b61434f848285614306565b509392505050565b600082601f83011261436c5761436b614250565b5b813561437c848260208601614315565b91505092915050565b60006020828403121561439b5761439a613d12565b5b600082013567ffffffffffffffff8111156143b9576143b8613d17565b5b6143c584828501614357565b91505092915050565b600080fd5b600080fd5b60008083601f8401126143ee576143ed614250565b5b8235905067ffffffffffffffff81111561440b5761440a6143ce565b5b602083019150836020820283011115614427576144266143d3565b5b9250929050565b6000806020838503121561444557614444613d12565b5b600083013567ffffffffffffffff81111561446357614462613d17565b5b61446f858286016143d8565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6144b081613f36565b82525050565b6144bf81613fde565b82525050565b6144ce81613da1565b82525050565b600062ffffff82169050919050565b6144ec816144d4565b82525050565b60808201600082015161450860008501826144a7565b50602082015161451b60208501826144b6565b50604082015161452e60408501826144c5565b50606082015161454160608501826144e3565b50505050565b600061455383836144f2565b60808301905092915050565b6000602082019050919050565b60006145778261447b565b6145818185614486565b935061458c83614497565b8060005b838110156145bd5781516145a48882614547565b97506145af8361455f565b925050600181019050614590565b5085935050505092915050565b600060208201905081810360008301526145e4818461456c565b905092915050565b60006020828403121561460257614601613d12565b5b600061461084828501613f89565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61464e81613e89565b82525050565b60006146608383614645565b60208301905092915050565b6000602082019050919050565b600061468482614619565b61468e8185614624565b935061469983614635565b8060005b838110156146ca5781516146b18882614654565b97506146bc8361466c565b92505060018101905061469d565b5085935050505092915050565b600060208201905081810360008301526146f18184614679565b905092915050565b60008060006060848603121561471257614711613d12565b5b600061472086828701613f89565b935050602061473186828701613ed4565b925050604061474286828701613ed4565b9150509250925092565b61475581613da1565b811461476057600080fd5b50565b6000813590506147728161474c565b92915050565b6000806040838503121561478f5761478e613d12565b5b600061479d85828601613f89565b92505060206147ae85828601614763565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600381106147f8576147f76147b8565b5b50565b6000819050614809826147e7565b919050565b6000614819826147fb565b9050919050565b6148298161480e565b82525050565b60006020820190506148446000830184614820565b92915050565b600067ffffffffffffffff8211156148655761486461425a565b5b61486e82613e1d565b9050602081019050919050565b600061488e6148898461484a565b6142ba565b9050828152602081018484840111156148aa576148a9614255565b5b6148b5848285614306565b509392505050565b600082601f8301126148d2576148d1614250565b5b81356148e284826020860161487b565b91505092915050565b6000806000806080858703121561490557614904613d12565b5b600061491387828801613f89565b945050602061492487828801613f89565b935050604061493587828801613ed4565b925050606085013567ffffffffffffffff81111561495657614955613d17565b5b614962878288016148bd565b91505092959194509250565b60808201600082015161498460008501826144a7565b50602082015161499760208501826144b6565b5060408201516149aa60408501826144c5565b5060608201516149bd60608501826144e3565b50505050565b60006080820190506149d8600083018461496e565b92915050565b60008083601f8401126149f4576149f3614250565b5b8235905067ffffffffffffffff811115614a1157614a106143ce565b5b602083019150836020820283011115614a2d57614a2c6143d3565b5b9250929050565b600080600060408486031215614a4d57614a4c613d12565b5b6000614a5b86828701613ed4565b935050602084013567ffffffffffffffff811115614a7c57614a7b613d17565b5b614a88868287016149de565b92509250509250925092565b60008060408385031215614aab57614aaa613d12565b5b6000614ab985828601613f89565b9250506020614aca85828601613f89565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614b1b57607f821691505b602082108103614b2e57614b2d614ad4565b5b50919050565b7f496e76616c696420746f6b656e49640000000000000000000000000000000000600082015250565b6000614b6a600f83613de2565b9150614b7582614b34565b602082019050919050565b60006020820190508181036000830152614b9981614b5d565b9050919050565b7f77686974656c69737448617368206973206e6f74207365742e00000000000000600082015250565b6000614bd6601983613de2565b9150614be182614ba0565b602082019050919050565b60006020820190508181036000830152614c0581614bc9565b9050919050565b7f5075626c6963206d696e74206973206e6f74206c6976652e0000000000000000600082015250565b6000614c42601883613de2565b9150614c4d82614c0c565b602082019050919050565b60006020820190508181036000830152614c7181614c35565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614cb282613e89565b9150614cbd83613e89565b9250828201905080821115614cd557614cd4614c78565b5b92915050565b7f536f6c64206f7574210000000000000000000000000000000000000000000000600082015250565b6000614d11600983613de2565b9150614d1c82614cdb565b602082019050919050565b60006020820190508181036000830152614d4081614d04565b9050919050565b6000614d5282613e89565b9150614d5d83613e89565b9250828202614d6b81613e89565b91508282048414831517614d8257614d81614c78565b5b5092915050565b7f506c656173652073656e642074686520636f727265637420616d6f756e74206960008201527f6e206f7264657220746f206d696e742e00000000000000000000000000000000602082015250565b6000614de5603083613de2565b9150614df082614d89565b604082019050919050565b60006020820190508181036000830152614e1481614dd8565b9050919050565b7f436f6e7472616374732063616e206e6f742063616c6c2074686973206d65746860008201527f6f642e0000000000000000000000000000000000000000000000000000000000602082015250565b6000614e77602383613de2565b9150614e8282614e1b565b604082019050919050565b60006020820190508181036000830152614ea681614e6a565b9050919050565b7f596f752068617665206d696e74656420796f7572206d617820616c6c6f77616e60008201527f63652e0000000000000000000000000000000000000000000000000000000000602082015250565b6000614f09602383613de2565b9150614f1482614ead565b604082019050919050565b60006020820190508181036000830152614f3881614efc565b9050919050565b7f6e6f7420656e6f7567682066756e647300000000000000000000000000000000600082015250565b6000614f75601083613de2565b9150614f8082614f3f565b602082019050919050565b60006020820190508181036000830152614fa481614f68565b9050919050565b7f43616e27742073657420746f206d6f7265207468616e2035207065722077616c60008201527f6c65740000000000000000000000000000000000000000000000000000000000602082015250565b6000615007602383613de2565b915061501282614fab565b604082019050919050565b6000602082019050818103600083015261503681614ffa565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000615073601f83613de2565b915061507e8261503d565b602082019050919050565b600060208201905081810360008301526150a281615066565b9050919050565b6000815190506150b881613ebd565b92915050565b6000602082840312156150d4576150d3613d12565b5b60006150e2848285016150a9565b91505092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830261514d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82615110565b6151578683615110565b95508019841693508086168417925050509392505050565b600061518a61518561518084613e89565b61416b565b613e89565b9050919050565b6000819050919050565b6151a48361516f565b6151b86151b082615191565b84845461511d565b825550505050565b600090565b6151cd6151c0565b6151d881848461519b565b505050565b5b818110156151fc576151f16000826151c5565b6001810190506151de565b5050565b601f82111561524157615212816150eb565b61521b84615100565b8101602085101561522a578190505b61523e61523685615100565b8301826151dd565b50505b505050565b600082821c905092915050565b600061526460001984600802615246565b1980831691505092915050565b600061527d8383615253565b9150826002028217905092915050565b61529682613dd7565b67ffffffffffffffff8111156152af576152ae61425a565b5b6152b98254614b03565b6152c4828285615200565b600060209050601f8311600181146152f757600084156152e5578287015190505b6152ef8582615271565b865550615357565b601f198416615305866150eb565b60005b8281101561532d57848901518255600182019150602085019450602081019050615308565b8683101561534a5784890151615346601f891682615253565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4d617820737570706c792073686f756c642062652031206f7220686967686572600082015250565b60006153c4602083613de2565b91506153cf8261538e565b602082019050919050565b600060208201905081810360008301526153f3816153b7565b9050919050565b7f546f6b656e20646f6573206e6f742065786973742e0000000000000000000000600082015250565b6000615430601583613de2565b915061543b826153fa565b602082019050919050565b6000602082019050818103600083015261545f81615423565b9050919050565b6000615479615474846142d5565b6142ba565b90508281526020810184848401111561549557615494614255565b5b6154a0848285613df3565b509392505050565b600082601f8301126154bd576154bc614250565b5b81516154cd848260208601615466565b91505092915050565b6000602082840312156154ec576154eb613d12565b5b600082015167ffffffffffffffff81111561550a57615509613d17565b5b615516848285016154a8565b91505092915050565b7f57686974656c697374206d696e74206973206e6f74206c6976652e0000000000600082015250565b6000615555601b83613de2565b91506155608261551f565b602082019050919050565b6000602082019050818103600083015261558481615548565b9050919050565b7f596f75206861766520636c61696d656420796f7572206d617820616c6c6f776160008201527f6e63652e00000000000000000000000000000000000000000000000000000000602082015250565b60006155e7602483613de2565b91506155f28261558b565b604082019050919050565b60006020820190508181036000830152615616816155da565b9050919050565b7f596f7520617265206e6f74206f6e207468652077686974656c69737420666f7260008201527f2074686973207175616e746974792e0000000000000000000000000000000000602082015250565b6000615679602f83613de2565b91506156848261561d565b604082019050919050565b600060208201905081810360008301526156a88161566c565b9050919050565b7f496e76616c696420636f6e747261637420616464726573730000000000000000600082015250565b60006156e5601883613de2565b91506156f0826156af565b602082019050919050565b60006020820190508181036000830152615714816156d8565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615777602683613de2565b91506157828261571b565b604082019050919050565b600060208201905081810360008301526157a68161576a565b9050919050565b60006040820190506157c26000830185613f48565b6157cf6020830184613f48565b9392505050565b6000815190506157e58161474c565b92915050565b60006020828403121561580157615800613d12565b5b600061580f848285016157d6565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061584e602083613de2565b915061585982615818565b602082019050919050565b6000602082019050818103600083015261587d81615841565b9050919050565b60006040820190506158996000830185613f48565b6158a66020830184613e93565b9392505050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615909602a83613de2565b9150615914826158ad565b604082019050919050565b60006020820190508181036000830152615938816158fc565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006159668261593f565b615970818561594a565b9350615980818560208601613df3565b61598981613e1d565b840191505092915050565b60006080820190506159a96000830187613f48565b6159b66020830186613f48565b6159c36040830185613e93565b81810360608301526159d5818461595b565b905095945050505050565b6000815190506159ef81613d48565b92915050565b600060208284031215615a0b57615a0a613d12565b5b6000615a19848285016159e0565b91505092915050565b6000615a2d82613e89565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615a5f57615a5e614c78565b5b600182019050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000615ac6602683613de2565b9150615ad182615a6a565b604082019050919050565b60006020820190508181036000830152615af581615ab9565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615b32601d83613de2565b9150615b3d82615afc565b602082019050919050565b60006020820190508181036000830152615b6181615b25565b9050919050565b600081905092915050565b6000615b7e8261593f565b615b888185615b68565b9350615b98818560208601613df3565b80840191505092915050565b6000615bb08284615b73565b91508190509291505056fea264697066735822122014a8d38bcdf3f7b2f83be1d7c6fbcf1be1b51e84beb250e359813885c1d9e4f564736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000001e61
-----Decoded View---------------
Arg [0] : _maxSupply (uint64): 7777
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000001e61
Loading...
Loading
Loading...
Loading
[ 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.