ERC-721
Overview
Max Total Supply
7,777 lw-sw0
Holders
256
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 lw-sw0Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
LW1Comic
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2023-01-19 */ // File: @openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity 0.8.17; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); } // File: @openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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); } // File: @openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } // File: @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } } // File: @openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; } // File: @openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol /** * @dev Standard math utilities missing in the Solidity language. */ library MathUpgradeable { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } } // File: @openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = MathUpgradeable.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, MathUpgradeable.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } } // File: @openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; } // File: @openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @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, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721Upgradeable.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; } // File: @openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable { function __ERC721URIStorage_init() internal onlyInitializing { } function __ERC721URIStorage_init_unchained() internal onlyInitializing { } using StringsUpgradeable for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev See {ERC721-_burn}. This override additionally checks to see if a * token-specific URI was set for the token, and if so, it deletes the token URI from * the storage mapping. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } // File: @openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } // File: @openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[46] private __gap; } // File: @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } // File: @openzeppelin/contracts/utils/Counters.sol /** * @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; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol /** * @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); } // File: operator-filter-registry/src/IOperatorFilterRegistry.sol interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); } // File: operator-filter-registry/src/OperatorFilterer.sol /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } } // File: operator-filter-registry/src/DefaultOperatorFilterer.sol /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} } // File: contracts/LW1-Comic.sol interface IERC721 { function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external returns (address); } contract LW1Comic is DefaultOperatorFilterer, Initializable, OwnableUpgradeable, ERC721Upgradeable, ERC721URIStorageUpgradeable, ERC721EnumerableUpgradeable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; struct TokenTiers { string name; uint256 tier; string uriPackaged; uint256 possibilityCount; uint256 forgePercent; } mapping(address => uint256) private allowList; mapping(address => uint256) private discountList; mapping(address => uint256) private mintCount; uint256 private mintPrice; uint256 private portalPrice; uint256 private discountPrice; uint256 private maxSupply; uint256 private maxPerAddress; uint256 private _baseCount; uint256 private randomSeed; string public contractURI; bool private openSale = false; address private royaltyAddress; address private sourceContract; mapping (uint256 => uint256) private tokenRandomKey; mapping (uint256 => string) private unpackagedUris; mapping (uint256 => bool) private canUnpack; mapping (uint256 => bool) private unpackaged; address[] private tokenOwners; TokenTiers[] private tokenTiers; mapping (uint256 => TokenTiers) private tokenTiersMinted; string private errNotOwner = "You are not the owner of this token"; string private errZeroAddress = "Zero address"; event Minted(uint256 tokenId, address owner); event Forged(uint256 tokenId, address owner); constructor( string memory _name, string memory _symbol, uint256 _maxSupply, TokenTiers[] memory _tokenTiers ) { initialize(_name, _symbol); maxSupply = _maxSupply; royaltyAddress = msg.sender; randomSeed = 0; uint256 sum = 0; for (uint256 i = 0; i < _tokenTiers.length; i++) { sum += _tokenTiers[i].possibilityCount; } require(maxSupply == sum, "Max supply should be equal to the sum of possibility count"); for (uint256 i = 0; i < _tokenTiers.length; i++) { tokenTiers.push(_tokenTiers[i]); } } function initialize( string memory _name, string memory _symbol ) public initializer { __Ownable_init(); __ERC721_init(_name, _symbol); __ERC721URIStorage_init(); __ERC721Enumerable_init(); } function random(uint256 _l) public view returns (uint256) { return uint256(keccak256(abi.encodePacked(randomSeed, block.difficulty, block.timestamp, _tokenIdCounter.current() ))) % _l; } function setBaseCountAndContract(uint256 _count, address _contract, uint256 _freePrice) external onlyOwner { require(_contract != address(0), errZeroAddress); _baseCount = _count; _tokenIdCounter = Counters.Counter(_count); sourceContract = _contract; portalPrice = _freePrice; randomSeed++; } function setRoyaltyAddress(address _royaltyAddress) external onlyOwner { require(_royaltyAddress != address(0), errZeroAddress); royaltyAddress = _royaltyAddress; randomSeed++; } function getRoyaltyAddress() external view returns (address) { return royaltyAddress; } function setPrice(uint256 _mintPrice) external onlyOwner { mintPrice = _mintPrice; randomSeed++; } function setDiscountPrice(uint256 _discountPrice) external onlyOwner { discountPrice = _discountPrice; randomSeed++; } function setMaxPerAddress(uint256 _maxPerAddress) external onlyOwner { maxPerAddress = _maxPerAddress; randomSeed++; } function getPrices() external view returns (uint256, uint256, uint256) { return (mintPrice, discountPrice, portalPrice); } function setAllowList(address[] memory _addresses, uint256 _amount) external onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { if(_addresses[i] != address(0)) { allowList[_addresses[i]] = _amount; } randomSeed++; } } function setDiscountList(address[] memory _addresses, uint256 _amount) external onlyOwner { for (uint256 i = 0; i < _addresses.length; i++) { if(_addresses[i] != address(0)) { discountList[_addresses[i]] = _amount; if(allowList[_addresses[i]]>0) { allowList[_addresses[i]] += _amount; } else { allowList[_addresses[i]] = _amount; } } randomSeed++; } } function getPrice(uint256 _tokenId) public view returns (uint256) { uint256 price = mintPrice; if(_tokenId > 0 && _baseCount > 0 && _tokenId <= _baseCount) { price = portalPrice; } return price; } function getQty(address _address, uint256 _tokenId) public view returns (uint256) { require(_address != address(0), errZeroAddress); uint256 availableToMint = openSale? maxPerAddress: 0; if(_tokenId > 0 && _baseCount > 0 && _tokenId <= _baseCount) { availableToMint = tokenRandomKey[_tokenId]>0? 0: 1; } else if((openSale || allowList[_address]>0) && _tokenIdCounter.current() < maxSupply) { if(allowList[_address]>0) { availableToMint += allowList[_address]; } if(mintCount[_address]>0) { if(availableToMint >= mintCount[_address]) { availableToMint -= mintCount[_address]; } else { availableToMint = 0; } } } return availableToMint; } function getQtyPriceAllowed(address _address, uint256 _tokenId) public view returns (uint256, uint256) { require(_address != address(0), errZeroAddress); return (getQty(_address, _tokenId), getPrice(_tokenId)); } function getDiscountQty(address _address) public view returns (uint256) { require(_address != address(0), errZeroAddress); return discountList[_address]; } function setSaleState(bool _openSale) external onlyOwner { openSale = _openSale; randomSeed++; } function setUnpackageState(uint256 _tokenId, string memory _unpackagedUri, bool _canUnpack) external onlyOwner { unpackagedUris[_tokenId] = _unpackagedUri; canUnpack[_tokenId] = _canUnpack; randomSeed++; } function _mintIt(address _to, uint256 _tokenId, uint256 _random) internal { require(_random > 0 || _tokenId > 0 || getQty(_to, _tokenId) > 0, "You cannot mint"); bool isForge = true; uint256 sum = 0; if(_random == 0) { for (uint256 i = 0; i < tokenTiers.length; i++) { sum += tokenTiers[i].possibilityCount; } isForge = false; _random = random(sum); } require(isForge || sum > 0, "You can't mint"); uint256 _tier = 0; if(!isForge) { for (uint256 i = 0; i < tokenTiers.length; i++) { if (_random < tokenTiers[i].possibilityCount) { _tier = i; tokenTiers[i].possibilityCount -= 1; break; } else { _random -= tokenTiers[i].possibilityCount; } } } else { _tier = _random; } if(_tokenId == 0) { _tokenIdCounter.increment(); _tokenId = _tokenIdCounter.current(); if(!isForge) { if(mintCount[_to]>0) { mintCount[_to]++; } else { mintCount[_to] = 1; } } } _safeMint(_to, _tokenId); _setTokenURI(_tokenId, tokenTiers[_tier].uriPackaged); tokenTiersMinted[_tokenId] = (TokenTiers( tokenTiers[_tier].name, _tier, tokenTiers[_tier].uriPackaged, tokenTiers[_tier].possibilityCount + 1, tokenTiers[_tier].forgePercent )); tokenRandomKey[_tokenId] = (random(2**256 - 1)); emit Minted(_tokenId, _to); randomSeed++; } function mintNFT(address _to, uint256 _tokenId) internal { require(_to != address(0), errZeroAddress); require(openSale || allowList[msg.sender] > 0 || _tokenId>0, "You are not on the allow list"); require(_tokenIdCounter.current() <= maxSupply, "Exceeds max supply"); _mintIt(_to, _tokenId, 0); randomSeed++; } function mint(uint256 _qty) external payable { address _to = msg.sender; require(_to != address(0), errZeroAddress); require(_qty > 0, "You cannot mint 0 NFTs"); require(_qty <= 25, "You cannot mint more than 25 NTFs at once"); //require(msg.value >= mintPrice*_qty, "You need to pay more"); uint256 discountQty = ( discountList[_to]>0 )? (_qty > discountList[_to]? discountList[_to]: _qty): 0; uint256 fullQty = _qty - discountQty; require(msg.value > 0 && msg.value >= (( discountPrice > 0 ? (discountPrice * discountQty): 0) + ( mintPrice * fullQty ) ), "You need to pay more"); require(getQty(_to, 0)>=_qty, "You cannot buy this amount of NFTs"); for( uint256 i = 0; i < _qty; i++) { mintNFT(_to, 0); if(discountList[_to] > 0){ discountList[_to] -= 1; } } payable(royaltyAddress).transfer(msg.value); if(allowList[_to]>0){ allowList[_to] -= _qty; } randomSeed++; } function portalMint(uint256[] memory _tokenIds) external payable { require(portalPrice > 0, "Free mint is not allowed"); require(msg.value >= portalPrice*_tokenIds.length, "You need to pay more"); require(_tokenIds.length > 0, "You cannot mint more than 0 NTFs"); require(_tokenIds.length <= 25, "You cannot mint more than 25 NTFs at once"); for( uint256 i = 0; i < _tokenIds.length; i++){ require(IERC721(sourceContract).ownerOf(_tokenIds[i]) == msg.sender, errNotOwner); require(tokenRandomKey[_tokenIds[i]] == 0, "Already minted"); mintNFT(msg.sender, _tokenIds[i]); } payable(royaltyAddress).transfer(msg.value); randomSeed++; } function unpackage(uint256 _tokenId) external { require(ownerOf(_tokenId) == msg.sender, errNotOwner); require(canUnpack[_tokenId] == true, "Unpackage is not yet allowed"); require(unpackaged[_tokenId] != true, "Already unpackaged"); _setTokenURI(_tokenId, unpackagedUris[_tokenId]); unpackaged[_tokenId] = true; randomSeed++; } function burn(uint256 _tokenId) public { require(ownerOf(_tokenId) == msg.sender || owner() == msg.sender, errNotOwner); _burn(_tokenId); randomSeed++; } function forge(address _to, uint256[] memory _tokenIds) external { require(_to != address(0), errZeroAddress); require(_tokenIds.length==3, "You need 3 NFTs to Forge"); maxSupply++; uint256 _tier = tokenTiersMinted[_tokenIds[0]].tier; require(_tier < tokenTiers.length-1, "You can't forge this tier"); for (uint256 i = 0; i < _tokenIds.length; i++) { require(tokenTiersMinted[_tokenIds[i]].tier == _tier, "Tokens are not from the same tier"); require(unpackaged[_tokenIds[i]] == true, "You need to unpackage the NFTs"); } for (uint256 i = 0; i < _tokenIds.length; i++) { burn(_tokenIds[i]); } uint256 minimumAmount = 0; for(uint256 i = _tier; i < tokenTiers.length; i++) { minimumAmount += tokenTiers[i].forgePercent; } uint256 _random = random(minimumAmount); TokenTiers[] memory holdTemp = tokenTiers; uint256 newTier = _tier + 1; for (uint256 i = tokenTiers.length-1; i > _tier; i--) { if(_random <= holdTemp[i].forgePercent) { newTier = i; break; } else { _random -= holdTemp[i].forgePercent; } } _mintIt(_to, 0, newTier); emit Forged(_tokenIdCounter.current(), _to); randomSeed++; } function getTokenRandomKey(uint256 _tokenId) external view returns (uint256, string memory, bool, bool) { if((ownerOf(_tokenId) == msg.sender || owner() == msg.sender)) { return (tokenRandomKey[_tokenId], unpackagedUris[_tokenId], canUnpack[_tokenId], unpackaged[_tokenId]); } return (0, "", false, false); } function getTokenTier(uint256 _tokenId) external view returns (string memory) { return owner() == msg.sender? tokenTiersMinted[_tokenId].name: ""; } function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable){ super._beforeTokenTransfer(from, to, tokenId, batchSize); } function _burn(uint256 tokenId) internal override(ERC721Upgradeable, ERC721URIStorageUpgradeable) { super._burn(tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, ERC721EnumerableUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } function totalSupply() public view override returns (uint256) { return maxSupply; } function setTokenURI(uint256 _tokenId, string memory _uri) external onlyOwner { _setTokenURI(_tokenId, _uri); randomSeed++; } function tokenURI(uint256 _tokenId) public view override(ERC721URIStorageUpgradeable, ERC721Upgradeable) returns (string memory) { return super.tokenURI(_tokenId); } function setContractURI(string memory _uri) external onlyOwner { contractURI = _uri; randomSeed++; } function isAddressInLists(address _address) external view returns ( TokenTiers[] memory, uint256, uint256, uint256 ) { TokenTiers[] memory temp; return (owner() == msg.sender? tokenTiers: temp, owner() == msg.sender? allowList[_address]: 0, owner() == msg.sender? mintCount[_address]: 0, owner() == msg.sender? discountList[_address]: 0); } function setApprovalForAll(address operator, bool approved) public override(IERC721Upgradeable, ERC721Upgradeable) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override(IERC721Upgradeable, ERC721Upgradeable) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override(IERC721Upgradeable, ERC721Upgradeable) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override(IERC721Upgradeable, ERC721Upgradeable) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(IERC721Upgradeable, ERC721Upgradeable) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"string","name":"uriPackaged","type":"string"},{"internalType":"uint256","name":"possibilityCount","type":"uint256"},{"internalType":"uint256","name":"forgePercent","type":"uint256"}],"internalType":"struct LW1Comic.TokenTiers[]","name":"_tokenTiers","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"Forged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"forge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getDiscountQty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getQty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getQtyPriceAllowed","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoyaltyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTokenRandomKey","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTokenTier","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isAddressInLists","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"string","name":"uriPackaged","type":"string"},{"internalType":"uint256","name":"possibilityCount","type":"uint256"},{"internalType":"uint256","name":"forgePercent","type":"uint256"}],"internalType":"struct LW1Comic.TokenTiers[]","name":"","type":"tuple[]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"portalMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_l","type":"uint256"}],"name":"random","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"},{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_freePrice","type":"uint256"}],"name":"setBaseCountAndContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setDiscountList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountPrice","type":"uint256"}],"name":"setDiscountPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerAddress","type":"uint256"}],"name":"setMaxPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_openSale","type":"bool"}],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_unpackagedUri","type":"string"},{"internalType":"bool","name":"_canUnpack","type":"bool"}],"name":"setUnpackageState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"unpackage","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
610139805460ff1916905560e0604052602360808181529062005a3660a039610142906200002e90826200080b565b5060408051808201909152600c81526b5a65726f206164647265737360a01b6020820152610143906200006290826200080b565b503480156200007057600080fd5b5060405162005a5938038062005a598339810160408190526200009391620009c2565b733cc6cdda760b79bafa08df41ecfa224f810dceb660016daaeb6d7670e522a718067333cd4e3b15620001ef5780156200013d57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200011e57600080fd5b505af115801562000133573d6000803e3d6000fd5b50505050620001ef565b6001600160a01b038216156200018e5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000103565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001d557600080fd5b505af1158015620001ea573d6000803e3d6000fd5b505050505b50620001fe90508484620003a6565b6101348290556101398054610100600160a81b03191633610100021790556000610137819055805b8251811015620002755782818151811062000245576200024562000b71565b602002602001015160600151826200025e919062000b9d565b9150806200026c8162000bb9565b91505062000226565b50806101345414620002f45760405162461bcd60e51b815260206004820152603a60248201527f4d617820737570706c792073686f756c6420626520657175616c20746f20746860448201527f652073756d206f6620706f73736962696c69747920636f756e7400000000000060648201526084015b60405180910390fd5b60005b82518110156200039a5761014083828151811062000319576200031962000b71565b602090810291909101810151825460018101845560009384529190922082516005909202019081906200034d90826200080b565b5060208201516001820155604082015160028201906200036e90826200080b565b506060820151600382015560809091015160049091015580620003918162000bb9565b915050620002f7565b50505050505062000bd5565b600054610100900460ff1615808015620003c75750600054600160ff909116105b80620003f75750620003e430620004f660201b620028811760201c565b158015620003f7575060005460ff166001145b6200045c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401620002eb565b6000805460ff19166001179055801562000480576000805461ff0019166101001790555b6200048a62000505565b6200049683836200056d565b620004a0620005d9565b620004aa620005d9565b8015620004f1576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6001600160a01b03163b151590565b600054610100900460ff16620005615760405162461bcd60e51b815260206004820152602b602482015260008051602062005a1683398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620002eb565b6200056b62000635565b565b600054610100900460ff16620005c95760405162461bcd60e51b815260206004820152602b602482015260008051602062005a1683398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620002eb565b620005d582826200069c565b5050565b600054610100900460ff166200056b5760405162461bcd60e51b815260206004820152602b602482015260008051602062005a1683398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620002eb565b600054610100900460ff16620006915760405162461bcd60e51b815260206004820152602b602482015260008051602062005a1683398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620002eb565b6200056b3362000715565b600054610100900460ff16620006f85760405162461bcd60e51b815260206004820152602b602482015260008051602062005a1683398151915260448201526a6e697469616c697a696e6760a81b6064820152608401620002eb565b60976200070683826200080b565b506098620004f182826200080b565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200079257607f821691505b602082108103620007b357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004f157600081815260208120601f850160051c81016020861015620007e25750805b601f850160051c820191505b818110156200080357828155600101620007ee565b505050505050565b81516001600160401b0381111562000827576200082762000767565b6200083f816200083884546200077d565b84620007b9565b602080601f8311600181146200087757600084156200085e5750858301515b600019600386901b1c1916600185901b17855562000803565b600085815260208120601f198616915b82811015620008a85788860151825594840194600190910190840162000887565b5085821015620008c75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60405160a081016001600160401b0381118282101715620008fc57620008fc62000767565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200092d576200092d62000767565b604052919050565b600082601f8301126200094757600080fd5b81516001600160401b0381111562000963576200096362000767565b602062000979601f8301601f1916820162000902565b82815285828487010111156200098e57600080fd5b60005b83811015620009ae57858101830151828201840152820162000991565b506000928101909101919091529392505050565b60008060008060808587031215620009d957600080fd5b84516001600160401b0380821115620009f157600080fd5b620009ff8883890162000935565b9550602087015191508082111562000a1657600080fd5b62000a248883890162000935565b945060408701519350606087015191508082111562000a4257600080fd5b818701915087601f83011262000a5757600080fd5b81518181111562000a6c5762000a6c62000767565b62000a7d60208260051b0162000902565b8082825260208201915060208360051b86010192508a83111562000aa057600080fd5b602085015b8381101562000b615780518581111562000abe57600080fd5b860160a0818e03601f1901121562000ad557600080fd5b62000adf620008d7565b60208201518781111562000af257600080fd5b62000b038f60208386010162000935565b8252506040820151602082015260608201518781111562000b2357600080fd5b62000b348f60208386010162000935565b604083015250608082810151606083015260a0909201519181019190915283526020928301920162000aa5565b50979a9699509497505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111562000bb35762000bb362000b87565b92915050565b60006001820162000bce5762000bce62000b87565b5060010190565b614e318062000be56000396000f3fe6080604052600436106102935760003560e01c80638b78c1161161015a578063b88d4fde116100c1578063e75722301161007a578063e757223014610826578063e8a3d48514610846578063e985e9c51461085b578063f2fde38b146108a4578063f9a08899146108c4578063fcf0b597146108e457600080fd5b8063b88d4fde14610752578063bd9a548b14610772578063bf153c18146107a6578063c26b265f146107c6578063c4e37095146107e6578063c87b56dd1461080657600080fd5b8063a0712d6811610113578063a0712d681461068f578063a22cb465146106a2578063a3ad33ce146106c2578063a66636cf146106e2578063b6dfe05d14610712578063b863bd371461073257600080fd5b80638b78c116146105dc5780638da5cb5b146105fc57806391b7f5ed1461061a578063938e3d7b1461063a57806395d89b411461065a5780639a9fc3731461066f57600080fd5b806342842e0e116101fe5780636352211e116101b75780636352211e146105235780636e3cff391461054357806370a0823114610567578063715018a61461058757806376fd21d41461059c5780637bddd65b146105bc57600080fd5b806342842e0e1461045357806342966c6814610473578063439434a8146104935780634cd88b76146104b35780634f4a3afe146104d35780634f6ccce71461050357600080fd5b8063162094c411610250578063162094c41461039e57806318160ddd146103be57806323b872dd146103de5780632f745c59146103fe57806334d8b1ca1461041e57806341f434341461043157600080fd5b806301ffc9a71461029857806306d254da146102cd57806306fdde03146102ef578063081812fc14610311578063095ea7b31461034957806310e9072714610369575b600080fd5b3480156102a457600080fd5b506102b86102b3366004614237565b610904565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102ed6102e8366004614269565b610915565b005b3480156102fb57600080fd5b5061030461098b565b6040516102c491906142d6565b34801561031d57600080fd5b5061033161032c3660046142e9565b610a1d565b6040516001600160a01b0390911681526020016102c4565b34801561035557600080fd5b506102ed610364366004614302565b610a44565b34801561037557600080fd5b50610389610384366004614302565b610a5d565b604080519283526020830191909152016102c4565b3480156103aa57600080fd5b506102ed6103b93660046143eb565b610aa9565b3480156103ca57600080fd5b50610134545b6040519081526020016102c4565b3480156103ea57600080fd5b506102ed6103f9366004614431565b610ad5565b34801561040a57600080fd5b506103d0610419366004614302565b610b00565b6102ed61042c366004614500565b610b96565b34801561043d57600080fd5b506103316daaeb6d7670e522a718067333cd4e81565b34801561045f57600080fd5b506102ed61046e366004614431565b610e74565b34801561047f57600080fd5b506102ed61048e3660046142e9565b610e99565b34801561049f57600080fd5b506103d06104ae366004614269565b610f0d565b3480156104bf57600080fd5b506102ed6104ce366004614534565b610f57565b3480156104df57600080fd5b506104f36104ee366004614269565b611083565b6040516102c4949392919061458d565b34801561050f57600080fd5b506103d061051e3660046142e9565b611327565b34801561052f57600080fd5b5061033161053e3660046142e9565b6113ba565b34801561054f57600080fd5b506101395461010090046001600160a01b0316610331565b34801561057357600080fd5b506103d0610582366004614269565b61141a565b34801561059357600080fd5b506102ed6114a0565b3480156105a857600080fd5b506102ed6105b7366004614650565b6114b4565b3480156105c857600080fd5b506102ed6105d73660046142e9565b61150a565b3480156105e857600080fd5b506102ed6105f73660046142e9565b611529565b34801561060857600080fd5b506033546001600160a01b0316610331565b34801561062657600080fd5b506102ed6106353660046142e9565b611548565b34801561064657600080fd5b506102ed6106553660046146aa565b611567565b34801561066657600080fd5b5061030461157c565b34801561067b57600080fd5b506103d061068a366004614302565b61158b565b6102ed61069d3660046142e9565b61171e565b3480156106ae57600080fd5b506102ed6106bd3660046146de565b611a36565b3480156106ce57600080fd5b506102ed6106dd366004614717565b611a4a565b3480156106ee57600080fd5b506107026106fd3660046142e9565b611aca565b6040516102c4949392919061473e565b34801561071e57600080fd5b506102ed61072d36600461476f565b611bff565b34801561073e57600080fd5b506103d061074d3660046142e9565b611cb4565b34801561075e57600080fd5b506102ed61076d36600461480e565b611d09565b34801561077e57600080fd5b50610131546101335461013254604080519384526020840192909252908201526060016102c4565b3480156107b257600080fd5b506102ed6107c136600461488d565b611d36565b3480156107d257600080fd5b506103046107e13660046142e9565b6122de565b3480156107f257600080fd5b506102ed6108013660046148d2565b6123b4565b34801561081257600080fd5b506103046108213660046142e9565b6123dc565b34801561083257600080fd5b506103d06108413660046142e9565b6123e7565b34801561085257600080fd5b5061030461241f565b34801561086757600080fd5b506102b86108763660046148ef565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b3480156108b057600080fd5b506102ed6108bf366004614269565b6124ae565b3480156108d057600080fd5b506102ed6108df36600461476f565b612527565b3480156108f057600080fd5b506102ed6108ff3660046142e9565b6126c2565b600061090f82612890565b92915050565b61091d6128b5565b6101436001600160a01b0382166109505760405162461bcd60e51b81526004016109479190614957565b60405180910390fd5b506101398054610100600160a81b0319166101006001600160a01b038416021790556101378054906000610983836149f8565b919050555050565b60606097805461099a9061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546109c69061491d565b8015610a135780601f106109e857610100808354040283529160200191610a13565b820191906000526020600020905b8154815290600101906020018083116109f657829003601f168201915b5050505050905090565b6000610a288261290f565b506000908152609b60205260409020546001600160a01b031690565b81610a4e8161296e565b610a588383612a27565b505050565b6000806101436001600160a01b038516610a8a5760405162461bcd60e51b81526004016109479190614957565b50610a95848461158b565b610a9e846123e7565b915091509250929050565b610ab16128b5565b610abb8282612b37565b6101378054906000610acc836149f8565b91905055505050565b826001600160a01b0381163314610aef57610aef3361296e565b610afa848484612bca565b50505050565b6000610b0b8361141a565b8210610b6d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610947565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b60006101325411610be95760405162461bcd60e51b815260206004820152601860248201527f46726565206d696e74206973206e6f7420616c6c6f77656400000000000000006044820152606401610947565b805161013254610bf99190614a11565b341015610c3f5760405162461bcd60e51b8152602060048201526014602482015273596f75206e65656420746f20706179206d6f726560601b6044820152606401610947565b6000815111610c905760405162461bcd60e51b815260206004820181905260248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e2030204e5446736044820152606401610947565b601981511115610cb25760405162461bcd60e51b815260040161094790614a28565b60005b8151811015610e205761013a54825133916001600160a01b031690636352211e90859085908110610ce857610ce8614a71565b60200260200101516040518263ffffffff1660e01b8152600401610d0e91815260200190565b6020604051808303816000875af1158015610d2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d519190614a87565b6001600160a01b03161461014290610d7c5760405162461bcd60e51b81526004016109479190614957565b5061013b6000838381518110610d9457610d94614a71565b6020026020010151815260200190815260200160002054600014610deb5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610947565b610e0e33838381518110610e0157610e01614a71565b6020026020010151612bfb565b80610e18816149f8565b915050610cb5565b50610139546040516001600160a01b0361010090920491909116903480156108fc02916000818181858888f19350505050158015610e62573d6000803e3d6000fd5b506101378054906000610983836149f8565b826001600160a01b0381163314610e8e57610e8e3361296e565b610afa848484612cf5565b33610ea3826113ba565b6001600160a01b03161480610ed1575033610ec66033546001600160a01b031690565b6001600160a01b0316145b61014290610ef25760405162461bcd60e51b81526004016109479190614957565b50610efc81612d10565b6101378054906000610983836149f8565b60006101436001600160a01b038316610f395760405162461bcd60e51b81526004016109479190614957565b50506001600160a01b0316600090815261012f602052604090205490565b600054610100900460ff1615808015610f775750600054600160ff909116105b80610f915750303b158015610f91575060005460ff166001145b610ff45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610947565b6000805460ff191660011790558015611017576000805461ff0019166101001790555b61101f612d19565b6110298383612d48565b611031612d7d565b611039612d7d565b8015610a58576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b606060008080833361109d6033546001600160a01b031690565b6001600160a01b0316146110b1578061124d565b610140805480602002602001604051908101604052809291908181526020016000905b8282101561124857838290600052602060002090600502016040518060a00160405290816000820180546111079061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546111339061491d565b80156111805780601f1061115557610100808354040283529160200191611180565b820191906000526020600020905b81548152906001019060200180831161116357829003601f168201915b50505050508152602001600182015481526020016002820180546111a39061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546111cf9061491d565b801561121c5780601f106111f15761010080835404028352916020019161121c565b820191906000526020600020905b8154815290600101906020018083116111ff57829003601f168201915b5050505050815260200160038201548152602001600482015481525050815260200190600101906110d4565b505050505b336112606033546001600160a01b031690565b6001600160a01b031614611275576000611290565b6001600160a01b038716600090815261012e60205260409020545b336112a36033546001600160a01b031690565b6001600160a01b0316146112b85760006112d3565b6001600160a01b038816600090815261013060205260409020545b336112e66033546001600160a01b031690565b6001600160a01b0316146112fb576000611316565b6001600160a01b038916600090815261012f60205260409020545b9450945094509450505b9193509193565b600061133260fd5490565b82106113955760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610947565b60fd82815481106113a8576113a8614a71565b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b03168061090f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610947565b60006001600160a01b0382166114845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610947565b506001600160a01b03166000908152609a602052604090205490565b6114a86128b5565b6114b26000612da4565b565b6114bc6128b5565b600083815261013c602052604090206114d58382614af2565b50600083815261013d60205260408120805460ff1916831515179055610137805491611500836149f8565b9190505550505050565b6115126128b5565b6101358190556101378054906000610983836149f8565b6115316128b5565b6101338190556101378054906000610983836149f8565b6115506128b5565b6101318190556101378054906000610983836149f8565b61156f6128b5565b610138610e628282614af2565b60606098805461099a9061491d565b60006101436001600160a01b0384166115b75760405162461bcd60e51b81526004016109479190614957565b506101395460009060ff166115cd5760006115d2565b610135545b90506000831180156115e75750600061013654115b80156115f65750610136548311155b1561162357600083815261013b6020526040902054611616576001611619565b60005b60ff169050611717565b6101395460ff168061164d57506001600160a01b038416600090815261012e602052604090205415155b801561165e57506101345461012d54105b15611717576001600160a01b038416600090815261012e6020526040902054156116a9576001600160a01b038416600090815261012e60205260409020546116a69082614bb1565b90505b6001600160a01b0384166000908152610130602052604090205415611717576001600160a01b038416600090815261013060205260409020548110611713576001600160a01b0384166000908152610130602052604090205461170c9082614bc4565b9050611717565b5060005b9392505050565b33610143816117405760405162461bcd60e51b81526004016109479190614957565b506000821161178a5760405162461bcd60e51b8152602060048201526016602482015275596f752063616e6e6f74206d696e742030204e46547360501b6044820152606401610947565b60198211156117ab5760405162461bcd60e51b815260040161094790614a28565b6001600160a01b038116600090815261012f60205260408120546117d0576000611811565b6001600160a01b038216600090815261012f602052604090205483116117f65782611811565b6001600160a01b038216600090815261012f60205260409020545b9050600061181f8285614bc4565b905060003411801561186a5750806101315461183b9190614a11565b6000610133541161184d57600061185c565b826101335461185c9190614a11565b6118669190614bb1565b3410155b6118ad5760405162461bcd60e51b8152602060048201526014602482015273596f75206e65656420746f20706179206d6f726560601b6044820152606401610947565b836118b984600061158b565b10156119125760405162461bcd60e51b815260206004820152602260248201527f596f752063616e6e6f7420627579207468697320616d6f756e74206f66204e46604482015261547360f01b6064820152608401610947565b60005b8481101561198957611928846000612bfb565b6001600160a01b038416600090815261012f602052604090205415611977576001600160a01b038416600090815261012f60205260408120805460019290611971908490614bc4565b90915550505b80611981816149f8565b915050611915565b50610139546040516001600160a01b0361010090920491909116903480156108fc02916000818181858888f193505050501580156119cb573d6000803e3d6000fd5b506001600160a01b038316600090815261012e602052604090205415611a1a576001600160a01b038316600090815261012e602052604081208054869290611a14908490614bc4565b90915550505b6101378054906000611a2b836149f8565b919050555050505050565b81611a408161296e565b610a588383612df6565b611a526128b5565b6101436001600160a01b038316611a7c5760405162461bcd60e51b81526004016109479190614957565b50610136839055604080516020810190915283905261012d83905561013a80546001600160a01b0319166001600160a01b0384161790556101328190556101378054906000611500836149f8565b60006060818033611ada866113ba565b6001600160a01b03161480611b08575033611afd6033546001600160a01b031690565b6001600160a01b0316145b15611be157600085815261013b602090815260408083205461013c835281842061013d84528285205461013e90945291909320548154919260ff908116929116908390611b549061491d565b80601f0160208091040260200160405190810160405280929190818152602001828054611b809061491d565b8015611bcd5780601f10611ba257610100808354040283529160200191611bcd565b820191906000526020600020905b815481529060010190602001808311611bb057829003601f168201915b505050505092509350935093509350611320565b50506040805160208101909152600080825294909350849250829150565b611c076128b5565b60005b8251811015610a585760006001600160a01b0316838281518110611c3057611c30614a71565b60200260200101516001600160a01b031614611c8b578161012e6000858481518110611c5e57611c5e614a71565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b6101378054906000611c9c836149f8565b91905055508080611cac906149f8565b915050611c0a565b600081610137544442611cc761012d5490565b6040805160208101959095528401929092526060830152608082015260a0016040516020818303038152906040528051906020012060001c61090f9190614bd7565b836001600160a01b0381163314611d2357611d233361296e565b611d2f85858585612e01565b5050505050565b6101436001600160a01b038316611d605760405162461bcd60e51b81526004016109479190614957565b508051600314611db25760405162461bcd60e51b815260206004820152601860248201527f596f75206e6565642033204e46547320746f20466f72676500000000000000006044820152606401610947565b6101348054906000611dc3836149f8565b91905055506000610141600083600081518110611de257611de2614a71565b60200260200101518152602001908152602001600020600101549050600161014080549050611e119190614bc4565b8110611e5f5760405162461bcd60e51b815260206004820152601960248201527f596f752063616e277420666f72676520746869732074696572000000000000006044820152606401610947565b60005b8251811015611f8c57816101416000858481518110611e8357611e83614a71565b602002602001015181526020019081526020016000206001015414611ef45760405162461bcd60e51b815260206004820152602160248201527f546f6b656e7320617265206e6f742066726f6d207468652073616d65207469656044820152603960f91b6064820152608401610947565b61013e6000848381518110611f0b57611f0b614a71565b60209081029190910181015182528101919091526040016000205460ff161515600114611f7a5760405162461bcd60e51b815260206004820152601e60248201527f596f75206e65656420746f20756e7061636b61676520746865204e46547300006044820152606401610947565b80611f84816149f8565b915050611e62565b5060005b8251811015611fcd57611fbb838281518110611fae57611fae614a71565b6020026020010151610e99565b80611fc5816149f8565b915050611f90565b506000815b61014054811015612022576101408181548110611ff157611ff1614a71565b9060005260206000209060050201600401548261200e9190614bb1565b91508061201a816149f8565b915050611fd2565b50600061202e82611cb4565b90506000610140805480602002602001604051908101604052809291908181526020016000905b828210156121c957838290600052602060002090600502016040518060a00160405290816000820180546120889061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546120b49061491d565b80156121015780601f106120d657610100808354040283529160200191612101565b820191906000526020600020905b8154815290600101906020018083116120e457829003601f168201915b50505050508152602001600182015481526020016002820180546121249061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546121509061491d565b801561219d5780601f106121725761010080835404028352916020019161219d565b820191906000526020600020905b81548152906001019060200180831161218057829003601f168201915b505050505081526020016003820154815260200160048201548152505081526020019060010190612055565b50505050905060008460016121de9190614bb1565b610140549091506000906121f490600190614bc4565b90505b858111156122685782818151811061221157612211614a71565b602002602001015160800151841161222b57809150612268565b82818151811061223d5761223d614a71565b602002602001015160800151846122549190614bc4565b93508061226081614bf9565b9150506121f7565b5061227587600083612e33565b7f1ffc565ad90ab11684f7e59fbaa5f9e05f2e8923aca11df5777d7f20b80f3d1c6122a061012d5490565b604080519182526001600160a01b038a1660208301520160405180910390a161013780549060006122d0836149f8565b919050555050505050505050565b6060336122f36033546001600160a01b031690565b6001600160a01b031614612316576040518060200160405280600081525061090f565b60008281526101416020526040902080546123309061491d565b80601f016020809104026020016040519081016040528092919081815260200182805461235c9061491d565b80156123a95780601f1061237e576101008083540402835291602001916123a9565b820191906000526020600020905b81548152906001019060200180831161238c57829003601f168201915b505050505092915050565b6123bc6128b5565b610139805460ff19168215151790556101378054906000610983836149f8565b606061090f826133a1565b6101315460009082158015906124005750600061013654115b801561240f5750610136548311155b1561090f57506101325492915050565b610138805461242d9061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546124599061491d565b80156124a65780601f1061247b576101008083540402835291602001916124a6565b820191906000526020600020905b81548152906001019060200180831161248957829003601f168201915b505050505081565b6124b66128b5565b6001600160a01b03811661251b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610947565b61252481612da4565b50565b61252f6128b5565b60005b8251811015610a585760006001600160a01b031683828151811061255857612558614a71565b60200260200101516001600160a01b031614612699578161012f600085848151811061258657612586614a71565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600061012e60008584815181106125cb576125cb614a71565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020541115612654578161012e600085848151811061261257612612614a71565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008282546126499190614bb1565b909155506126999050565b8161012e600085848151811061266c5761266c614a71565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b61013780549060006126aa836149f8565b919050555080806126ba906149f8565b915050612532565b336126cc826113ba565b6001600160a01b031614610142906126f75760405162461bcd60e51b81526004016109479190614957565b50600081815261013d602052604090205460ff16151560011461275c5760405162461bcd60e51b815260206004820152601c60248201527f556e7061636b616765206973206e6f742079657420616c6c6f776564000000006044820152606401610947565b600081815261013e602052604090205460ff1615156001036127b55760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481d5b9c1858dad859d95960721b6044820152606401610947565b600081815261013c6020526040902080546128589183916127d59061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546128019061491d565b801561284e5780601f106128235761010080835404028352916020019161284e565b820191906000526020600020905b81548152906001019060200180831161283157829003601f168201915b5050505050612b37565b600081815261013e60205260408120805460ff19166001179055610137805491610983836149f8565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b148061090f575061090f826134b1565b6033546001600160a01b031633146114b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610947565b6000818152609960205260409020546001600160a01b03166125245760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610947565b6daaeb6d7670e522a718067333cd4e3b1561252457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156129db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ff9190614c10565b61252457604051633b79c77360e21b81526001600160a01b0382166004820152602401610947565b6000612a32826113ba565b9050806001600160a01b0316836001600160a01b031603612a9f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610947565b336001600160a01b0382161480612abb5750612abb8133610876565b612b2d5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610947565b610a588383613501565b6000828152609960205260409020546001600160a01b0316612bb25760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610947565b600082815260c960205260409020610a588282614af2565b612bd4338261356f565b612bf05760405162461bcd60e51b815260040161094790614c2d565b610a588383836135ed565b6101436001600160a01b038316612c255760405162461bcd60e51b81526004016109479190614957565b506101395460ff1680612c47575033600090815261012e602052604090205415155b80612c525750600081115b612c9e5760405162461bcd60e51b815260206004820152601d60248201527f596f7520617265206e6f74206f6e2074686520616c6c6f77206c6973740000006044820152606401610947565b6101345461012d541115612ce95760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b6044820152606401610947565b610abb82826000612e33565b610a5883838360405180602001604052806000815250611d09565b6125248161375e565b600054610100900460ff16612d405760405162461bcd60e51b815260040161094790614c7a565b6114b261379e565b600054610100900460ff16612d6f5760405162461bcd60e51b815260040161094790614c7a565b612d7982826137ce565b5050565b600054610100900460ff166114b25760405162461bcd60e51b815260040161094790614c7a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612d7933838361380e565b612e0b338361356f565b612e275760405162461bcd60e51b815260040161094790614c2d565b610afa848484846138dc565b6000811180612e425750600082115b80612e5657506000612e54848461158b565b115b612e945760405162461bcd60e51b815260206004820152600f60248201526e165bdd4818d85b9b9bdd081b5a5b9d608a1b6044820152606401610947565b60016000828103612f035760005b61014054811015612ef2576101408181548110612ec157612ec1614a71565b90600052602060002090600502016003015482612ede9190614bb1565b915080612eea816149f8565b915050612ea2565b5060009150612f0081611cb4565b92505b8180612f0f5750600081115b612f4c5760405162461bcd60e51b815260206004820152600e60248201526d165bdd4818d85b89dd081b5a5b9d60921b6044820152606401610947565b60008261301d5760005b61014054811015613017576101408181548110612f7557612f75614a71565b906000526020600020906005020160030154851015612fd25780915060016101408281548110612fa757612fa7614a71565b90600052602060002090600502016003016000828254612fc79190614bc4565b909155506130179050565b6101408181548110612fe657612fe6614a71565b906000526020600020906005020160030154856130039190614bc4565b94508061300f816149f8565b915050612f56565b50613020565b50825b846000036130ae5761303761012d80546001019055565b61012d549450826130ae576001600160a01b0386166000908152610130602052604090205415613090576001600160a01b038616600090815261013060205260408120805491613086836149f8565b91905055506130ae565b6001600160a01b038616600090815261013060205260409020600190555b6130b8868661390f565b6130ec8561014083815481106130d0576130d0614a71565b906000526020600020906005020160020180546127d59061491d565b6040518060a00160405280610140838154811061310b5761310b614a71565b906000526020600020906005020160000180546131279061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546131539061491d565b80156131a05780601f10613175576101008083540402835291602001916131a0565b820191906000526020600020905b81548152906001019060200180831161318357829003601f168201915b5050505050815260200182815260200161014083815481106131c4576131c4614a71565b906000526020600020906005020160020180546131e09061491d565b80601f016020809104026020016040519081016040528092919081815260200182805461320c9061491d565b80156132595780601f1061322e57610100808354040283529160200191613259565b820191906000526020600020905b81548152906001019060200180831161323c57829003601f168201915b50505050508152602001610140838154811061327757613277614a71565b90600052602060002090600502016003015460016132959190614bb1565b815260200161014083815481106132ae576132ae614a71565b600091825260208083206004600590930201919091015490925287815261014190915260409020815181906132e39082614af2565b5060208201516001820155604082015160028201906133029082614af2565b5060608201516003820155608090910151600490910155613324600019611cb4565b600086815261013b60205260409081902091909155517fb9203d657e9c0ec8274c818292ab0f58b04e1970050716891770eb1bab5d655e9061337b90879089909182526001600160a01b0316602082015260400190565b60405180910390a16101378054906000613394836149f8565b9190505550505050505050565b60606133ac8261290f565b600082815260c96020526040812080546133c59061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546133f19061491d565b801561343e5780601f106134135761010080835404028352916020019161343e565b820191906000526020600020905b81548152906001019060200180831161342157829003601f168201915b50505050509050600061345c60408051602081019091526000815290565b9050805160000361346e575092915050565b8151156134a0578082604051602001613488929190614cc5565b60405160208183030381529060405292505050919050565b6134a984613929565b949350505050565b60006001600160e01b031982166380ac58cd60e01b14806134e257506001600160e01b03198216635b5e139f60e01b145b8061090f57506301ffc9a760e01b6001600160e01b031983161461090f565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613536826113ba565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061357b836113ba565b9050806001600160a01b0316846001600160a01b031614806135c257506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b806134a95750836001600160a01b03166135db84610a1d565b6001600160a01b031614949350505050565b826001600160a01b0316613600826113ba565b6001600160a01b0316146136265760405162461bcd60e51b815260040161094790614cf4565b6001600160a01b0382166136885760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610947565b613695838383600161399c565b826001600160a01b03166136a8826113ba565b6001600160a01b0316146136ce5760405162461bcd60e51b815260040161094790614cf4565b6000818152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652609a8552838620805460001901905590871680865283862080546001019055868652609990945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613767816139a8565b600081815260c96020526040902080546137809061491d565b15905061252457600081815260c960205260408120612524916141d3565b600054610100900460ff166137c55760405162461bcd60e51b815260040161094790614c7a565b6114b233612da4565b600054610100900460ff166137f55760405162461bcd60e51b815260040161094790614c7a565b60976138018382614af2565b506098610a588282614af2565b816001600160a01b0316836001600160a01b03160361386f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610947565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6138e78484846135ed565b6138f384848484613a4b565b610afa5760405162461bcd60e51b815260040161094790614d39565b612d79828260405180602001604052806000815250613b4c565b60606139348261290f565b600061394b60408051602081019091526000815290565b9050600081511161396b5760405180602001604052806000815250611717565b8061397584613b7f565b604051602001613986929190614cc5565b6040516020818303038152906040529392505050565b610afa84848484613c11565b60006139b3826113ba565b90506139c381600084600161399c565b6139cc826113ba565b6000838152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552609a845282852080546000190190558785526099909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15613b4157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613a8f903390899088908890600401614d8b565b6020604051808303816000875af1925050508015613aca575060408051601f3d908101601f19168201909252613ac791810190614dc8565b60015b613b27573d808015613af8576040519150601f19603f3d011682016040523d82523d6000602084013e613afd565b606091505b508051600003613b1f5760405162461bcd60e51b815260040161094790614d39565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506134a9565b506001949350505050565b613b568383613d4a565b613b636000848484613a4b565b610a585760405162461bcd60e51b815260040161094790614d39565b60606000613b8c83613ee3565b60010190506000816001600160401b03811115613bab57613bab61432e565b6040519080825280601f01601f191660200182016040528015613bd5576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613bdf57509392505050565b613c1d84848484613fbb565b6001811115613c8c5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610947565b816001600160a01b038516613ce857613ce38160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b613d0b565b836001600160a01b0316856001600160a01b031614613d0b57613d0b8582614043565b6001600160a01b038416613d2757613d22816140e0565b611d2f565b846001600160a01b0316846001600160a01b031614611d2f57611d2f848261418f565b6001600160a01b038216613da05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610947565b6000818152609960205260409020546001600160a01b031615613e055760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610947565b613e1360008383600161399c565b6000818152609960205260409020546001600160a01b031615613e785760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610947565b6001600160a01b0382166000818152609a6020908152604080832080546001019055848352609990915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310613f225772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613f4e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613f6c57662386f26fc10000830492506010015b6305f5e1008310613f84576305f5e100830492506008015b6127108310613f9857612710830492506004015b60648310613faa576064830492506002015b600a831061090f5760010192915050565b6001811115610afa576001600160a01b03841615614001576001600160a01b0384166000908152609a602052604081208054839290613ffb908490614bc4565b90915550505b6001600160a01b03831615610afa576001600160a01b0383166000908152609a602052604081208054839290614038908490614bb1565b909155505050505050565b600060016140508461141a565b61405a9190614bc4565b600083815260fc60205260409020549091508082146140ad576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906140f290600190614bc4565b600083815260fe602052604081205460fd805493945090928490811061411a5761411a614a71565b906000526020600020015490508060fd838154811061413b5761413b614a71565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061417357614173614de5565b6001900381819060005260206000200160009055905550505050565b600061419a8361141a565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b5080546141df9061491d565b6000825580601f106141ef575050565b601f01602090049060005260206000209081019061252491905b8082111561421d5760008155600101614209565b5090565b6001600160e01b03198116811461252457600080fd5b60006020828403121561424957600080fd5b813561171781614221565b6001600160a01b038116811461252457600080fd5b60006020828403121561427b57600080fd5b813561171781614254565b60005b838110156142a1578181015183820152602001614289565b50506000910152565b600081518084526142c2816020860160208601614286565b601f01601f19169290920160200192915050565b60208152600061171760208301846142aa565b6000602082840312156142fb57600080fd5b5035919050565b6000806040838503121561431557600080fd5b823561432081614254565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561436c5761436c61432e565b604052919050565b60006001600160401b0383111561438d5761438d61432e565b6143a0601f8401601f1916602001614344565b90508281528383830111156143b457600080fd5b828260208301376000602084830101529392505050565b600082601f8301126143dc57600080fd5b61171783833560208501614374565b600080604083850312156143fe57600080fd5b8235915060208301356001600160401b0381111561441b57600080fd5b614427858286016143cb565b9150509250929050565b60008060006060848603121561444657600080fd5b833561445181614254565b9250602084013561446181614254565b929592945050506040919091013590565b60006001600160401b0382111561448b5761448b61432e565b5060051b60200190565b600082601f8301126144a657600080fd5b813560206144bb6144b683614472565b614344565b82815260059290921b840181019181810190868411156144da57600080fd5b8286015b848110156144f557803583529183019183016144de565b509695505050505050565b60006020828403121561451257600080fd5b81356001600160401b0381111561452857600080fd5b6134a984828501614495565b6000806040838503121561454757600080fd5b82356001600160401b038082111561455e57600080fd5b61456a868387016143cb565b9350602085013591508082111561458057600080fd5b50614427858286016143cb565b6000608080830181845280885180835260a092508286019150828160051b8701016020808c0160005b8481101561462457898403609f19018652815180518886526145da898701826142aa565b90508482015185870152604080830151878303828901526145fb83826142aa565b606085810151908a0152938c0151978c01979097525050958301959350908201906001016145b6565b50508701999099525050505060408201939093526060015250919050565b801515811461252457600080fd5b60008060006060848603121561466557600080fd5b8335925060208401356001600160401b0381111561468257600080fd5b61468e868287016143cb565b925050604084013561469f81614642565b809150509250925092565b6000602082840312156146bc57600080fd5b81356001600160401b038111156146d257600080fd5b6134a9848285016143cb565b600080604083850312156146f157600080fd5b82356146fc81614254565b9150602083013561470c81614642565b809150509250929050565b60008060006060848603121561472c57600080fd5b83359250602084013561446181614254565b84815260806020820152600061475760808301866142aa565b93151560408301525090151560609091015292915050565b6000806040838503121561478257600080fd5b82356001600160401b0381111561479857600080fd5b8301601f810185136147a957600080fd5b803560206147b96144b683614472565b82815260059290921b830181019181810190888411156147d857600080fd5b938201935b838510156147ff5784356147f081614254565b825293820193908201906147dd565b98969091013596505050505050565b6000806000806080858703121561482457600080fd5b843561482f81614254565b9350602085013561483f81614254565b92506040850135915060608501356001600160401b0381111561486157600080fd5b8501601f8101871361487257600080fd5b61488187823560208401614374565b91505092959194509250565b600080604083850312156148a057600080fd5b82356148ab81614254565b915060208301356001600160401b038111156148c657600080fd5b61442785828601614495565b6000602082840312156148e457600080fd5b813561171781614642565b6000806040838503121561490257600080fd5b823561490d81614254565b9150602083013561470c81614254565b600181811c9082168061493157607f821691505b60208210810361495157634e487b7160e01b600052602260045260246000fd5b50919050565b600060208083526000845461496b8161491d565b8084870152604060018084166000811461498c57600181146149a6576149d4565b60ff1985168984015283151560051b8901830195506149d4565b896000528660002060005b858110156149cc5781548b82018601529083019088016149b1565b8a0184019650505b509398975050505050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201614a0a57614a0a6149e2565b5060010190565b808202811582820484141761090f5761090f6149e2565b60208082526029908201527f596f752063616e6e6f74206d696e74206d6f7265207468616e203235204e544660408201526873206174206f6e636560b81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215614a9957600080fd5b815161171781614254565b601f821115610a5857600081815260208120601f850160051c81016020861015614acb5750805b601f850160051c820191505b81811015614aea57828155600101614ad7565b505050505050565b81516001600160401b03811115614b0b57614b0b61432e565b614b1f81614b19845461491d565b84614aa4565b602080601f831160018114614b545760008415614b3c5750858301515b600019600386901b1c1916600185901b178555614aea565b600085815260208120601f198616915b82811015614b8357888601518255948401946001909101908401614b64565b5085821015614ba15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561090f5761090f6149e2565b8181038181111561090f5761090f6149e2565b600082614bf457634e487b7160e01b600052601260045260246000fd5b500690565b600081614c0857614c086149e2565b506000190190565b600060208284031215614c2257600080fd5b815161171781614642565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008351614cd7818460208801614286565b835190830190614ceb818360208801614286565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614dbe908301846142aa565b9695505050505050565b600060208284031215614dda57600080fd5b815161171781614221565b634e487b7160e01b600052603160045260246000fdfea264697066735822122084aefbcb4ed32a3549ed226349104ae25980f0e5aa23e58d56744db466aba5ba64736f6c63430008110033496e697469616c697a61626c653a20636f6e7472616374206973206e6f742069596f7520617265206e6f7420746865206f776e6572206f66207468697320746f6b656e000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000001e610000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001c536965676520576f726c6473205a65726f20436f6d696320426f6f6b0000000000000000000000000000000000000000000000000000000000000000000000066c772d7377300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001456000000000000000000000000000000000000000000000000000000000000145600000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000006c700000000000000000000000000000000000000000000000000000000000006c700000000000000000000000000000000000000000000000000000000000000013200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000242000000000000000000000000000000000000000000000000000000000000024200000000000000000000000000000000000000000000000000000000000000013300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c100000000000000000000000000000000000000000000000000000000000000c100000000000000000000000000000000000000000000000000000000000000013400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041000000000000000000000000000000000000000000000000000000000000004100000000000000000000000000000000000000000000000000000000000000013500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000013600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Deployed Bytecode
0x6080604052600436106102935760003560e01c80638b78c1161161015a578063b88d4fde116100c1578063e75722301161007a578063e757223014610826578063e8a3d48514610846578063e985e9c51461085b578063f2fde38b146108a4578063f9a08899146108c4578063fcf0b597146108e457600080fd5b8063b88d4fde14610752578063bd9a548b14610772578063bf153c18146107a6578063c26b265f146107c6578063c4e37095146107e6578063c87b56dd1461080657600080fd5b8063a0712d6811610113578063a0712d681461068f578063a22cb465146106a2578063a3ad33ce146106c2578063a66636cf146106e2578063b6dfe05d14610712578063b863bd371461073257600080fd5b80638b78c116146105dc5780638da5cb5b146105fc57806391b7f5ed1461061a578063938e3d7b1461063a57806395d89b411461065a5780639a9fc3731461066f57600080fd5b806342842e0e116101fe5780636352211e116101b75780636352211e146105235780636e3cff391461054357806370a0823114610567578063715018a61461058757806376fd21d41461059c5780637bddd65b146105bc57600080fd5b806342842e0e1461045357806342966c6814610473578063439434a8146104935780634cd88b76146104b35780634f4a3afe146104d35780634f6ccce71461050357600080fd5b8063162094c411610250578063162094c41461039e57806318160ddd146103be57806323b872dd146103de5780632f745c59146103fe57806334d8b1ca1461041e57806341f434341461043157600080fd5b806301ffc9a71461029857806306d254da146102cd57806306fdde03146102ef578063081812fc14610311578063095ea7b31461034957806310e9072714610369575b600080fd5b3480156102a457600080fd5b506102b86102b3366004614237565b610904565b60405190151581526020015b60405180910390f35b3480156102d957600080fd5b506102ed6102e8366004614269565b610915565b005b3480156102fb57600080fd5b5061030461098b565b6040516102c491906142d6565b34801561031d57600080fd5b5061033161032c3660046142e9565b610a1d565b6040516001600160a01b0390911681526020016102c4565b34801561035557600080fd5b506102ed610364366004614302565b610a44565b34801561037557600080fd5b50610389610384366004614302565b610a5d565b604080519283526020830191909152016102c4565b3480156103aa57600080fd5b506102ed6103b93660046143eb565b610aa9565b3480156103ca57600080fd5b50610134545b6040519081526020016102c4565b3480156103ea57600080fd5b506102ed6103f9366004614431565b610ad5565b34801561040a57600080fd5b506103d0610419366004614302565b610b00565b6102ed61042c366004614500565b610b96565b34801561043d57600080fd5b506103316daaeb6d7670e522a718067333cd4e81565b34801561045f57600080fd5b506102ed61046e366004614431565b610e74565b34801561047f57600080fd5b506102ed61048e3660046142e9565b610e99565b34801561049f57600080fd5b506103d06104ae366004614269565b610f0d565b3480156104bf57600080fd5b506102ed6104ce366004614534565b610f57565b3480156104df57600080fd5b506104f36104ee366004614269565b611083565b6040516102c4949392919061458d565b34801561050f57600080fd5b506103d061051e3660046142e9565b611327565b34801561052f57600080fd5b5061033161053e3660046142e9565b6113ba565b34801561054f57600080fd5b506101395461010090046001600160a01b0316610331565b34801561057357600080fd5b506103d0610582366004614269565b61141a565b34801561059357600080fd5b506102ed6114a0565b3480156105a857600080fd5b506102ed6105b7366004614650565b6114b4565b3480156105c857600080fd5b506102ed6105d73660046142e9565b61150a565b3480156105e857600080fd5b506102ed6105f73660046142e9565b611529565b34801561060857600080fd5b506033546001600160a01b0316610331565b34801561062657600080fd5b506102ed6106353660046142e9565b611548565b34801561064657600080fd5b506102ed6106553660046146aa565b611567565b34801561066657600080fd5b5061030461157c565b34801561067b57600080fd5b506103d061068a366004614302565b61158b565b6102ed61069d3660046142e9565b61171e565b3480156106ae57600080fd5b506102ed6106bd3660046146de565b611a36565b3480156106ce57600080fd5b506102ed6106dd366004614717565b611a4a565b3480156106ee57600080fd5b506107026106fd3660046142e9565b611aca565b6040516102c4949392919061473e565b34801561071e57600080fd5b506102ed61072d36600461476f565b611bff565b34801561073e57600080fd5b506103d061074d3660046142e9565b611cb4565b34801561075e57600080fd5b506102ed61076d36600461480e565b611d09565b34801561077e57600080fd5b50610131546101335461013254604080519384526020840192909252908201526060016102c4565b3480156107b257600080fd5b506102ed6107c136600461488d565b611d36565b3480156107d257600080fd5b506103046107e13660046142e9565b6122de565b3480156107f257600080fd5b506102ed6108013660046148d2565b6123b4565b34801561081257600080fd5b506103046108213660046142e9565b6123dc565b34801561083257600080fd5b506103d06108413660046142e9565b6123e7565b34801561085257600080fd5b5061030461241f565b34801561086757600080fd5b506102b86108763660046148ef565b6001600160a01b039182166000908152609c6020908152604080832093909416825291909152205460ff1690565b3480156108b057600080fd5b506102ed6108bf366004614269565b6124ae565b3480156108d057600080fd5b506102ed6108df36600461476f565b612527565b3480156108f057600080fd5b506102ed6108ff3660046142e9565b6126c2565b600061090f82612890565b92915050565b61091d6128b5565b6101436001600160a01b0382166109505760405162461bcd60e51b81526004016109479190614957565b60405180910390fd5b506101398054610100600160a81b0319166101006001600160a01b038416021790556101378054906000610983836149f8565b919050555050565b60606097805461099a9061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546109c69061491d565b8015610a135780601f106109e857610100808354040283529160200191610a13565b820191906000526020600020905b8154815290600101906020018083116109f657829003601f168201915b5050505050905090565b6000610a288261290f565b506000908152609b60205260409020546001600160a01b031690565b81610a4e8161296e565b610a588383612a27565b505050565b6000806101436001600160a01b038516610a8a5760405162461bcd60e51b81526004016109479190614957565b50610a95848461158b565b610a9e846123e7565b915091509250929050565b610ab16128b5565b610abb8282612b37565b6101378054906000610acc836149f8565b91905055505050565b826001600160a01b0381163314610aef57610aef3361296e565b610afa848484612bca565b50505050565b6000610b0b8361141a565b8210610b6d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610947565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b60006101325411610be95760405162461bcd60e51b815260206004820152601860248201527f46726565206d696e74206973206e6f7420616c6c6f77656400000000000000006044820152606401610947565b805161013254610bf99190614a11565b341015610c3f5760405162461bcd60e51b8152602060048201526014602482015273596f75206e65656420746f20706179206d6f726560601b6044820152606401610947565b6000815111610c905760405162461bcd60e51b815260206004820181905260248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e2030204e5446736044820152606401610947565b601981511115610cb25760405162461bcd60e51b815260040161094790614a28565b60005b8151811015610e205761013a54825133916001600160a01b031690636352211e90859085908110610ce857610ce8614a71565b60200260200101516040518263ffffffff1660e01b8152600401610d0e91815260200190565b6020604051808303816000875af1158015610d2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d519190614a87565b6001600160a01b03161461014290610d7c5760405162461bcd60e51b81526004016109479190614957565b5061013b6000838381518110610d9457610d94614a71565b6020026020010151815260200190815260200160002054600014610deb5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610947565b610e0e33838381518110610e0157610e01614a71565b6020026020010151612bfb565b80610e18816149f8565b915050610cb5565b50610139546040516001600160a01b0361010090920491909116903480156108fc02916000818181858888f19350505050158015610e62573d6000803e3d6000fd5b506101378054906000610983836149f8565b826001600160a01b0381163314610e8e57610e8e3361296e565b610afa848484612cf5565b33610ea3826113ba565b6001600160a01b03161480610ed1575033610ec66033546001600160a01b031690565b6001600160a01b0316145b61014290610ef25760405162461bcd60e51b81526004016109479190614957565b50610efc81612d10565b6101378054906000610983836149f8565b60006101436001600160a01b038316610f395760405162461bcd60e51b81526004016109479190614957565b50506001600160a01b0316600090815261012f602052604090205490565b600054610100900460ff1615808015610f775750600054600160ff909116105b80610f915750303b158015610f91575060005460ff166001145b610ff45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610947565b6000805460ff191660011790558015611017576000805461ff0019166101001790555b61101f612d19565b6110298383612d48565b611031612d7d565b611039612d7d565b8015610a58576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b606060008080833361109d6033546001600160a01b031690565b6001600160a01b0316146110b1578061124d565b610140805480602002602001604051908101604052809291908181526020016000905b8282101561124857838290600052602060002090600502016040518060a00160405290816000820180546111079061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546111339061491d565b80156111805780601f1061115557610100808354040283529160200191611180565b820191906000526020600020905b81548152906001019060200180831161116357829003601f168201915b50505050508152602001600182015481526020016002820180546111a39061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546111cf9061491d565b801561121c5780601f106111f15761010080835404028352916020019161121c565b820191906000526020600020905b8154815290600101906020018083116111ff57829003601f168201915b5050505050815260200160038201548152602001600482015481525050815260200190600101906110d4565b505050505b336112606033546001600160a01b031690565b6001600160a01b031614611275576000611290565b6001600160a01b038716600090815261012e60205260409020545b336112a36033546001600160a01b031690565b6001600160a01b0316146112b85760006112d3565b6001600160a01b038816600090815261013060205260409020545b336112e66033546001600160a01b031690565b6001600160a01b0316146112fb576000611316565b6001600160a01b038916600090815261012f60205260409020545b9450945094509450505b9193509193565b600061133260fd5490565b82106113955760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610947565b60fd82815481106113a8576113a8614a71565b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b03168061090f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610947565b60006001600160a01b0382166114845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610947565b506001600160a01b03166000908152609a602052604090205490565b6114a86128b5565b6114b26000612da4565b565b6114bc6128b5565b600083815261013c602052604090206114d58382614af2565b50600083815261013d60205260408120805460ff1916831515179055610137805491611500836149f8565b9190505550505050565b6115126128b5565b6101358190556101378054906000610983836149f8565b6115316128b5565b6101338190556101378054906000610983836149f8565b6115506128b5565b6101318190556101378054906000610983836149f8565b61156f6128b5565b610138610e628282614af2565b60606098805461099a9061491d565b60006101436001600160a01b0384166115b75760405162461bcd60e51b81526004016109479190614957565b506101395460009060ff166115cd5760006115d2565b610135545b90506000831180156115e75750600061013654115b80156115f65750610136548311155b1561162357600083815261013b6020526040902054611616576001611619565b60005b60ff169050611717565b6101395460ff168061164d57506001600160a01b038416600090815261012e602052604090205415155b801561165e57506101345461012d54105b15611717576001600160a01b038416600090815261012e6020526040902054156116a9576001600160a01b038416600090815261012e60205260409020546116a69082614bb1565b90505b6001600160a01b0384166000908152610130602052604090205415611717576001600160a01b038416600090815261013060205260409020548110611713576001600160a01b0384166000908152610130602052604090205461170c9082614bc4565b9050611717565b5060005b9392505050565b33610143816117405760405162461bcd60e51b81526004016109479190614957565b506000821161178a5760405162461bcd60e51b8152602060048201526016602482015275596f752063616e6e6f74206d696e742030204e46547360501b6044820152606401610947565b60198211156117ab5760405162461bcd60e51b815260040161094790614a28565b6001600160a01b038116600090815261012f60205260408120546117d0576000611811565b6001600160a01b038216600090815261012f602052604090205483116117f65782611811565b6001600160a01b038216600090815261012f60205260409020545b9050600061181f8285614bc4565b905060003411801561186a5750806101315461183b9190614a11565b6000610133541161184d57600061185c565b826101335461185c9190614a11565b6118669190614bb1565b3410155b6118ad5760405162461bcd60e51b8152602060048201526014602482015273596f75206e65656420746f20706179206d6f726560601b6044820152606401610947565b836118b984600061158b565b10156119125760405162461bcd60e51b815260206004820152602260248201527f596f752063616e6e6f7420627579207468697320616d6f756e74206f66204e46604482015261547360f01b6064820152608401610947565b60005b8481101561198957611928846000612bfb565b6001600160a01b038416600090815261012f602052604090205415611977576001600160a01b038416600090815261012f60205260408120805460019290611971908490614bc4565b90915550505b80611981816149f8565b915050611915565b50610139546040516001600160a01b0361010090920491909116903480156108fc02916000818181858888f193505050501580156119cb573d6000803e3d6000fd5b506001600160a01b038316600090815261012e602052604090205415611a1a576001600160a01b038316600090815261012e602052604081208054869290611a14908490614bc4565b90915550505b6101378054906000611a2b836149f8565b919050555050505050565b81611a408161296e565b610a588383612df6565b611a526128b5565b6101436001600160a01b038316611a7c5760405162461bcd60e51b81526004016109479190614957565b50610136839055604080516020810190915283905261012d83905561013a80546001600160a01b0319166001600160a01b0384161790556101328190556101378054906000611500836149f8565b60006060818033611ada866113ba565b6001600160a01b03161480611b08575033611afd6033546001600160a01b031690565b6001600160a01b0316145b15611be157600085815261013b602090815260408083205461013c835281842061013d84528285205461013e90945291909320548154919260ff908116929116908390611b549061491d565b80601f0160208091040260200160405190810160405280929190818152602001828054611b809061491d565b8015611bcd5780601f10611ba257610100808354040283529160200191611bcd565b820191906000526020600020905b815481529060010190602001808311611bb057829003601f168201915b505050505092509350935093509350611320565b50506040805160208101909152600080825294909350849250829150565b611c076128b5565b60005b8251811015610a585760006001600160a01b0316838281518110611c3057611c30614a71565b60200260200101516001600160a01b031614611c8b578161012e6000858481518110611c5e57611c5e614a71565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b6101378054906000611c9c836149f8565b91905055508080611cac906149f8565b915050611c0a565b600081610137544442611cc761012d5490565b6040805160208101959095528401929092526060830152608082015260a0016040516020818303038152906040528051906020012060001c61090f9190614bd7565b836001600160a01b0381163314611d2357611d233361296e565b611d2f85858585612e01565b5050505050565b6101436001600160a01b038316611d605760405162461bcd60e51b81526004016109479190614957565b508051600314611db25760405162461bcd60e51b815260206004820152601860248201527f596f75206e6565642033204e46547320746f20466f72676500000000000000006044820152606401610947565b6101348054906000611dc3836149f8565b91905055506000610141600083600081518110611de257611de2614a71565b60200260200101518152602001908152602001600020600101549050600161014080549050611e119190614bc4565b8110611e5f5760405162461bcd60e51b815260206004820152601960248201527f596f752063616e277420666f72676520746869732074696572000000000000006044820152606401610947565b60005b8251811015611f8c57816101416000858481518110611e8357611e83614a71565b602002602001015181526020019081526020016000206001015414611ef45760405162461bcd60e51b815260206004820152602160248201527f546f6b656e7320617265206e6f742066726f6d207468652073616d65207469656044820152603960f91b6064820152608401610947565b61013e6000848381518110611f0b57611f0b614a71565b60209081029190910181015182528101919091526040016000205460ff161515600114611f7a5760405162461bcd60e51b815260206004820152601e60248201527f596f75206e65656420746f20756e7061636b61676520746865204e46547300006044820152606401610947565b80611f84816149f8565b915050611e62565b5060005b8251811015611fcd57611fbb838281518110611fae57611fae614a71565b6020026020010151610e99565b80611fc5816149f8565b915050611f90565b506000815b61014054811015612022576101408181548110611ff157611ff1614a71565b9060005260206000209060050201600401548261200e9190614bb1565b91508061201a816149f8565b915050611fd2565b50600061202e82611cb4565b90506000610140805480602002602001604051908101604052809291908181526020016000905b828210156121c957838290600052602060002090600502016040518060a00160405290816000820180546120889061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546120b49061491d565b80156121015780601f106120d657610100808354040283529160200191612101565b820191906000526020600020905b8154815290600101906020018083116120e457829003601f168201915b50505050508152602001600182015481526020016002820180546121249061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546121509061491d565b801561219d5780601f106121725761010080835404028352916020019161219d565b820191906000526020600020905b81548152906001019060200180831161218057829003601f168201915b505050505081526020016003820154815260200160048201548152505081526020019060010190612055565b50505050905060008460016121de9190614bb1565b610140549091506000906121f490600190614bc4565b90505b858111156122685782818151811061221157612211614a71565b602002602001015160800151841161222b57809150612268565b82818151811061223d5761223d614a71565b602002602001015160800151846122549190614bc4565b93508061226081614bf9565b9150506121f7565b5061227587600083612e33565b7f1ffc565ad90ab11684f7e59fbaa5f9e05f2e8923aca11df5777d7f20b80f3d1c6122a061012d5490565b604080519182526001600160a01b038a1660208301520160405180910390a161013780549060006122d0836149f8565b919050555050505050505050565b6060336122f36033546001600160a01b031690565b6001600160a01b031614612316576040518060200160405280600081525061090f565b60008281526101416020526040902080546123309061491d565b80601f016020809104026020016040519081016040528092919081815260200182805461235c9061491d565b80156123a95780601f1061237e576101008083540402835291602001916123a9565b820191906000526020600020905b81548152906001019060200180831161238c57829003601f168201915b505050505092915050565b6123bc6128b5565b610139805460ff19168215151790556101378054906000610983836149f8565b606061090f826133a1565b6101315460009082158015906124005750600061013654115b801561240f5750610136548311155b1561090f57506101325492915050565b610138805461242d9061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546124599061491d565b80156124a65780601f1061247b576101008083540402835291602001916124a6565b820191906000526020600020905b81548152906001019060200180831161248957829003601f168201915b505050505081565b6124b66128b5565b6001600160a01b03811661251b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610947565b61252481612da4565b50565b61252f6128b5565b60005b8251811015610a585760006001600160a01b031683828151811061255857612558614a71565b60200260200101516001600160a01b031614612699578161012f600085848151811061258657612586614a71565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550600061012e60008584815181106125cb576125cb614a71565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020541115612654578161012e600085848151811061261257612612614a71565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008282546126499190614bb1565b909155506126999050565b8161012e600085848151811061266c5761266c614a71565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055505b61013780549060006126aa836149f8565b919050555080806126ba906149f8565b915050612532565b336126cc826113ba565b6001600160a01b031614610142906126f75760405162461bcd60e51b81526004016109479190614957565b50600081815261013d602052604090205460ff16151560011461275c5760405162461bcd60e51b815260206004820152601c60248201527f556e7061636b616765206973206e6f742079657420616c6c6f776564000000006044820152606401610947565b600081815261013e602052604090205460ff1615156001036127b55760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481d5b9c1858dad859d95960721b6044820152606401610947565b600081815261013c6020526040902080546128589183916127d59061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546128019061491d565b801561284e5780601f106128235761010080835404028352916020019161284e565b820191906000526020600020905b81548152906001019060200180831161283157829003601f168201915b5050505050612b37565b600081815261013e60205260408120805460ff19166001179055610137805491610983836149f8565b6001600160a01b03163b151590565b60006001600160e01b0319821663780e9d6360e01b148061090f575061090f826134b1565b6033546001600160a01b031633146114b25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610947565b6000818152609960205260409020546001600160a01b03166125245760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610947565b6daaeb6d7670e522a718067333cd4e3b1561252457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156129db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ff9190614c10565b61252457604051633b79c77360e21b81526001600160a01b0382166004820152602401610947565b6000612a32826113ba565b9050806001600160a01b0316836001600160a01b031603612a9f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610947565b336001600160a01b0382161480612abb5750612abb8133610876565b612b2d5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610947565b610a588383613501565b6000828152609960205260409020546001600160a01b0316612bb25760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610947565b600082815260c960205260409020610a588282614af2565b612bd4338261356f565b612bf05760405162461bcd60e51b815260040161094790614c2d565b610a588383836135ed565b6101436001600160a01b038316612c255760405162461bcd60e51b81526004016109479190614957565b506101395460ff1680612c47575033600090815261012e602052604090205415155b80612c525750600081115b612c9e5760405162461bcd60e51b815260206004820152601d60248201527f596f7520617265206e6f74206f6e2074686520616c6c6f77206c6973740000006044820152606401610947565b6101345461012d541115612ce95760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b6044820152606401610947565b610abb82826000612e33565b610a5883838360405180602001604052806000815250611d09565b6125248161375e565b600054610100900460ff16612d405760405162461bcd60e51b815260040161094790614c7a565b6114b261379e565b600054610100900460ff16612d6f5760405162461bcd60e51b815260040161094790614c7a565b612d7982826137ce565b5050565b600054610100900460ff166114b25760405162461bcd60e51b815260040161094790614c7a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612d7933838361380e565b612e0b338361356f565b612e275760405162461bcd60e51b815260040161094790614c2d565b610afa848484846138dc565b6000811180612e425750600082115b80612e5657506000612e54848461158b565b115b612e945760405162461bcd60e51b815260206004820152600f60248201526e165bdd4818d85b9b9bdd081b5a5b9d608a1b6044820152606401610947565b60016000828103612f035760005b61014054811015612ef2576101408181548110612ec157612ec1614a71565b90600052602060002090600502016003015482612ede9190614bb1565b915080612eea816149f8565b915050612ea2565b5060009150612f0081611cb4565b92505b8180612f0f5750600081115b612f4c5760405162461bcd60e51b815260206004820152600e60248201526d165bdd4818d85b89dd081b5a5b9d60921b6044820152606401610947565b60008261301d5760005b61014054811015613017576101408181548110612f7557612f75614a71565b906000526020600020906005020160030154851015612fd25780915060016101408281548110612fa757612fa7614a71565b90600052602060002090600502016003016000828254612fc79190614bc4565b909155506130179050565b6101408181548110612fe657612fe6614a71565b906000526020600020906005020160030154856130039190614bc4565b94508061300f816149f8565b915050612f56565b50613020565b50825b846000036130ae5761303761012d80546001019055565b61012d549450826130ae576001600160a01b0386166000908152610130602052604090205415613090576001600160a01b038616600090815261013060205260408120805491613086836149f8565b91905055506130ae565b6001600160a01b038616600090815261013060205260409020600190555b6130b8868661390f565b6130ec8561014083815481106130d0576130d0614a71565b906000526020600020906005020160020180546127d59061491d565b6040518060a00160405280610140838154811061310b5761310b614a71565b906000526020600020906005020160000180546131279061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546131539061491d565b80156131a05780601f10613175576101008083540402835291602001916131a0565b820191906000526020600020905b81548152906001019060200180831161318357829003601f168201915b5050505050815260200182815260200161014083815481106131c4576131c4614a71565b906000526020600020906005020160020180546131e09061491d565b80601f016020809104026020016040519081016040528092919081815260200182805461320c9061491d565b80156132595780601f1061322e57610100808354040283529160200191613259565b820191906000526020600020905b81548152906001019060200180831161323c57829003601f168201915b50505050508152602001610140838154811061327757613277614a71565b90600052602060002090600502016003015460016132959190614bb1565b815260200161014083815481106132ae576132ae614a71565b600091825260208083206004600590930201919091015490925287815261014190915260409020815181906132e39082614af2565b5060208201516001820155604082015160028201906133029082614af2565b5060608201516003820155608090910151600490910155613324600019611cb4565b600086815261013b60205260409081902091909155517fb9203d657e9c0ec8274c818292ab0f58b04e1970050716891770eb1bab5d655e9061337b90879089909182526001600160a01b0316602082015260400190565b60405180910390a16101378054906000613394836149f8565b9190505550505050505050565b60606133ac8261290f565b600082815260c96020526040812080546133c59061491d565b80601f01602080910402602001604051908101604052809291908181526020018280546133f19061491d565b801561343e5780601f106134135761010080835404028352916020019161343e565b820191906000526020600020905b81548152906001019060200180831161342157829003601f168201915b50505050509050600061345c60408051602081019091526000815290565b9050805160000361346e575092915050565b8151156134a0578082604051602001613488929190614cc5565b60405160208183030381529060405292505050919050565b6134a984613929565b949350505050565b60006001600160e01b031982166380ac58cd60e01b14806134e257506001600160e01b03198216635b5e139f60e01b145b8061090f57506301ffc9a760e01b6001600160e01b031983161461090f565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613536826113ba565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061357b836113ba565b9050806001600160a01b0316846001600160a01b031614806135c257506001600160a01b038082166000908152609c602090815260408083209388168352929052205460ff165b806134a95750836001600160a01b03166135db84610a1d565b6001600160a01b031614949350505050565b826001600160a01b0316613600826113ba565b6001600160a01b0316146136265760405162461bcd60e51b815260040161094790614cf4565b6001600160a01b0382166136885760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610947565b613695838383600161399c565b826001600160a01b03166136a8826113ba565b6001600160a01b0316146136ce5760405162461bcd60e51b815260040161094790614cf4565b6000818152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b03878116808652609a8552838620805460001901905590871680865283862080546001019055868652609990945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b613767816139a8565b600081815260c96020526040902080546137809061491d565b15905061252457600081815260c960205260408120612524916141d3565b600054610100900460ff166137c55760405162461bcd60e51b815260040161094790614c7a565b6114b233612da4565b600054610100900460ff166137f55760405162461bcd60e51b815260040161094790614c7a565b60976138018382614af2565b506098610a588282614af2565b816001600160a01b0316836001600160a01b03160361386f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610947565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6138e78484846135ed565b6138f384848484613a4b565b610afa5760405162461bcd60e51b815260040161094790614d39565b612d79828260405180602001604052806000815250613b4c565b60606139348261290f565b600061394b60408051602081019091526000815290565b9050600081511161396b5760405180602001604052806000815250611717565b8061397584613b7f565b604051602001613986929190614cc5565b6040516020818303038152906040529392505050565b610afa84848484613c11565b60006139b3826113ba565b90506139c381600084600161399c565b6139cc826113ba565b6000838152609b6020908152604080832080546001600160a01b03199081169091556001600160a01b038516808552609a845282852080546000190190558785526099909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15613b4157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613a8f903390899088908890600401614d8b565b6020604051808303816000875af1925050508015613aca575060408051601f3d908101601f19168201909252613ac791810190614dc8565b60015b613b27573d808015613af8576040519150601f19603f3d011682016040523d82523d6000602084013e613afd565b606091505b508051600003613b1f5760405162461bcd60e51b815260040161094790614d39565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506134a9565b506001949350505050565b613b568383613d4a565b613b636000848484613a4b565b610a585760405162461bcd60e51b815260040161094790614d39565b60606000613b8c83613ee3565b60010190506000816001600160401b03811115613bab57613bab61432e565b6040519080825280601f01601f191660200182016040528015613bd5576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613bdf57509392505050565b613c1d84848484613fbb565b6001811115613c8c5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610947565b816001600160a01b038516613ce857613ce38160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b613d0b565b836001600160a01b0316856001600160a01b031614613d0b57613d0b8582614043565b6001600160a01b038416613d2757613d22816140e0565b611d2f565b846001600160a01b0316846001600160a01b031614611d2f57611d2f848261418f565b6001600160a01b038216613da05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610947565b6000818152609960205260409020546001600160a01b031615613e055760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610947565b613e1360008383600161399c565b6000818152609960205260409020546001600160a01b031615613e785760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610947565b6001600160a01b0382166000818152609a6020908152604080832080546001019055848352609990915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310613f225772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613f4e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613f6c57662386f26fc10000830492506010015b6305f5e1008310613f84576305f5e100830492506008015b6127108310613f9857612710830492506004015b60648310613faa576064830492506002015b600a831061090f5760010192915050565b6001811115610afa576001600160a01b03841615614001576001600160a01b0384166000908152609a602052604081208054839290613ffb908490614bc4565b90915550505b6001600160a01b03831615610afa576001600160a01b0383166000908152609a602052604081208054839290614038908490614bb1565b909155505050505050565b600060016140508461141a565b61405a9190614bc4565b600083815260fc60205260409020549091508082146140ad576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906140f290600190614bc4565b600083815260fe602052604081205460fd805493945090928490811061411a5761411a614a71565b906000526020600020015490508060fd838154811061413b5761413b614a71565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061417357614173614de5565b6001900381819060005260206000200160009055905550505050565b600061419a8361141a565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b5080546141df9061491d565b6000825580601f106141ef575050565b601f01602090049060005260206000209081019061252491905b8082111561421d5760008155600101614209565b5090565b6001600160e01b03198116811461252457600080fd5b60006020828403121561424957600080fd5b813561171781614221565b6001600160a01b038116811461252457600080fd5b60006020828403121561427b57600080fd5b813561171781614254565b60005b838110156142a1578181015183820152602001614289565b50506000910152565b600081518084526142c2816020860160208601614286565b601f01601f19169290920160200192915050565b60208152600061171760208301846142aa565b6000602082840312156142fb57600080fd5b5035919050565b6000806040838503121561431557600080fd5b823561432081614254565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561436c5761436c61432e565b604052919050565b60006001600160401b0383111561438d5761438d61432e565b6143a0601f8401601f1916602001614344565b90508281528383830111156143b457600080fd5b828260208301376000602084830101529392505050565b600082601f8301126143dc57600080fd5b61171783833560208501614374565b600080604083850312156143fe57600080fd5b8235915060208301356001600160401b0381111561441b57600080fd5b614427858286016143cb565b9150509250929050565b60008060006060848603121561444657600080fd5b833561445181614254565b9250602084013561446181614254565b929592945050506040919091013590565b60006001600160401b0382111561448b5761448b61432e565b5060051b60200190565b600082601f8301126144a657600080fd5b813560206144bb6144b683614472565b614344565b82815260059290921b840181019181810190868411156144da57600080fd5b8286015b848110156144f557803583529183019183016144de565b509695505050505050565b60006020828403121561451257600080fd5b81356001600160401b0381111561452857600080fd5b6134a984828501614495565b6000806040838503121561454757600080fd5b82356001600160401b038082111561455e57600080fd5b61456a868387016143cb565b9350602085013591508082111561458057600080fd5b50614427858286016143cb565b6000608080830181845280885180835260a092508286019150828160051b8701016020808c0160005b8481101561462457898403609f19018652815180518886526145da898701826142aa565b90508482015185870152604080830151878303828901526145fb83826142aa565b606085810151908a0152938c0151978c01979097525050958301959350908201906001016145b6565b50508701999099525050505060408201939093526060015250919050565b801515811461252457600080fd5b60008060006060848603121561466557600080fd5b8335925060208401356001600160401b0381111561468257600080fd5b61468e868287016143cb565b925050604084013561469f81614642565b809150509250925092565b6000602082840312156146bc57600080fd5b81356001600160401b038111156146d257600080fd5b6134a9848285016143cb565b600080604083850312156146f157600080fd5b82356146fc81614254565b9150602083013561470c81614642565b809150509250929050565b60008060006060848603121561472c57600080fd5b83359250602084013561446181614254565b84815260806020820152600061475760808301866142aa565b93151560408301525090151560609091015292915050565b6000806040838503121561478257600080fd5b82356001600160401b0381111561479857600080fd5b8301601f810185136147a957600080fd5b803560206147b96144b683614472565b82815260059290921b830181019181810190888411156147d857600080fd5b938201935b838510156147ff5784356147f081614254565b825293820193908201906147dd565b98969091013596505050505050565b6000806000806080858703121561482457600080fd5b843561482f81614254565b9350602085013561483f81614254565b92506040850135915060608501356001600160401b0381111561486157600080fd5b8501601f8101871361487257600080fd5b61488187823560208401614374565b91505092959194509250565b600080604083850312156148a057600080fd5b82356148ab81614254565b915060208301356001600160401b038111156148c657600080fd5b61442785828601614495565b6000602082840312156148e457600080fd5b813561171781614642565b6000806040838503121561490257600080fd5b823561490d81614254565b9150602083013561470c81614254565b600181811c9082168061493157607f821691505b60208210810361495157634e487b7160e01b600052602260045260246000fd5b50919050565b600060208083526000845461496b8161491d565b8084870152604060018084166000811461498c57600181146149a6576149d4565b60ff1985168984015283151560051b8901830195506149d4565b896000528660002060005b858110156149cc5781548b82018601529083019088016149b1565b8a0184019650505b509398975050505050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201614a0a57614a0a6149e2565b5060010190565b808202811582820484141761090f5761090f6149e2565b60208082526029908201527f596f752063616e6e6f74206d696e74206d6f7265207468616e203235204e544660408201526873206174206f6e636560b81b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215614a9957600080fd5b815161171781614254565b601f821115610a5857600081815260208120601f850160051c81016020861015614acb5750805b601f850160051c820191505b81811015614aea57828155600101614ad7565b505050505050565b81516001600160401b03811115614b0b57614b0b61432e565b614b1f81614b19845461491d565b84614aa4565b602080601f831160018114614b545760008415614b3c5750858301515b600019600386901b1c1916600185901b178555614aea565b600085815260208120601f198616915b82811015614b8357888601518255948401946001909101908401614b64565b5085821015614ba15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561090f5761090f6149e2565b8181038181111561090f5761090f6149e2565b600082614bf457634e487b7160e01b600052601260045260246000fd5b500690565b600081614c0857614c086149e2565b506000190190565b600060208284031215614c2257600080fd5b815161171781614642565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60008351614cd7818460208801614286565b835190830190614ceb818360208801614286565b01949350505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614dbe908301846142aa565b9695505050505050565b600060208284031215614dda57600080fd5b815161171781614221565b634e487b7160e01b600052603160045260246000fdfea264697066735822122084aefbcb4ed32a3549ed226349104ae25980f0e5aa23e58d56744db466aba5ba64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000001e610000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001c536965676520576f726c6473205a65726f20436f6d696320426f6f6b0000000000000000000000000000000000000000000000000000000000000000000000066c772d7377300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000001456000000000000000000000000000000000000000000000000000000000000145600000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000006c700000000000000000000000000000000000000000000000000000000000006c700000000000000000000000000000000000000000000000000000000000000013200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000242000000000000000000000000000000000000000000000000000000000000024200000000000000000000000000000000000000000000000000000000000000013300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000c100000000000000000000000000000000000000000000000000000000000000c100000000000000000000000000000000000000000000000000000000000000013400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000041000000000000000000000000000000000000000000000000000000000000004100000000000000000000000000000000000000000000000000000000000000013500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b00000000000000000000000000000000000000000000000000000000000000013600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003468747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e696f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Siege Worlds Zero Comic Book
Arg [1] : _symbol (string): lw-sw0
Arg [2] : _maxSupply (uint256): 7777
Arg [3] : _tokenTiers (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
75 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000001e61
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [4] : 000000000000000000000000000000000000000000000000000000000000001c
Arg [5] : 536965676520576f726c6473205a65726f20436f6d696320426f6f6b00000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 6c772d7377300000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [9] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000340
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000480
Arg [13] : 00000000000000000000000000000000000000000000000000000000000005c0
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000700
Arg [15] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [17] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [18] : 0000000000000000000000000000000000000000000000000000000000001456
Arg [19] : 0000000000000000000000000000000000000000000000000000000000001456
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [21] : 3100000000000000000000000000000000000000000000000000000000000000
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [23] : 68747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e69
Arg [24] : 6f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Arg [25] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [27] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [28] : 00000000000000000000000000000000000000000000000000000000000006c7
Arg [29] : 00000000000000000000000000000000000000000000000000000000000006c7
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [31] : 3200000000000000000000000000000000000000000000000000000000000000
Arg [32] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [33] : 68747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e69
Arg [34] : 6f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Arg [35] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [36] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [37] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [38] : 0000000000000000000000000000000000000000000000000000000000000242
Arg [39] : 0000000000000000000000000000000000000000000000000000000000000242
Arg [40] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [41] : 3300000000000000000000000000000000000000000000000000000000000000
Arg [42] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [43] : 68747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e69
Arg [44] : 6f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Arg [45] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [46] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [47] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [48] : 00000000000000000000000000000000000000000000000000000000000000c1
Arg [49] : 00000000000000000000000000000000000000000000000000000000000000c1
Arg [50] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [51] : 3400000000000000000000000000000000000000000000000000000000000000
Arg [52] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [53] : 68747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e69
Arg [54] : 6f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Arg [55] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [56] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [57] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [58] : 0000000000000000000000000000000000000000000000000000000000000041
Arg [59] : 0000000000000000000000000000000000000000000000000000000000000041
Arg [60] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [61] : 3500000000000000000000000000000000000000000000000000000000000000
Arg [62] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [63] : 68747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e69
Arg [64] : 6f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Arg [65] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [66] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [67] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [68] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [69] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [70] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [71] : 3600000000000000000000000000000000000000000000000000000000000000
Arg [72] : 0000000000000000000000000000000000000000000000000000000000000034
Arg [73] : 68747470733a2f2f6e6674646174612e6c696768746e696e67776f726b732e69
Arg [74] : 6f2f64722f756e72657665616c65642e6a736f6e000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.