Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,142 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 21163380 | 39 days ago | IN | 0 ETH | 0.00044187 | ||||
Backupsale | 21158729 | 40 days ago | IN | 0.156 ETH | 0.00334438 | ||||
Backupsale | 21158729 | 40 days ago | IN | 0.156 ETH | 0.00378727 | ||||
Backupsale | 21158723 | 40 days ago | IN | 0.156 ETH | 0.00383635 | ||||
Backupsale | 21158719 | 40 days ago | IN | 0.156 ETH | 0.00382222 | ||||
Backupsale | 21158717 | 40 days ago | IN | 0.156 ETH | 0.00385176 | ||||
Backupsale | 21158716 | 40 days ago | IN | 0.156 ETH | 0.00380051 | ||||
Backupsale | 21158715 | 40 days ago | IN | 0.156 ETH | 0.0039764 | ||||
Backupsale | 21158712 | 40 days ago | IN | 0.156 ETH | 0.00386343 | ||||
Backupsale | 21158711 | 40 days ago | IN | 0.156 ETH | 0.00410731 | ||||
Backupsale | 21158708 | 40 days ago | IN | 0.156 ETH | 0.00405076 | ||||
Backupsale | 21158690 | 40 days ago | IN | 0.156 ETH | 0.00407392 | ||||
Backupsale | 21158689 | 40 days ago | IN | 0.156 ETH | 0.00407363 | ||||
Backupsale | 21158685 | 40 days ago | IN | 0.156 ETH | 0.00406932 | ||||
Backupsale | 21158679 | 40 days ago | IN | 0.156 ETH | 0.0046123 | ||||
Backupsale | 21158679 | 40 days ago | IN | 0.156 ETH | 0.0046123 | ||||
Backupsale | 21158679 | 40 days ago | IN | 0.156 ETH | 0.0046123 | ||||
Backupsale | 21158677 | 40 days ago | IN | 0.156 ETH | 0.00456849 | ||||
Backupsale | 21158676 | 40 days ago | IN | 0.156 ETH | 0.00459541 | ||||
Backupsale | 21158676 | 40 days ago | IN | 0.156 ETH | 0.00465066 | ||||
Backupsale | 21158675 | 40 days ago | IN | 0.156 ETH | 0.00465066 | ||||
Backupsale | 21158674 | 40 days ago | IN | 0.156 ETH | 0.00458251 | ||||
Backupsale | 21158671 | 40 days ago | IN | 0.156 ETH | 0.00440112 | ||||
Backupsale | 21158671 | 40 days ago | IN | 0.156 ETH | 0.00443089 | ||||
Backupsale | 21158669 | 40 days ago | IN | 0.156 ETH | 0.00468571 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21163380 | 39 days ago | 115.284 ETH |
Loading...
Loading
Contract Name:
SpaceNationLaunchpad
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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); } } // File: @openzeppelin/contracts/utils/math/Math.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 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 256, 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 << 3) < value ? 1 : 0); } } } // File: @openzeppelin/contracts/utils/math/SignedMath.sol // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } } // File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } } // File: @openzeppelin/contracts/interfaces/IERC1271.sol // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); } // File: @openzeppelin/contracts/utils/cryptography/SignatureChecker.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow(address signer, bytes32 hash, bytes memory signature) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); return (error == ECDSA.RecoverError.NoError && recovered == signer) || isValidERC1271SignatureNow(signer, hash, signature); } /** * @dev Checks if a signature is valid for a given signer and data hash. The signature is validated * against the signer smart contract using ERC1271. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidERC1271SignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length >= 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } } // File: @openzeppelin/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(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: solmate/src/tokens/ERC20.sol pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } } // File: solmate/src/utils/SafeTransferLib.sol pragma solidity >=0.8.0; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; /// @solidity memory-safe-assembly assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. success := call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data and token has code. if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) { success := iszero(or(iszero(extcodesize(token)), returndatasize())) } } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data and token has code. if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) { success := iszero(or(iszero(extcodesize(token)), returndatasize())) } } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. success := call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data and token has code. if and(iszero(and(eq(mload(0), 1), gt(returndatasize(), 31))), success) { success := iszero(or(iszero(extcodesize(token)), returndatasize())) } } require(success, "APPROVE_FAILED"); } } // File: mint.sol pragma solidity 0.8.19; interface INFTMinter { function mint(uint64, address) external returns (bool); } contract SpaceNationLaunchpad is Ownable, ReentrancyGuard { using ECDSA for bytes32; LPGlobalConfig public lpInfo; LPPayToken[] public payTokens; mapping(uint64 => bool) private lpStageIndex; mapping(uint64 => LPMintInfo) public mintInfo; mapping(uint64 => bool) private ridvalue; mapping(uint64 => uint256) gtdTotalMinted; mapping(uint64 => uint256) totalMintedSupply; mapping(address => mapping(uint64 => uint256)) public addrBackupMinted; mapping(address => mapping(uint64 => uint256)) public addrGtdMinted; error DuplicatedLPIndex(); error ExceedPerAddressLimit(); error ExceedLPMaxSupply(); error ExceedLPStageMaxSupply(); error IncorrectERC20(); error StageNotActive(); enum MintType { Public, GTD, Backup } struct LPMintInfo { uint64[4] timestamp; uint64 gtdSupply; uint64 maxSupply; address nftAddress; } struct LPPayToken { address paymentToken; uint256 whitePrice; uint256 publicPrice; string symbol; } struct LPGlobalConfig { bool enableMultiBackup; uint32 limitationForBackupAddress; uint32 limitationForPubSale; uint32 expireTime; address beneficiary; address signer; } event Sale(uint64 indexed requestId, MintType indexed Type); // 0-Public 1-GTD 2-Backup constructor(uint64 lpIndex, address _nftAddress) { _verifyLPStage(lpIndex); mintInfo[lpIndex] = LPMintInfo({ timestamp: [uint64(1731247200), 1731254400, 1731261600, 1731268800], gtdSupply: 1880, maxSupply: 1980, nftAddress: _nftAddress }); lpInfo = LPGlobalConfig({ expireTime: 300, beneficiary: 0x464868685F5ED7cc8260840a8a0e797F48b0Dbd0, signer: 0xF9f477d9B8E772aE5138d91D7d7B88a05d62E62E, enableMultiBackup: false, limitationForBackupAddress: 1, limitationForPubSale: 1 }); LPPayToken memory _payToken; _payToken = LPPayToken({ paymentToken: address(0), whitePrice: 160000000000000000, publicPrice: 160000000000000000, symbol: "ETH" }); payTokens.push(_payToken); _payToken = LPPayToken({ paymentToken: 0xdAC17F958D2ee523a2206206994597C13D831ec7, whitePrice: 499000000, publicPrice: 499000000, symbol: "USDT_ETH" }); payTokens.push(_payToken); } function _verifyLPStage(uint64 stageIndex) private { if (lpStageIndex[stageIndex]) { revert DuplicatedLPIndex(); } lpStageIndex[stageIndex] = true; } function newLaunchpad(uint64 lpIndex, LPMintInfo memory _mintInfo) external onlyOwner { _verifyLPStage(lpIndex); mintInfo[lpIndex] = _mintInfo; } function renounceOwnership() public view override onlyOwner { revert("Closed_Interface"); } function setMintTime(uint64 lpIndex, uint64[4] calldata ts) external onlyOwner { mintInfo[lpIndex].timestamp = ts; } function setgtdSupply(uint64 lpIndex, uint64 _count) external onlyOwner { mintInfo[lpIndex].gtdSupply = _count; } function setmaxSupply(uint64 lpIndex, uint64 _count) external onlyOwner { mintInfo[lpIndex].maxSupply = _count; } function setNft(uint64 lpIndex, address newNft) external onlyOwner { mintInfo[lpIndex].nftAddress = newNft; } function setPrice( uint64[] memory payTokenIndexs, uint256[] memory wlprices, uint256[] memory pubprices ) external onlyOwner { uint256 len = payTokenIndexs.length; require(wlprices.length == len && pubprices.length == len); uint64 payTokenIndex; uint256 _wlprice; uint256 _pubprice; for (uint256 index = 0; index < len; index++) { payTokenIndex = payTokenIndexs[index]; _wlprice = wlprices[index]; _pubprice = pubprices[index]; payTokens[payTokenIndex].whitePrice = _wlprice; payTokens[payTokenIndex].publicPrice = _pubprice; } } function addPrice( address paymentToken, uint256 whitePrice, uint256 publicPrice, string memory symbol ) external onlyOwner { LPPayToken memory _payToken; _payToken = LPPayToken({ paymentToken: paymentToken, whitePrice: whitePrice, publicPrice: publicPrice, symbol: symbol }); payTokens.push(_payToken); } function setEnableMutiBackup(bool status) external onlyOwner { lpInfo.enableMultiBackup = status; } function setLimitForBackupAddress(uint32 _count) external onlyOwner { lpInfo.limitationForBackupAddress = _count; } function setLimitForPublicAddress(uint32 _count) external onlyOwner { lpInfo.limitationForPubSale = _count; } function setExpire(uint32 _expireTime) external onlyOwner { lpInfo.expireTime = _expireTime; } function setBene(address _bene) external onlyOwner { lpInfo.beneficiary = _bene; } function setCosigner(address _signer) external onlyOwner { lpInfo.signer = _signer; } //num64 [requestId,timestamp,qty,supply] function gtdsale( uint64 _lpIndex, uint32 payTokenIndex, uint64[4] calldata num64, bytes calldata signature ) external payable nonReentrant { MintType mintType = MintType.GTD; _handlesale(_lpIndex, payTokenIndex, mintType, num64, signature); } function backupsale( uint64 _lpIndex, uint32 payTokenIndex, uint64[4] calldata num64, bytes calldata signature ) external payable nonReentrant { MintType mintType = MintType.Backup; _handlesale(_lpIndex, payTokenIndex, mintType, num64, signature); } function publicsale( uint64 _lpIndex, uint32 payTokenIndex, uint64[4] calldata num64, bytes calldata signature ) external payable nonReentrant { MintType mintType = MintType.Public; _handlesale(_lpIndex, payTokenIndex, mintType, num64, signature); } function _handlesale( uint64 _lpIndex, uint32 payTokenIndex, MintType mintType, uint64[4] calldata num64, bytes calldata signature ) private { _validateActive(_lpIndex, mintType, num64[1]); address sender = _msgSender(); (uint64 amount, uint64 maxSupplyForAddress) = (num64[2], num64[3]); if (mintType == MintType.Backup) { if (!lpInfo.enableMultiBackup) { maxSupplyForAddress = lpInfo.limitationForBackupAddress; } } _validateAmount( _lpIndex, mintType, sender, amount, maxSupplyForAddress ); _validateSignature( mintType, payTokenIndex, lpInfo.expireTime, sender, lpInfo.signer, num64, signature ); _handlePayment(mintType, num64[2], payTokenIndex); _handleMint(_lpIndex, mintType, num64[2], sender); emit Sale(num64[0], mintType); } function _validateAmount( uint64 _lpIndex, MintType mintType, address sender, uint256 amount, uint256 mintLimitationPerAddress ) internal view { if (mintType == MintType.Public) { if (amount != lpInfo.limitationForPubSale) { revert ExceedLPStageMaxSupply(); } return; } uint256 mintedAmount; if (mintType == MintType.GTD) { uint256 _gtdTotalMinted = gtdTotalMinted[_lpIndex]; uint256 maxSupplyForGtdStage = mintInfo[_lpIndex].gtdSupply; if (_gtdTotalMinted + amount > maxSupplyForGtdStage) { revert ExceedLPStageMaxSupply(); } mintedAmount = addrGtdMinted[sender][_lpIndex]; } else if (mintType == MintType.Backup) { mintedAmount = addrBackupMinted[sender][_lpIndex]; } //check per address mint limitation if (mintedAmount + amount > mintLimitationPerAddress) { revert ExceedPerAddressLimit(); } uint256 _totalMintedSupply = totalMintedSupply[_lpIndex]; uint256 globalTotalSupply = mintInfo[_lpIndex].maxSupply; //check total maxSupply if (_totalMintedSupply + amount > globalTotalSupply) { revert ExceedLPMaxSupply(); } } function _validateActive( uint64 _lpIndex, MintType mintType, uint64 signTs ) internal view { uint256 blockTs = block.timestamp; uint64[4] memory ts = mintInfo[_lpIndex].timestamp; uint64 startTime = ts[0]; uint64 endTime = ts[1]; if (mintType == MintType.Backup) { startTime = ts[1]; endTime = ts[2]; } else if (mintType == MintType.Public) { startTime = ts[2]; endTime = ts[3]; } if (_cast(blockTs < startTime) | _cast(blockTs > endTime) == 1) { // Revert if the stage is not active. revert StageNotActive(); } if (mintType != MintType.Public) { if (_cast(signTs < startTime) | _cast(signTs > endTime) == 1) { // Revert if the stage is not active. revert StageNotActive(); } } } function _cast(bool b) internal pure returns (uint256 u) { assembly { u := b } } function _handlePayment( MintType mintType, uint64 amount, uint32 payTokenIndex ) internal { LPPayToken memory payToken = payTokens[payTokenIndex]; uint256 price = payToken.whitePrice; if (mintType == MintType.Public) { price = payToken.publicPrice; } address paymentToken = payToken.paymentToken; if (paymentToken == address(0)) { // Revert if the tx's value doesn't match the total cost. if (msg.value != amount * price) { revert("Insufficient value for payment"); } } else { if (msg.value != 0) { revert("No need value in token payment"); } if (!_isContract(paymentToken)) { revert IncorrectERC20(); } SafeTransferLib.safeTransferFrom( ERC20(paymentToken), msg.sender, lpInfo.beneficiary, amount * price ); } } function _isContract(address account) internal view returns (bool) { return (account.code.length > 0); } /** * @dev Implementation of minting. */ function _handleMint( uint64 _lpIndex, MintType mintType, uint64 amount, address to ) private { address nftAddress = mintInfo[_lpIndex].nftAddress; totalMintedSupply[_lpIndex] += amount; if (mintType == MintType.GTD) { gtdTotalMinted[_lpIndex] += amount; addrGtdMinted[to][_lpIndex] += amount; } else if (mintType == MintType.Backup) { addrBackupMinted[to][_lpIndex] += amount; } require(INFTMinter(nftAddress).mint(amount, to), "Fail to mint a NFT"); } function withdraw() external onlyOwner { Address.sendValue(payable(lpInfo.beneficiary), address(this).balance); } function _validateSignature( MintType mintType, uint32 payTokenIndex, uint32 expireTime, address sender, address signer, uint64[4] calldata num64, bytes calldata signature ) internal { if (mintType == MintType.Public) { return; } uint256 blockTs = block.timestamp; if (mintType == MintType.GTD) { require((expireTime + num64[1] >= blockTs), "Signature expired"); } uint64 rid = num64[0]; require((!ridvalue[rid]), "Duplicated signature"); require( matchSigner( signer, getCosignDigest(mintType, payTokenIndex, sender, num64), signature ), "Invalid signature" ); ridvalue[rid] = true; } /** * @dev Returns data hash for the given minter, qty and timestamp. */ function getCosignDigest( MintType mintType, uint32 payTokenIndex, address sender, uint64[4] memory num64 ) private view returns (bytes32) { return keccak256( abi.encodePacked( sender, uint32(mintType), payTokenIndex, _chainID(), num64 ) ).toEthSignedMessageHash(); } function matchSigner( address signer, bytes32 hash, bytes memory signature ) private view returns (bool) { return SignatureChecker.isValidSignatureNow(signer, hash, signature); } /** * @dev Returns chain id. */ function _chainID() public view returns (uint32) { uint32 chainID; assembly { chainID := chainid() } return chainID; } function getMintTime(uint64 _lpIndex) external view returns (uint64[4] memory) { return mintInfo[_lpIndex].timestamp; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "remappings": [], "evmVersion": "paris" }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint64","name":"lpIndex","type":"uint64"},{"internalType":"address","name":"_nftAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DuplicatedLPIndex","type":"error"},{"inputs":[],"name":"ExceedLPMaxSupply","type":"error"},{"inputs":[],"name":"ExceedLPStageMaxSupply","type":"error"},{"inputs":[],"name":"ExceedPerAddressLimit","type":"error"},{"inputs":[],"name":"IncorrectERC20","type":"error"},{"inputs":[],"name":"StageNotActive","type":"error"},{"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":"uint64","name":"requestId","type":"uint64"},{"indexed":true,"internalType":"enum SpaceNationLaunchpad.MintType","name":"Type","type":"uint8"}],"name":"Sale","type":"event"},{"inputs":[],"name":"_chainID","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"whitePrice","type":"uint256"},{"internalType":"uint256","name":"publicPrice","type":"uint256"},{"internalType":"string","name":"symbol","type":"string"}],"name":"addPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"addrBackupMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"addrGtdMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_lpIndex","type":"uint64"},{"internalType":"uint32","name":"payTokenIndex","type":"uint32"},{"internalType":"uint64[4]","name":"num64","type":"uint64[4]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"backupsale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_lpIndex","type":"uint64"}],"name":"getMintTime","outputs":[{"internalType":"uint64[4]","name":"","type":"uint64[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_lpIndex","type":"uint64"},{"internalType":"uint32","name":"payTokenIndex","type":"uint32"},{"internalType":"uint64[4]","name":"num64","type":"uint64[4]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"gtdsale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"lpInfo","outputs":[{"internalType":"bool","name":"enableMultiBackup","type":"bool"},{"internalType":"uint32","name":"limitationForBackupAddress","type":"uint32"},{"internalType":"uint32","name":"limitationForPubSale","type":"uint32"},{"internalType":"uint32","name":"expireTime","type":"uint32"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"address","name":"signer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"","type":"uint64"}],"name":"mintInfo","outputs":[{"internalType":"uint64","name":"gtdSupply","type":"uint64"},{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"address","name":"nftAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"lpIndex","type":"uint64"},{"components":[{"internalType":"uint64[4]","name":"timestamp","type":"uint64[4]"},{"internalType":"uint64","name":"gtdSupply","type":"uint64"},{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"address","name":"nftAddress","type":"address"}],"internalType":"struct SpaceNationLaunchpad.LPMintInfo","name":"_mintInfo","type":"tuple"}],"name":"newLaunchpad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"payTokens","outputs":[{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"whitePrice","type":"uint256"},{"internalType":"uint256","name":"publicPrice","type":"uint256"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_lpIndex","type":"uint64"},{"internalType":"uint32","name":"payTokenIndex","type":"uint32"},{"internalType":"uint64[4]","name":"num64","type":"uint64[4]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"publicsale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bene","type":"address"}],"name":"setBene","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setCosigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setEnableMutiBackup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_expireTime","type":"uint32"}],"name":"setExpire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_count","type":"uint32"}],"name":"setLimitForBackupAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_count","type":"uint32"}],"name":"setLimitForPublicAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"lpIndex","type":"uint64"},{"internalType":"uint64[4]","name":"ts","type":"uint64[4]"}],"name":"setMintTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"lpIndex","type":"uint64"},{"internalType":"address","name":"newNft","type":"address"}],"name":"setNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"payTokenIndexs","type":"uint64[]"},{"internalType":"uint256[]","name":"wlprices","type":"uint256[]"},{"internalType":"uint256[]","name":"pubprices","type":"uint256[]"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"lpIndex","type":"uint64"},{"internalType":"uint64","name":"_count","type":"uint64"}],"name":"setgtdSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"lpIndex","type":"uint64"},{"internalType":"uint64","name":"_count","type":"uint64"}],"name":"setmaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200308c3803806200308c83398101604081905262000034916200050f565b6200003f336200039d565b600180556200004e82620003ed565b6040805161010081018252636730bc6060808201908152636730d88060a0830152636730f4a060c083015263673110c060e083015281526107586020808301919091526107bc828401526001600160a01b03841660608301526001600160401b03851660009081526007909152919091208151620000d090829060046200044c565b50602082810151600183810180546040808801516001600160401b0390811668010000000000000000026001600160801b0319909316951694909417179055606094850151600294850180546001600160a01b039283166001600160a01b031991821617909155835160c081018552600080825281870185905281860185905261012c828a015273464868685f5ed7cc8260840a8a0e797f48b0dbd0608080840182905273f9f477d9b8e772ae5138d91d7d7b88a05d62e62e60a090940184905289546a012c0000000100000001006001600160681b031990911617909955600380548516909117815560048054851690931783558651808a0188528281528089018390528088018390528a018a9052865198890187528189526702386f26fc1000008989018181528a89019182528851808a019099529188526208aa8960eb1b98880198909852988801958652600580549586018155905286516000805160206200302c833981519152949091029384018054909216921691909117815594516000805160206200300c83398151915282015591516000805160206200306c833981519152830155519192839290916000805160206200304c83398151915201906200029e908262000609565b50506040805160808101825273dac17f958d2ee523a2206206994597c13d831ec78152631dbe22c06020808301828152838501928352845180860190955260088552670aaa688a8be8aa8960c31b91850191909152606083019384526005805460018101825560009190915283516000805160206200302c833981519152600490920291820180546001600160a01b0319166001600160a01b0390921691909117815591516000805160206200300c83398151915282015591516000805160206200306c83398151915283015592519194508493506000805160206200304c833981519152019062000391908262000609565b505050505050620006d5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160401b03811660009081526006602052604090205460ff161562000428576040516339f79cd160e21b815260040160405180910390fd5b6001600160401b03166000908152600660205260409020805460ff19166001179055565b600183019183908215620004e65791602002820160005b83821115620004af57835183826101000a8154816001600160401b0302191690836001600160401b03160217905550926020019260080160208160070104928301926001030262000463565b8015620004e45782816101000a8154906001600160401b030219169055600801602081600701049283019260010302620004af565b505b50620004f4929150620004f8565b5090565b5b80821115620004f45760008155600101620004f9565b600080604083850312156200052357600080fd5b82516001600160401b03811681146200053b57600080fd5b60208401519092506001600160a01b03811681146200055957600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200058f57607f821691505b602082108103620005b057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200060457600081815260208120601f850160051c81016020861015620005df5750805b601f850160051c820191505b818110156200060057828155600101620005eb565b5050505b505050565b81516001600160401b0381111562000625576200062562000564565b6200063d816200063684546200057a565b84620005b6565b602080601f8311600181146200067557600084156200065c5750858301515b600019600386901b1c1916600185901b17855562000600565b600085815260208120601f198616915b82811015620006a65788860151825594840194600190910190840162000685565b5085821015620006c55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61292780620006e56000396000f3fe60806040526004361061019c5760003560e01c806375e8bb87116100ec578063b99abbb91161008a578063c5bb8a8811610064578063c5bb8a8814610598578063e3715eb1146105b8578063eca9bc2d146105cb578063f2fde38b146105eb57600080fd5b8063b99abbb91461051f578063beab71311461053f578063c3679c381461056057600080fd5b806389cab478116100c657806389cab4781461041f5780638da5cb5b1461043f578063911b799314610467578063aa958d351461048757600080fd5b806375e8bb87146103cc578063848a283d146103ec578063897db6f4146103ff57600080fd5b80633ccfd60b116101595780634c5f08b9116101335780634c5f08b9146102f3578063558ddd351461031357806369d998b014610397578063715018a6146103b757600080fd5b80633ccfd60b1461029e5780633ecaa703146102b357806340b13de6146102d357600080fd5b806302045138146101a157806304007bab146101c35780630535020d1461020e5780633099e1321461023e578063317efff31461026b57806334cef6161461028b575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611fdc565b61060b565b005b3480156101cf57600080fd5b506101fb6101de366004612015565b600c60209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561021a57600080fd5b5061022e610229366004612048565b610635565b60405161020594939291906120b1565b34801561024a57600080fd5b5061025e6102593660046120de565b610707565b60405161020591906120f9565b34801561027757600080fd5b506101c1610286366004612147565b610789565b6101c1610299366004612179565b6107bb565b3480156102aa57600080fd5b506101c16107e4565b3480156102bf57600080fd5b506101c16102ce366004612317565b610804565b3480156102df57600080fd5b506101c16102ee366004611fdc565b610908565b3480156102ff57600080fd5b506101c161030e3660046123fa565b610932565b34801561031f57600080fd5b5061036861032e3660046120de565b600760205260009081526040902060018101546002909101546001600160401b0380831692600160401b900416906001600160a01b031683565b604080516001600160401b0394851681529390921660208401526001600160a01b031690820152606001610205565b3480156103a357600080fd5b506101c16103b2366004612147565b610a68565b3480156103c357600080fd5b506101c1610a92565b3480156103d857600080fd5b506101c16103e73660046124b2565b610ada565b6101c16103fa366004612179565b610b1e565b34801561040b57600080fd5b506101c161041a3660046124dc565b610b36565b34801561042b57600080fd5b506101c161043a3660046124f8565b610b83565b34801561044b57600080fd5b506000546040516001600160a01b039091168152602001610205565b34801561047357600080fd5b506101c16104823660046125d1565b610c2f565b34801561049357600080fd5b506002546003546004546104da9260ff81169263ffffffff6101008304811693650100000000008404821693600160481b9004909116916001600160a01b03908116911686565b60408051961515875263ffffffff958616602088015293851693860193909352921660608401526001600160a01b0391821660808401521660a082015260c001610205565b34801561052b57600080fd5b506101c161053a3660046125ee565b610c4a565b34801561054b57600080fd5b5060405163ffffffff46168152602001610205565b34801561056c57600080fd5b506101fb61057b366004612015565b600b60209081526000928352604080842090915290825290205481565b3480156105a457600080fd5b506101c16105b3366004612147565b610c7b565b6101c16105c6366004612179565b610caf565b3480156105d757600080fd5b506101c16105e63660046124dc565b610cc7565b3480156105f757600080fd5b506101c1610606366004611fdc565b610d01565b610613610d7a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6005818154811061064557600080fd5b600091825260209091206004909102018054600182015460028301546003840180546001600160a01b0390941695509193909290919061068490612619565b80601f01602080910402602001604051908101604052809291908181526020018280546106b090612619565b80156106fd5780601f106106d2576101008083540402835291602001916106fd565b820191906000526020600020905b8154815290600101906020018083116106e057829003601f168201915b5050505050905084565b61070f611e7f565b6001600160401b038216600090815260076020526040808220815160808101928390529290916004918390855b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161073c575094979650505050505050565b610791610d7a565b6002805463ffffffff909216650100000000000268ffffffff000000000019909216919091179055565b6107c3610dd4565b60006107d3868683878787610e2d565b506107dd60018055565b5050505050565b6107ec610d7a565b600354610802906001600160a01b031647610f85565b565b61080c610d7a565b825182518114801561081e5750808251145b61082757600080fd5b60008080805b848110156108fe5787818151811061084757610847612653565b6020026020010151935086818151811061086357610863612653565b6020026020010151925085818151811061087f5761087f612653565b60200260200101519150826005856001600160401b0316815481106108a6576108a6612653565b906000526020600020906004020160010181905550816005856001600160401b0316815481106108d8576108d8612653565b6000918252602090912060026004909202010155806108f68161267f565b91505061082d565b5050505050505050565b610910610d7a565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61093a610d7a565b61096e604051806080016040528060006001600160a01b031681526020016000815260200160008152602001606081525090565b50604080516080810182526001600160a01b03868116825260208201868152928201858152606083018581526005805460018101825560009190915284517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600490920291820180546001600160a01b0319169190951617845594517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db186015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db285015551919283927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3909101906108fe90826126de565b610a70610d7a565b6002805463ffffffff9092166101000264ffffffff0019909216919091179055565b610a9a610d7a565b60405162461bcd60e51b815260206004820152601060248201526f436c6f7365645f496e7465726661636560801b60448201526064015b60405180910390fd5b610ae2610d7a565b6001600160401b0391909116600090815260076020526040902060020180546001600160a01b0319166001600160a01b03909216919091179055565b610b26610dd4565b60016107d3868683878787610e2d565b610b3e610d7a565b6001600160401b039182166000908152600760205260409020600101805492909116600160401b026fffffffffffffffff000000000000000019909216919091179055565b610b8b610d7a565b610b948261109e565b6001600160401b03821660009081526007602052604090208151829190610bbe9082906004611e9d565b50602082015160018201805460408501516001600160401b03908116600160401b026fffffffffffffffffffffffffffffffff19909216931692909217919091179055606090910151600290910180546001600160a01b039092166001600160a01b03199092169190911790555050565b610c37610d7a565b6002805460ff1916911515919091179055565b610c52610d7a565b6001600160401b0382166000908152600760205260409020610c7690826004611f42565b505050565b610c83610d7a565b6002805463ffffffff909216600160481b026cffffffff00000000000000000019909216919091179055565b610cb7610dd4565b60026107d3868683878787610e2d565b610ccf610d7a565b6001600160401b039182166000908152600760205260409020600101805467ffffffffffffffff191691909216179055565b610d09610d7a565b6001600160a01b038116610d6e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ad1565b610d77816110fc565b50565b6000546001600160a01b031633146108025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ad1565b600260015403610e265760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ad1565b6002600155565b610e478685610e4260408701602088016120de565b61114c565b33600080610e5b60608701604088016120de565b610e6b60808801606089016120de565b90925090506002876002811115610e8457610e8461279d565b03610ea35760025460ff16610ea35750600254610100900463ffffffff165b610ec2898885856001600160401b0316856001600160401b03166112ef565b600254600454610ef19189918b91600160481b900463ffffffff169087906001600160a01b03168b8b8b6114b4565b610f0b87610f056060890160408a016120de565b8a6116a7565b610f268988610f2060608a0160408b016120de565b866118f9565b866002811115610f3857610f3861279d565b610f4560208801886120de565b6001600160401b03167f09a5f765138d2f41d407fa7e65c9bea0300d2515204fa9eb2ddbc202e83fc2aa60405160405180910390a3505050505050505050565b80471015610fd55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610ad1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611022576040519150601f19603f3d011682016040523d82523d6000602084013e611027565b606091505b5050905080610c765760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610ad1565b6001600160401b03811660009081526006602052604090205460ff16156110d8576040516339f79cd160e21b815260040160405180910390fd5b6001600160401b03166000908152600660205260409020805460ff19166001179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160401b038316600090815260076020526040808220815160808101928390524293929091906004908285855b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161117c579050505050505090506000816000600481106111da576111da612653565b6020020151905060008260016020020151905060028660028111156112015761120161279d565b036112175750506020810151604082015161123d565b600086600281111561122b5761122b61279d565b0361123d575050604081015160608201515b6001600160401b03811684116001600160401b03831685101760010361127657604051630adfa6c760e11b815260040160405180910390fd5b600086600281111561128a5761128a61279d565b146112e6576112aa816001600160401b0316866001600160401b03161190565b6112c5836001600160401b0316876001600160401b03161090565b176001036112e657604051630adfa6c760e11b815260040160405180910390fd5b50505050505050565b60008460028111156113035761130361279d565b0361133e5760025465010000000000900463ffffffff16821461133957604051635684a1e560e11b815260040160405180910390fd5b6107dd565b600060018560028111156113545761135461279d565b036113e4576001600160401b038087166000908152600960209081526040808320546007909252909120600101549091168061139086846127b3565b11156113af57604051635684a1e560e11b815260040160405180910390fd5b5050506001600160a01b0383166000908152600c602090815260408083206001600160401b038916845290915290205461142c565b60028560028111156113f8576113f861279d565b0361142c57506001600160a01b0383166000908152600b602090815260408083206001600160401b03891684529091529020545b8161143784836127b3565b111561145657604051633194dcd560e01b815260040160405180910390fd5b6001600160401b038087166000908152600a60209081526040808320546007909252909120600101549091600160401b909104168061149586846127b3565b11156108fe57604051632df88e0b60e11b815260040160405180910390fd5b60008860028111156114c8576114c861279d565b146108fe574260018960028111156114e2576114e261279d565b0361155357806114f860408601602087016120de565b6115089063ffffffff8a166127c6565b6001600160401b031610156115535760405162461bcd60e51b815260206004820152601160248201527014da59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610ad1565b600061156260208601866120de565b6001600160401b03811660009081526008602052604090205490915060ff16156115c55760405162461bcd60e51b81526020600482015260146024820152734475706c696361746564207369676e617475726560601b6044820152606401610ad1565b61163a866115fe8c8c8b8a6004806020026040519081016040528092919082600460200280828437600092019190915250611af2915050565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b7392505050565b61167a5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610ad1565b6001600160401b03166000908152600860205260409020805460ff19166001179055505050505050505050565b600060058263ffffffff16815481106116c2576116c2612653565b90600052602060002090600402016040518060800160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600182015481526020016002820154815260200160038201805461172e90612619565b80601f016020809104026020016040519081016040528092919081815260200182805461175a90612619565b80156117a75780601f1061177c576101008083540402835291602001916117a7565b820191906000526020600020905b81548152906001019060200180831161178a57829003601f168201915b50505091909252505050602081015190915060008560028111156117cd576117cd61279d565b036117d9575060408101515b81516001600160a01b03811661184f576117fc826001600160401b0387166127ed565b341461184a5760405162461bcd60e51b815260206004820152601e60248201527f496e73756666696369656e742076616c756520666f72207061796d656e7400006044820152606401610ad1565b6118f1565b341561189d5760405162461bcd60e51b815260206004820152601e60248201527f4e6f206e6565642076616c756520696e20746f6b656e207061796d656e7400006044820152606401610ad1565b6001600160a01b0381163b6118c557604051633774c5bb60e21b815260040160405180910390fd5b6003546118f190829033906001600160a01b03166118ec866001600160401b038b166127ed565b611b88565b505050505050565b6001600160401b03808516600090815260076020908152604080832060020154600a909252822080546001600160a01b0390921693861692909161193e9084906127b3565b90915550600190508460028111156119585761195861279d565b036119d9576001600160401b03858116600090815260096020526040812080549286169290919061198a9084906127b3565b90915550506001600160a01b0382166000908152600c602090815260408083206001600160401b0389811685529252822080549186169290916119ce9084906127b3565b90915550611a379050565b60028460028111156119ed576119ed61279d565b03611a37576001600160a01b0382166000908152600b602090815260408083206001600160401b038981168552925282208054918616929091611a319084906127b3565b90915550505b60405162bef75d60e51b81526001600160401b03841660048201526001600160a01b0383811660248301528216906317deeba0906044016020604051808303816000875af1158015611a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab19190612804565b6107dd5760405162461bcd60e51b815260206004820152601260248201527111985a5b081d1bc81b5a5b9d08184813919560721b6044820152606401610ad1565b6000611b6a83866002811115611b0a57611b0a61279d565b864686604051602001611b21959493929190612821565b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b95945050505050565b6000611b80848484611c29565b949350505050565b60006040516323b872dd60e01b81526001600160a01b03851660048201526001600160a01b03841660248201528260448201526020600060648360008a5af191505080601f3d1160016000511416151615611be55750833b153d17155b806107dd5760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b6044820152606401610ad1565b6000806000611c388585611c8a565b90925090506000816004811115611c5157611c5161279d565b148015611c6f5750856001600160a01b0316826001600160a01b0316145b80611c805750611c80868686611ccf565b9695505050505050565b6000808251604103611cc05760208301516040840151606085015160001a611cb487828585611dbb565b94509450505050611cc8565b506000905060025b9250929050565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401611cf99291906128a3565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611d3791906128bc565b600060405180830381855afa9150503d8060008114611d72576040519150601f19603f3d011682016040523d82523d6000602084013e611d77565b606091505b5091509150818015611d8b57506020815110155b8015611c8057508051630b135d3f60e11b90611db090830160209081019084016128d8565b149695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611df25750600090506003611e76565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e46573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e6f57600060019250925050611e76565b9150600090505b94509492505050565b60405180608001604052806004906020820280368337509192915050565b600183019183908215611f325791602002820160005b83821115611efd57835183826101000a8154816001600160401b0302191690836001600160401b031602179055509260200192600801602081600701049283019260010302611eb3565b8015611f305782816101000a8154906001600160401b030219169055600801602081600701049283019260010302611efd565b505b50611f3e929150611fab565b5090565b600183019183908215611f325791602002820160005b83821115611efd5783356001600160401b031683826101000a8154816001600160401b0302191690836001600160401b031602179055509260200192600801602081600701049283019260010302611f58565b5b80821115611f3e5760008155600101611fac565b80356001600160a01b0381168114611fd757600080fd5b919050565b600060208284031215611fee57600080fd5b611ff782611fc0565b9392505050565b80356001600160401b0381168114611fd757600080fd5b6000806040838503121561202857600080fd5b61203183611fc0565b915061203f60208401611ffe565b90509250929050565b60006020828403121561205a57600080fd5b5035919050565b60005b8381101561207c578181015183820152602001612064565b50506000910152565b6000815180845261209d816020860160208601612061565b601f01601f19169290920160200192915050565b60018060a01b0385168152836020820152826040820152608060608201526000611c806080830184612085565b6000602082840312156120f057600080fd5b611ff782611ffe565b60808101818360005b600481101561212a5781516001600160401b0316835260209283019290910190600101612102565b50505092915050565b803563ffffffff81168114611fd757600080fd5b60006020828403121561215957600080fd5b611ff782612133565b806080810183101561217357600080fd5b92915050565b600080600080600060e0868803121561219157600080fd5b61219a86611ffe565b94506121a860208701612133565b93506121b78760408801612162565b925060c08601356001600160401b03808211156121d357600080fd5b818801915088601f8301126121e757600080fd5b8135818111156121f657600080fd5b89602082850101111561220857600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156122535761225361221b565b60405290565b604051601f8201601f191681016001600160401b03811182821017156122815761228161221b565b604052919050565b60006001600160401b038211156122a2576122a261221b565b5060051b60200190565b600082601f8301126122bd57600080fd5b813560206122d26122cd83612289565b612259565b82815260059290921b840181019181810190868411156122f157600080fd5b8286015b8481101561230c57803583529183019183016122f5565b509695505050505050565b60008060006060848603121561232c57600080fd5b83356001600160401b038082111561234357600080fd5b818601915086601f83011261235757600080fd5b813560206123676122cd83612289565b82815260059290921b8401810191818101908a84111561238657600080fd5b948201945b838610156123ab5761239c86611ffe565b8252948201949082019061238b565b975050870135925050808211156123c157600080fd5b6123cd878388016122ac565b935060408601359150808211156123e357600080fd5b506123f0868287016122ac565b9150509250925092565b6000806000806080858703121561241057600080fd5b61241985611fc0565b935060208086013593506040860135925060608601356001600160401b038082111561244457600080fd5b818801915088601f83011261245857600080fd5b81358181111561246a5761246a61221b565b61247c601f8201601f19168501612259565b9150808252898482850101111561249257600080fd5b808484018584013760008482840101525080935050505092959194509250565b600080604083850312156124c557600080fd5b6124ce83611ffe565b915061203f60208401611fc0565b600080604083850312156124ef57600080fd5b61203183611ffe565b60008082840361010081121561250d57600080fd5b61251684611ffe565b9250602060e0601f198301121561252c57600080fd5b612534612231565b915085603f86011261254557600080fd5b61254d612231565b8060a087018881111561255f57600080fd5b8388015b818110156125815761257481611ffe565b8452928401928401612563565b5081855261258e81611ffe565b84860152505050506125a260c08501611ffe565b60408201526125b360e08501611fc0565b6060820152809150509250929050565b8015158114610d7757600080fd5b6000602082840312156125e357600080fd5b8135611ff7816125c3565b60008060a0838503121561260157600080fd5b61260a83611ffe565b915061203f8460208501612162565b600181811c9082168061262d57607f821691505b60208210810361264d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161269157612691612669565b5060010190565b601f821115610c7657600081815260208120601f850160051c810160208610156126bf5750805b601f850160051c820191505b818110156118f1578281556001016126cb565b81516001600160401b038111156126f7576126f761221b565b61270b816127058454612619565b84612698565b602080601f83116001811461274057600084156127285750858301515b600019600386901b1c1916600185901b1785556118f1565b600085815260208120601f198616915b8281101561276f57888601518255948401946001909101908401612750565b508582101561278d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fd5b8082018082111561217357612173612669565b6001600160401b038181168382160190808211156127e6576127e6612669565b5092915050565b808202811582820484141761217357612173612669565b60006020828403121561281657600080fd5b8151611ff7816125c3565b6bffffffffffffffffffffffff19606087901b1681526001600160e01b031960e086811b8216601484015285811b8216601884015284901b16601c8201526000602080830184835b600481101561288f5781516001600160401b031683529183019190830190600101612869565b5050505060a0820190509695505050505050565b828152604060208201526000611b806040830184612085565b600082516128ce818460208701612061565b9190910192915050565b6000602082840312156128ea57600080fd5b505191905056fea2646970667358221220fdfde8b3734fc6e51704626a98c286f0efa0fa72b2537fbc9602435c7418536a64736f6c63430008130033036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db1036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db2000000000000000000000000000000000000000000000000000000000000271000000000000000000000000021e70ed3c0d8e60332cae0a15616f95a98fa0505
Deployed Bytecode
0x60806040526004361061019c5760003560e01c806375e8bb87116100ec578063b99abbb91161008a578063c5bb8a8811610064578063c5bb8a8814610598578063e3715eb1146105b8578063eca9bc2d146105cb578063f2fde38b146105eb57600080fd5b8063b99abbb91461051f578063beab71311461053f578063c3679c381461056057600080fd5b806389cab478116100c657806389cab4781461041f5780638da5cb5b1461043f578063911b799314610467578063aa958d351461048757600080fd5b806375e8bb87146103cc578063848a283d146103ec578063897db6f4146103ff57600080fd5b80633ccfd60b116101595780634c5f08b9116101335780634c5f08b9146102f3578063558ddd351461031357806369d998b014610397578063715018a6146103b757600080fd5b80633ccfd60b1461029e5780633ecaa703146102b357806340b13de6146102d357600080fd5b806302045138146101a157806304007bab146101c35780630535020d1461020e5780633099e1321461023e578063317efff31461026b57806334cef6161461028b575b600080fd5b3480156101ad57600080fd5b506101c16101bc366004611fdc565b61060b565b005b3480156101cf57600080fd5b506101fb6101de366004612015565b600c60209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b34801561021a57600080fd5b5061022e610229366004612048565b610635565b60405161020594939291906120b1565b34801561024a57600080fd5b5061025e6102593660046120de565b610707565b60405161020591906120f9565b34801561027757600080fd5b506101c1610286366004612147565b610789565b6101c1610299366004612179565b6107bb565b3480156102aa57600080fd5b506101c16107e4565b3480156102bf57600080fd5b506101c16102ce366004612317565b610804565b3480156102df57600080fd5b506101c16102ee366004611fdc565b610908565b3480156102ff57600080fd5b506101c161030e3660046123fa565b610932565b34801561031f57600080fd5b5061036861032e3660046120de565b600760205260009081526040902060018101546002909101546001600160401b0380831692600160401b900416906001600160a01b031683565b604080516001600160401b0394851681529390921660208401526001600160a01b031690820152606001610205565b3480156103a357600080fd5b506101c16103b2366004612147565b610a68565b3480156103c357600080fd5b506101c1610a92565b3480156103d857600080fd5b506101c16103e73660046124b2565b610ada565b6101c16103fa366004612179565b610b1e565b34801561040b57600080fd5b506101c161041a3660046124dc565b610b36565b34801561042b57600080fd5b506101c161043a3660046124f8565b610b83565b34801561044b57600080fd5b506000546040516001600160a01b039091168152602001610205565b34801561047357600080fd5b506101c16104823660046125d1565b610c2f565b34801561049357600080fd5b506002546003546004546104da9260ff81169263ffffffff6101008304811693650100000000008404821693600160481b9004909116916001600160a01b03908116911686565b60408051961515875263ffffffff958616602088015293851693860193909352921660608401526001600160a01b0391821660808401521660a082015260c001610205565b34801561052b57600080fd5b506101c161053a3660046125ee565b610c4a565b34801561054b57600080fd5b5060405163ffffffff46168152602001610205565b34801561056c57600080fd5b506101fb61057b366004612015565b600b60209081526000928352604080842090915290825290205481565b3480156105a457600080fd5b506101c16105b3366004612147565b610c7b565b6101c16105c6366004612179565b610caf565b3480156105d757600080fd5b506101c16105e63660046124dc565b610cc7565b3480156105f757600080fd5b506101c1610606366004611fdc565b610d01565b610613610d7a565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6005818154811061064557600080fd5b600091825260209091206004909102018054600182015460028301546003840180546001600160a01b0390941695509193909290919061068490612619565b80601f01602080910402602001604051908101604052809291908181526020018280546106b090612619565b80156106fd5780601f106106d2576101008083540402835291602001916106fd565b820191906000526020600020905b8154815290600101906020018083116106e057829003601f168201915b5050505050905084565b61070f611e7f565b6001600160401b038216600090815260076020526040808220815160808101928390529290916004918390855b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161073c575094979650505050505050565b610791610d7a565b6002805463ffffffff909216650100000000000268ffffffff000000000019909216919091179055565b6107c3610dd4565b60006107d3868683878787610e2d565b506107dd60018055565b5050505050565b6107ec610d7a565b600354610802906001600160a01b031647610f85565b565b61080c610d7a565b825182518114801561081e5750808251145b61082757600080fd5b60008080805b848110156108fe5787818151811061084757610847612653565b6020026020010151935086818151811061086357610863612653565b6020026020010151925085818151811061087f5761087f612653565b60200260200101519150826005856001600160401b0316815481106108a6576108a6612653565b906000526020600020906004020160010181905550816005856001600160401b0316815481106108d8576108d8612653565b6000918252602090912060026004909202010155806108f68161267f565b91505061082d565b5050505050505050565b610910610d7a565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b61093a610d7a565b61096e604051806080016040528060006001600160a01b031681526020016000815260200160008152602001606081525090565b50604080516080810182526001600160a01b03868116825260208201868152928201858152606083018581526005805460018101825560009190915284517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0600490920291820180546001600160a01b0319169190951617845594517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db186015590517f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db285015551919283927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db3909101906108fe90826126de565b610a70610d7a565b6002805463ffffffff9092166101000264ffffffff0019909216919091179055565b610a9a610d7a565b60405162461bcd60e51b815260206004820152601060248201526f436c6f7365645f496e7465726661636560801b60448201526064015b60405180910390fd5b610ae2610d7a565b6001600160401b0391909116600090815260076020526040902060020180546001600160a01b0319166001600160a01b03909216919091179055565b610b26610dd4565b60016107d3868683878787610e2d565b610b3e610d7a565b6001600160401b039182166000908152600760205260409020600101805492909116600160401b026fffffffffffffffff000000000000000019909216919091179055565b610b8b610d7a565b610b948261109e565b6001600160401b03821660009081526007602052604090208151829190610bbe9082906004611e9d565b50602082015160018201805460408501516001600160401b03908116600160401b026fffffffffffffffffffffffffffffffff19909216931692909217919091179055606090910151600290910180546001600160a01b039092166001600160a01b03199092169190911790555050565b610c37610d7a565b6002805460ff1916911515919091179055565b610c52610d7a565b6001600160401b0382166000908152600760205260409020610c7690826004611f42565b505050565b610c83610d7a565b6002805463ffffffff909216600160481b026cffffffff00000000000000000019909216919091179055565b610cb7610dd4565b60026107d3868683878787610e2d565b610ccf610d7a565b6001600160401b039182166000908152600760205260409020600101805467ffffffffffffffff191691909216179055565b610d09610d7a565b6001600160a01b038116610d6e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ad1565b610d77816110fc565b50565b6000546001600160a01b031633146108025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ad1565b600260015403610e265760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ad1565b6002600155565b610e478685610e4260408701602088016120de565b61114c565b33600080610e5b60608701604088016120de565b610e6b60808801606089016120de565b90925090506002876002811115610e8457610e8461279d565b03610ea35760025460ff16610ea35750600254610100900463ffffffff165b610ec2898885856001600160401b0316856001600160401b03166112ef565b600254600454610ef19189918b91600160481b900463ffffffff169087906001600160a01b03168b8b8b6114b4565b610f0b87610f056060890160408a016120de565b8a6116a7565b610f268988610f2060608a0160408b016120de565b866118f9565b866002811115610f3857610f3861279d565b610f4560208801886120de565b6001600160401b03167f09a5f765138d2f41d407fa7e65c9bea0300d2515204fa9eb2ddbc202e83fc2aa60405160405180910390a3505050505050505050565b80471015610fd55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610ad1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611022576040519150601f19603f3d011682016040523d82523d6000602084013e611027565b606091505b5050905080610c765760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610ad1565b6001600160401b03811660009081526006602052604090205460ff16156110d8576040516339f79cd160e21b815260040160405180910390fd5b6001600160401b03166000908152600660205260409020805460ff19166001179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160401b038316600090815260076020526040808220815160808101928390524293929091906004908285855b82829054906101000a90046001600160401b03166001600160401b03168152602001906008019060208260070104928301926001038202915080841161117c579050505050505090506000816000600481106111da576111da612653565b6020020151905060008260016020020151905060028660028111156112015761120161279d565b036112175750506020810151604082015161123d565b600086600281111561122b5761122b61279d565b0361123d575050604081015160608201515b6001600160401b03811684116001600160401b03831685101760010361127657604051630adfa6c760e11b815260040160405180910390fd5b600086600281111561128a5761128a61279d565b146112e6576112aa816001600160401b0316866001600160401b03161190565b6112c5836001600160401b0316876001600160401b03161090565b176001036112e657604051630adfa6c760e11b815260040160405180910390fd5b50505050505050565b60008460028111156113035761130361279d565b0361133e5760025465010000000000900463ffffffff16821461133957604051635684a1e560e11b815260040160405180910390fd5b6107dd565b600060018560028111156113545761135461279d565b036113e4576001600160401b038087166000908152600960209081526040808320546007909252909120600101549091168061139086846127b3565b11156113af57604051635684a1e560e11b815260040160405180910390fd5b5050506001600160a01b0383166000908152600c602090815260408083206001600160401b038916845290915290205461142c565b60028560028111156113f8576113f861279d565b0361142c57506001600160a01b0383166000908152600b602090815260408083206001600160401b03891684529091529020545b8161143784836127b3565b111561145657604051633194dcd560e01b815260040160405180910390fd5b6001600160401b038087166000908152600a60209081526040808320546007909252909120600101549091600160401b909104168061149586846127b3565b11156108fe57604051632df88e0b60e11b815260040160405180910390fd5b60008860028111156114c8576114c861279d565b146108fe574260018960028111156114e2576114e261279d565b0361155357806114f860408601602087016120de565b6115089063ffffffff8a166127c6565b6001600160401b031610156115535760405162461bcd60e51b815260206004820152601160248201527014da59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610ad1565b600061156260208601866120de565b6001600160401b03811660009081526008602052604090205490915060ff16156115c55760405162461bcd60e51b81526020600482015260146024820152734475706c696361746564207369676e617475726560601b6044820152606401610ad1565b61163a866115fe8c8c8b8a6004806020026040519081016040528092919082600460200280828437600092019190915250611af2915050565b86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b7392505050565b61167a5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610ad1565b6001600160401b03166000908152600860205260409020805460ff19166001179055505050505050505050565b600060058263ffffffff16815481106116c2576116c2612653565b90600052602060002090600402016040518060800160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600182015481526020016002820154815260200160038201805461172e90612619565b80601f016020809104026020016040519081016040528092919081815260200182805461175a90612619565b80156117a75780601f1061177c576101008083540402835291602001916117a7565b820191906000526020600020905b81548152906001019060200180831161178a57829003601f168201915b50505091909252505050602081015190915060008560028111156117cd576117cd61279d565b036117d9575060408101515b81516001600160a01b03811661184f576117fc826001600160401b0387166127ed565b341461184a5760405162461bcd60e51b815260206004820152601e60248201527f496e73756666696369656e742076616c756520666f72207061796d656e7400006044820152606401610ad1565b6118f1565b341561189d5760405162461bcd60e51b815260206004820152601e60248201527f4e6f206e6565642076616c756520696e20746f6b656e207061796d656e7400006044820152606401610ad1565b6001600160a01b0381163b6118c557604051633774c5bb60e21b815260040160405180910390fd5b6003546118f190829033906001600160a01b03166118ec866001600160401b038b166127ed565b611b88565b505050505050565b6001600160401b03808516600090815260076020908152604080832060020154600a909252822080546001600160a01b0390921693861692909161193e9084906127b3565b90915550600190508460028111156119585761195861279d565b036119d9576001600160401b03858116600090815260096020526040812080549286169290919061198a9084906127b3565b90915550506001600160a01b0382166000908152600c602090815260408083206001600160401b0389811685529252822080549186169290916119ce9084906127b3565b90915550611a379050565b60028460028111156119ed576119ed61279d565b03611a37576001600160a01b0382166000908152600b602090815260408083206001600160401b038981168552925282208054918616929091611a319084906127b3565b90915550505b60405162bef75d60e51b81526001600160401b03841660048201526001600160a01b0383811660248301528216906317deeba0906044016020604051808303816000875af1158015611a8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ab19190612804565b6107dd5760405162461bcd60e51b815260206004820152601260248201527111985a5b081d1bc81b5a5b9d08184813919560721b6044820152606401610ad1565b6000611b6a83866002811115611b0a57611b0a61279d565b864686604051602001611b21959493929190612821565b604051602081830303815290604052805190602001207f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b95945050505050565b6000611b80848484611c29565b949350505050565b60006040516323b872dd60e01b81526001600160a01b03851660048201526001600160a01b03841660248201528260448201526020600060648360008a5af191505080601f3d1160016000511416151615611be55750833b153d17155b806107dd5760405162461bcd60e51b81526020600482015260146024820152731514905394d1915497d19493d357d1905253115160621b6044820152606401610ad1565b6000806000611c388585611c8a565b90925090506000816004811115611c5157611c5161279d565b148015611c6f5750856001600160a01b0316826001600160a01b0316145b80611c805750611c80868686611ccf565b9695505050505050565b6000808251604103611cc05760208301516040840151606085015160001a611cb487828585611dbb565b94509450505050611cc8565b506000905060025b9250929050565b6000806000856001600160a01b0316631626ba7e60e01b8686604051602401611cf99291906128a3565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611d3791906128bc565b600060405180830381855afa9150503d8060008114611d72576040519150601f19603f3d011682016040523d82523d6000602084013e611d77565b606091505b5091509150818015611d8b57506020815110155b8015611c8057508051630b135d3f60e11b90611db090830160209081019084016128d8565b149695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611df25750600090506003611e76565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e46573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611e6f57600060019250925050611e76565b9150600090505b94509492505050565b60405180608001604052806004906020820280368337509192915050565b600183019183908215611f325791602002820160005b83821115611efd57835183826101000a8154816001600160401b0302191690836001600160401b031602179055509260200192600801602081600701049283019260010302611eb3565b8015611f305782816101000a8154906001600160401b030219169055600801602081600701049283019260010302611efd565b505b50611f3e929150611fab565b5090565b600183019183908215611f325791602002820160005b83821115611efd5783356001600160401b031683826101000a8154816001600160401b0302191690836001600160401b031602179055509260200192600801602081600701049283019260010302611f58565b5b80821115611f3e5760008155600101611fac565b80356001600160a01b0381168114611fd757600080fd5b919050565b600060208284031215611fee57600080fd5b611ff782611fc0565b9392505050565b80356001600160401b0381168114611fd757600080fd5b6000806040838503121561202857600080fd5b61203183611fc0565b915061203f60208401611ffe565b90509250929050565b60006020828403121561205a57600080fd5b5035919050565b60005b8381101561207c578181015183820152602001612064565b50506000910152565b6000815180845261209d816020860160208601612061565b601f01601f19169290920160200192915050565b60018060a01b0385168152836020820152826040820152608060608201526000611c806080830184612085565b6000602082840312156120f057600080fd5b611ff782611ffe565b60808101818360005b600481101561212a5781516001600160401b0316835260209283019290910190600101612102565b50505092915050565b803563ffffffff81168114611fd757600080fd5b60006020828403121561215957600080fd5b611ff782612133565b806080810183101561217357600080fd5b92915050565b600080600080600060e0868803121561219157600080fd5b61219a86611ffe565b94506121a860208701612133565b93506121b78760408801612162565b925060c08601356001600160401b03808211156121d357600080fd5b818801915088601f8301126121e757600080fd5b8135818111156121f657600080fd5b89602082850101111561220857600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156122535761225361221b565b60405290565b604051601f8201601f191681016001600160401b03811182821017156122815761228161221b565b604052919050565b60006001600160401b038211156122a2576122a261221b565b5060051b60200190565b600082601f8301126122bd57600080fd5b813560206122d26122cd83612289565b612259565b82815260059290921b840181019181810190868411156122f157600080fd5b8286015b8481101561230c57803583529183019183016122f5565b509695505050505050565b60008060006060848603121561232c57600080fd5b83356001600160401b038082111561234357600080fd5b818601915086601f83011261235757600080fd5b813560206123676122cd83612289565b82815260059290921b8401810191818101908a84111561238657600080fd5b948201945b838610156123ab5761239c86611ffe565b8252948201949082019061238b565b975050870135925050808211156123c157600080fd5b6123cd878388016122ac565b935060408601359150808211156123e357600080fd5b506123f0868287016122ac565b9150509250925092565b6000806000806080858703121561241057600080fd5b61241985611fc0565b935060208086013593506040860135925060608601356001600160401b038082111561244457600080fd5b818801915088601f83011261245857600080fd5b81358181111561246a5761246a61221b565b61247c601f8201601f19168501612259565b9150808252898482850101111561249257600080fd5b808484018584013760008482840101525080935050505092959194509250565b600080604083850312156124c557600080fd5b6124ce83611ffe565b915061203f60208401611fc0565b600080604083850312156124ef57600080fd5b61203183611ffe565b60008082840361010081121561250d57600080fd5b61251684611ffe565b9250602060e0601f198301121561252c57600080fd5b612534612231565b915085603f86011261254557600080fd5b61254d612231565b8060a087018881111561255f57600080fd5b8388015b818110156125815761257481611ffe565b8452928401928401612563565b5081855261258e81611ffe565b84860152505050506125a260c08501611ffe565b60408201526125b360e08501611fc0565b6060820152809150509250929050565b8015158114610d7757600080fd5b6000602082840312156125e357600080fd5b8135611ff7816125c3565b60008060a0838503121561260157600080fd5b61260a83611ffe565b915061203f8460208501612162565b600181811c9082168061262d57607f821691505b60208210810361264d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161269157612691612669565b5060010190565b601f821115610c7657600081815260208120601f850160051c810160208610156126bf5750805b601f850160051c820191505b818110156118f1578281556001016126cb565b81516001600160401b038111156126f7576126f761221b565b61270b816127058454612619565b84612698565b602080601f83116001811461274057600084156127285750858301515b600019600386901b1c1916600185901b1785556118f1565b600085815260208120601f198616915b8281101561276f57888601518255948401946001909101908401612750565b508582101561278d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052602160045260246000fd5b8082018082111561217357612173612669565b6001600160401b038181168382160190808211156127e6576127e6612669565b5092915050565b808202811582820484141761217357612173612669565b60006020828403121561281657600080fd5b8151611ff7816125c3565b6bffffffffffffffffffffffff19606087901b1681526001600160e01b031960e086811b8216601484015285811b8216601884015284901b16601c8201526000602080830184835b600481101561288f5781516001600160401b031683529183019190830190600101612869565b5050505060a0820190509695505050505050565b828152604060208201526000611b806040830184612085565b600082516128ce818460208701612061565b9190910192915050565b6000602082840312156128ea57600080fd5b505191905056fea2646970667358221220fdfde8b3734fc6e51704626a98c286f0efa0fa72b2537fbc9602435c7418536a64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000271000000000000000000000000021e70ed3c0d8e60332cae0a15616f95a98fa0505
-----Decoded View---------------
Arg [0] : lpIndex (uint64): 10000
Arg [1] : _nftAddress (address): 0x21E70Ed3c0D8e60332cAe0a15616f95A98Fa0505
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [1] : 00000000000000000000000021e70ed3c0d8e60332cae0a15616f95a98fa0505
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.