Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Overview
Max Total Supply
1,434,463.80208333218 CUT
Holders
403
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
114 CUTValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CosmicUtilityToken
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-02-12 */ // File: openzeppelin-solidity/contracts/utils/math/SafeMath.sol // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/Math.sol // OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @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 / b + (a % b == 0 ? 0 : 1); } } // File: @openzeppelin/contracts/utils/structs/EnumerableSet.sol // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721Receiver.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/IERC721Enumerable.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/IERC721Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Counters.sol // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/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: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721Enumerable.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { uint256 currentAllowance = _allowances[sender][_msgSender()]; if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } } _transfer(sender, recipient, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } // File: cosmicToken.sol pragma solidity 0.8.7; interface IDuck { function balanceOG(address _user) external view returns(uint256); } contract CosmicToken is ERC20("CosmicUtilityToken", "CUT") { using SafeMath for uint256; uint256 public totalTokensBurned = 0; address[] internal stakeholders; address payable private owner; //token Genesis per day uint256 constant public GENESIS_RATE = 20 ether; //token duck per day uint256 constant public DUCK_RATE = 5 ether; //token for genesis minting uint256 constant public GENESIS_ISSUANCE = 280 ether; //token for duck minting uint256 constant public DUCK_ISSUANCE = 70 ether; // Tue Mar 18 2031 17:46:47 GMT+0000 uint256 constant public END = 1931622407; mapping(address => uint256) public rewards; mapping(address => uint256) public lastUpdate; IDuck public ducksContract; constructor(address initDuckContract) { owner = payable(msg.sender); ducksContract = IDuck(initDuckContract); _mint(msg.sender, (1000000 * 10 ** 18)); _mint(0xb93329bB93F52362E97Fd5F953f98Ebed1438Cd8, (1000000 * 10 ** 18)); _mint(0x83e02c9f0ec019f75d3B7E6Ac193109c9e7224EA, (1000000 * 10 ** 18)); } function WhoOwns() public view returns (address) { return owner; } modifier Owned { require(msg.sender == owner); _; } function getContractAddress() public view returns (address) { return address(this); } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } modifier contractAddressOnly { require(msg.sender == address(ducksContract)); _; } // called when minting many NFTs function updateRewardOnMint(address _user, uint256 _tokenId) external contractAddressOnly { if(_tokenId <= 1000) { _mint(_user,GENESIS_ISSUANCE); } else if(_tokenId >= 1001) { _mint(_user,DUCK_ISSUANCE); } } function getReward(address _to, uint256 totalPayout) external contractAddressOnly { _mint(_to, (totalPayout * 10 ** 18)); } function burn(address _from, uint256 _amount) external { require(msg.sender == _from, "You do not own these tokens"); _burn(_from, _amount); totalTokensBurned += _amount; } } // File: cosmicLabs.sol pragma solidity 0.8.7; contract CosmicLabs is ERC721Enumerable, IERC721Receiver, Ownable { using Strings for uint256; using EnumerableSet for EnumerableSet.UintSet; CosmicToken public cosmictoken; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; string public baseURI; string public baseExtension = ".json"; uint public maxGenesisTx = 4; uint public maxDuckTx = 20; uint public maxSupply = 9000; uint public genesisSupply = 1000; uint256 public price = 0.05 ether; bool public GensisSaleOpen = true; bool public GenesisFreeMintOpen = false; bool public DuckMintOpen = false; modifier isSaleOpen { require(GensisSaleOpen == true); _; } modifier isFreeMintOpen { require(GenesisFreeMintOpen == true); _; } modifier isDuckMintOpen { require(DuckMintOpen == true); _; } function switchFromFreeToDuckMint() public onlyOwner { GenesisFreeMintOpen = false; DuckMintOpen = true; } event mint(address to, uint total); event withdraw(uint total); event giveawayNft(address to, uint tokenID); mapping(address => uint256) public balanceOG; mapping(address => uint256) public maxWalletGenesisTX; mapping(address => uint256) public maxWalletDuckTX; mapping(address => EnumerableSet.UintSet) private _deposits; mapping(uint256 => uint256) public _deposit_blocks; mapping(address => bool) public addressStaked; //ID - Days staked; mapping(uint256 => uint256) public IDvsDaysStaked; mapping (address => uint256) public whitelistMintAmount; address internal communityWallet = 0xea25545d846ecF4999C2875bC77dE5B5151Fa633; constructor(string memory _initBaseURI) ERC721("Cosmic Labs", "CLABS") { setBaseURI(_initBaseURI); for(uint256 i; i<5; i++) { _tokenIdTracker.increment(); _safeMint(msg.sender, totalToken()); _tokenIdTracker.increment(); _safeMint(0xb93329bB93F52362E97Fd5F953f98Ebed1438Cd8, totalToken()); _tokenIdTracker.increment(); _safeMint(0x83e02c9f0ec019f75d3B7E6Ac193109c9e7224EA, totalToken()); } } function setPrice(uint256 newPrice) external onlyOwner { price = newPrice; } function setYieldToken(address _yield) external onlyOwner { cosmictoken = CosmicToken(_yield); } function totalToken() public view returns (uint256) { return _tokenIdTracker.current(); } modifier communityWalletOnly { require(msg.sender == communityWallet); _; } function communityDuckMint(uint256 amountForAirdrops) public onlyOwner { for(uint256 i; i<amountForAirdrops; i++) { _tokenIdTracker.increment(); _safeMint(communityWallet, totalToken()); } } function GenesisSale(uint8 mintTotal) public payable isSaleOpen { uint256 totalMinted = maxWalletGenesisTX[msg.sender]; totalMinted = totalMinted + mintTotal; require(mintTotal >= 1 && mintTotal <= maxGenesisTx, "Mint Amount Incorrect"); require(totalToken() < genesisSupply, "SOLD OUT!"); require(maxWalletGenesisTX[msg.sender] <= maxGenesisTx, "You've maxed your limit!"); require(msg.value >= price * mintTotal, "Minting a Genesis Costs 0.05 Ether Each!"); require(totalMinted <= maxGenesisTx, "You'll surpass your limit!"); for(uint8 i=0;i<mintTotal;i++) { whitelistMintAmount[msg.sender] += 1; maxWalletGenesisTX[msg.sender] += 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalToken()); cosmictoken.updateRewardOnMint(msg.sender, totalToken()); emit mint(msg.sender, totalToken()); } if(totalToken() == genesisSupply) { GensisSaleOpen = false; GenesisFreeMintOpen = true; } } function GenesisFreeMint(uint8 mintTotal)public payable isFreeMintOpen { require(whitelistMintAmount[msg.sender] > 0, "You don't have any free mints!"); require(totalToken() < maxSupply, "SOLD OUT!"); require(mintTotal <= whitelistMintAmount[msg.sender], "You are passing your limit!"); for(uint8 i=0;i<mintTotal;i++) { whitelistMintAmount[msg.sender] -= 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalToken()); cosmictoken.updateRewardOnMint(msg.sender, totalToken()); emit mint(msg.sender, totalToken()); } } function DuckSale(uint8 mintTotal)public payable isDuckMintOpen { uint256 totalMinted = maxWalletDuckTX[msg.sender]; totalMinted = totalMinted + mintTotal; require(mintTotal >= 1 && mintTotal <= maxDuckTx, "Mint Amount Incorrect"); require(msg.value >= price * mintTotal, "Minting a Duck Costs 0.05 Ether Each!"); require(totalToken() < maxSupply, "SOLD OUT!"); require(maxWalletDuckTX[msg.sender] <= maxDuckTx, "You've maxed your limit!"); require(totalMinted <= maxDuckTx, "You'll surpass your limit!"); for(uint8 i=0;i<mintTotal;i++) { maxWalletDuckTX[msg.sender] += 1; _tokenIdTracker.increment(); _safeMint(msg.sender, totalToken()); cosmictoken.updateRewardOnMint(msg.sender, totalToken()); emit mint(msg.sender, totalToken()); } if(totalToken() == maxSupply) { DuckMintOpen = false; } } function airdropNft(address airdropPatricipent, uint16 tokenID) public payable communityWalletOnly { _transfer(msg.sender, airdropPatricipent, tokenID); emit giveawayNft(airdropPatricipent, tokenID); } function airdropMany(address[] memory airdropPatricipents) public payable communityWalletOnly { uint256[] memory tempWalletOfUser = this.walletOfOwner(msg.sender); require(tempWalletOfUser.length >= airdropPatricipents.length, "You dont have enough tokens to airdrop all!"); for(uint256 i=0; i<airdropPatricipents.length; i++) { _transfer(msg.sender, airdropPatricipents[i], tempWalletOfUser[i]); emit giveawayNft(airdropPatricipents[i], tempWalletOfUser[i]); } } function withdrawContractEther(address payable recipient) external onlyOwner { emit withdraw(getBalance()); recipient.transfer(getBalance()); } function getBalance() public view returns(uint) { return address(this).balance; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, tokenId.toString(), baseExtension)) : ""; } function getReward(uint256 CalculatedPayout) internal { cosmictoken.getReward(msg.sender, CalculatedPayout); } //Staking Functions function depositStake(uint256[] calldata tokenIds) external { require(isApprovedForAll(msg.sender, address(this)), "You are not Approved!"); for (uint256 i; i < tokenIds.length; i++) { safeTransferFrom( msg.sender, address(this), tokenIds[i], '' ); _deposits[msg.sender].add(tokenIds[i]); addressStaked[msg.sender] = true; _deposit_blocks[tokenIds[i]] = block.timestamp; IDvsDaysStaked[tokenIds[i]] = block.timestamp; } } function withdrawStake(uint256[] calldata tokenIds) external { require(isApprovedForAll(msg.sender, address(this)), "You are not Approved!"); for (uint256 i; i < tokenIds.length; i++) { require( _deposits[msg.sender].contains(tokenIds[i]), 'Token not deposited' ); cosmictoken.getReward(msg.sender,totalRewardsToPay(tokenIds[i])); _deposits[msg.sender].remove(tokenIds[i]); _deposit_blocks[tokenIds[i]] = 0; addressStaked[msg.sender] = false; IDvsDaysStaked[tokenIds[i]] = block.timestamp; this.safeTransferFrom( address(this), msg.sender, tokenIds[i], '' ); } } function viewRewards() external view returns (uint256) { uint256 payout = 0; for(uint256 i = 0; i < _deposits[msg.sender].length(); i++) { payout = payout + totalRewardsToPay(_deposits[msg.sender].at(i)); } return payout; } function claimRewards() external { for(uint256 i = 0; i < _deposits[msg.sender].length(); i++) { cosmictoken.getReward(msg.sender, totalRewardsToPay(_deposits[msg.sender].at(i))); IDvsDaysStaked[_deposits[msg.sender].at(i)] = block.timestamp; } } function totalRewardsToPay(uint256 tokenId) internal view returns(uint256) { uint256 payout = 0; if(tokenId > 0 && tokenId <= genesisSupply) { payout = howManyDaysStaked(tokenId) * 20; } else if (tokenId > genesisSupply && tokenId <= maxSupply) { payout = howManyDaysStaked(tokenId) * 5; } return payout; } function howManyDaysStaked(uint256 tokenId) public view returns(uint256) { require( _deposits[msg.sender].contains(tokenId), 'Token not deposited' ); uint256 returndays; uint256 timeCalc = block.timestamp - IDvsDaysStaked[tokenId]; returndays = timeCalc / 86400; return returndays; } function walletOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i = 0; i < tokenCount; i++) { tokensId[i] = tokenOfOwnerByIndex(_owner, i); } return tokensId; } function returnStakedTokens() public view returns (uint256[] memory) { return _deposits[msg.sender].values(); } function totalTokensInWallet() public view returns(uint256) { return cosmictoken.balanceOf(msg.sender); } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Capped.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Capped.sol) pragma solidity ^0.8.0; /** * @dev Extension of {ERC20} that adds a cap to the supply of tokens. */ abstract contract ERC20Capped is ERC20 { uint256 private immutable _cap; /** * @dev Sets the value of the `cap`. This value is immutable, it can only be * set once during construction. */ constructor(uint256 cap_) { require(cap_ > 0, "ERC20Capped: cap is 0"); _cap = cap_; } /** * @dev Returns the cap on the token's total supply. */ function cap() public view virtual returns (uint256) { return _cap; } /** * @dev See {ERC20-_mint}. */ function _mint(address account, uint256 amount) internal virtual override { require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded"); super._mint(account, amount); } } // File: newToken.sol pragma solidity 0.8.7; /// SPDX-License-Identifier: UNLICENSED /* ____ ___ ____ __ __ ___ ____ _ _ _____ ___ _ ___ _______ __ _____ ___ _ _______ _ _ / ___/ _ \/ ___|| \/ |_ _/ ___| | | | |_ _|_ _| | |_ _|_ _\ \ / / |_ _/ _ \| |/ / ____| \ | | | | | | | \___ \| |\/| || | | | | | | | | | || | | | | | \ V / | || | | | ' /| _| | \| | | |__| |_| |___) | | | || | |___ | |_| | | | | || |___ | | | | | | | || |_| | . \| |___| |\ | \____\___/|____/|_| |_|___\____| \___/ |_| |___|_____|___| |_| |_| |_| \___/|_|\_\_____|_| \_| */ contract CosmicUtilityToken is ERC20Capped, Ownable, ReentrancyGuard { mapping (uint256 => uint256) public tokenIdEarned; uint256 public totalTokensBurned = 0; uint256 constant public GENESIS_RATE = 0.01388888888 ether; uint256 constant public DUCK_RATE = 0.00347222222 ether; uint256 contractStarted; bool public stakingStarted = false; CosmicLabs public cosmicLabs; CosmicToken public cosmicToken; constructor(address CLABS, address CUT) ERC20("Cosmic Utility Token", "CUT") ERC20Capped(87600000 * 10 ** 18) { cosmicLabs = CosmicLabs(CLABS); cosmicToken = CosmicToken(CUT); } function teamMint(uint256 totalAmount) public onlyOwner { _mint(msg.sender, (totalAmount * 10 ** 18)); } function startStaking() public onlyOwner { contractStarted = block.timestamp; stakingStarted = true; } modifier hasStakingStarted { require(stakingStarted == true); _; } modifier hasBridgeClosed { require(stakingStarted == false); _; } //Bridge for old CUT function bridgeOldTokens() public nonReentrant hasBridgeClosed { uint256 howManyTokens = cosmicToken.balanceOf(msg.sender); cosmicToken.transferFrom(msg.sender, address(this), howManyTokens); //20% extra uint256 extraCommision = (howManyTokens * 20) / 100; _mint(msg.sender, (howManyTokens + extraCommision)); } function burnOldCut() external onlyOwner { cosmicToken.burn(address(this), cosmicToken.balanceOf(address(this))); } //Reward functions function claimRewards() public nonReentrant hasStakingStarted { _mint(msg.sender, tokensAccumulated()); uint256[] memory temp = cosmicLabs.walletOfOwner(msg.sender); for(uint256 i=0; i<temp.length;i++) { tokenIdEarned[temp[i]] = block.timestamp; } } function tokensAccumulated() public view returns(uint256) { uint256[] memory temp = cosmicLabs.walletOfOwner(msg.sender); uint256 totalTokensEarned; for(uint256 i=0; i<temp.length;i++) { if(temp[i] <= 1) { totalTokensEarned += (howManyMinStaked(temp[i]) * GENESIS_RATE); } else { totalTokensEarned += (howManyMinStaked(temp[i]) * DUCK_RATE); } } return totalTokensEarned; } function howManyMinStaked(uint256 tokenId) public view returns(uint256) { uint256 timeCalc; if(tokenIdEarned[tokenId] == 0) { timeCalc = block.timestamp - contractStarted; } else { timeCalc = block.timestamp - tokenIdEarned[tokenId]; } uint256 returnMins = timeCalc / 60; return returnMins; } function burn(address _from, uint256 _amount) external { require(msg.sender == _from, "You do not own these tokens"); _burn(_from, _amount); totalTokensBurned += _amount; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"CLABS","type":"address"},{"internalType":"address","name":"CUT","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DUCK_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENESIS_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeOldTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnOldCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cosmicLabs","outputs":[{"internalType":"contract CosmicLabs","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cosmicToken","outputs":[{"internalType":"contract CosmicToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"howManyMinStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdEarned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensAccumulated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526000600855600a805460ff191690553480156200002057600080fd5b5060405162001acf38038062001acf833981016040819052620000439162000282565b604080518082018252601481527f436f736d6963205574696c69747920546f6b656e0000000000000000000000006020808301918252835180850190945260038085526210d55560ea1b9185019190915282516a48760583f6ec837e0000009492620000b09291620001bf565b508051620000c6906004906020840190620001bf565b505050600081116200011e5760405162461bcd60e51b815260206004820152601560248201527f45524332304361707065643a2063617020697320300000000000000000000000604482015260640160405180910390fd5b6080526200012c336200016d565b6001600655600a8054610100600160a81b0319166101006001600160a01b0394851602179055600b80546001600160a01b03191691909216179055620002f7565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001cd90620002ba565b90600052602060002090601f016020900481019282620001f157600085556200023c565b82601f106200020c57805160ff19168380011785556200023c565b828001600101855582156200023c579182015b828111156200023c5782518255916020019190600101906200021f565b506200024a9291506200024e565b5090565b5b808211156200024a57600081556001016200024f565b80516001600160a01b03811681146200027d57600080fd5b919050565b600080604083850312156200029657600080fd5b620002a18362000265565b9150620002b16020840162000265565b90509250929050565b600181811c90821680620002cf57607f821691505b60208210811415620002f157634e487b7160e01b600052602260045260246000fd5b50919050565b6080516117b56200031a600039600081816102a401526110f701526117b56000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806371b0cbfa11610104578063a457c2d7116100a2578063dd62ed3e11610071578063dd62ed3e146103e5578063e60780151461041e578063e73b3d5a14610426578063f2fde38b1461042e57600080fd5b8063a457c2d7146103a8578063a9059cbb146103bb578063ae9c36ab146103ce578063d157e301146103dc57600080fd5b80638da5cb5b116100de5780638da5cb5b1461037457806395d89b41146103855780639d582e7d1461038d5780639dc29fac1461039557600080fd5b806371b0cbfa1461033957806379c58ea6146103415780638500e0d81461035457600080fd5b8063313ce5671161017c578063492037ac1161014b578063492037ac146102e35780636b6f0170146102fb57806370a0823114610308578063715018a61461033157600080fd5b8063313ce56714610293578063355274ea146102a2578063372500ab146102c857806339509351146102d057600080fd5b806318160ddd116101b857806318160ddd1461023857806323b872dd146102405780632622b64d146102535780632fbba1151461027e57600080fd5b80630245fcef146101df57806306fdde0314610200578063095ea7b314610215575b600080fd5b6101ed660c55f7bc011b0081565b6040519081526020015b60405180910390f35b610208610441565b6040516101f791906115ed565b6102286102233660046114aa565b6104d3565b60405190151581526020016101f7565b6002546101ed565b61022861024e36600461146e565b6104e9565b600b54610266906001600160a01b031681565b6040516001600160a01b0390911681526020016101f7565b61029161028c3660046115bb565b61059f565b005b604051601281526020016101f7565b7f00000000000000000000000000000000000000000000000000000000000000006101ed565b6102916105e7565b6102286102de3660046114aa565b61073e565b600a546102669061010090046001600160a01b031681565b600a546102289060ff1681565b6101ed610316366004611419565b6001600160a01b031660009081526020819052604090205490565b61029161077a565b6102916107b0565b6101ed61034f3660046115bb565b6107ed565b6101ed6103623660046115bb565b60076020526000908152604090205481565b6005546001600160a01b0316610266565b610208610847565b610291610856565b6102916103a33660046114aa565b6109ef565b6102286103b63660046114aa565b610a6c565b6102286103c93660046114aa565b610b05565b6101ed663157def0046c0081565b6101ed60085481565b6101ed6103f336600461143b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101ed610b12565b610291610c5b565b61029161043c366004611419565b610d6a565b606060038054610450906116e7565b80601f016020809104026020016040519081016040528092919081815260200182805461047c906116e7565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505050905090565b60006104e0338484610e02565b50600192915050565b6001600160a01b03831660009081526001602090815260408083203384529091528120546000198114610589578281101561057c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6105898533858403610e02565b610594858585610f27565b506001949350505050565b6005546001600160a01b031633146105c95760405162461bcd60e51b815260040161057390611642565b6105e4336105df83670de0b6b3a76400006116b1565b6110f5565b50565b6002600654141561063a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610573565b6002600655600a5460ff16151560011461065357600080fd5b61065f336105df610b12565b600a5460405162438b6360e81b815233600482015260009161010090046001600160a01b03169063438b63009060240160006040518083038186803b1580156106a757600080fd5b505afa1580156106bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e391908101906114d4565b905060005b815181101561073557426007600084848151811061070857610708611753565b6020026020010151815260200190815260200160002081905550808061072d90611722565b9150506106e8565b50506001600655565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104e0918590610775908690611677565b610e02565b6005546001600160a01b031633146107a45760405162461bcd60e51b815260040161057390611642565b6107ae6000611186565b565b6005546001600160a01b031633146107da5760405162461bcd60e51b815260040161057390611642565b42600955600a805460ff19166001179055565b60008181526007602052604081205481906108165760095461080f90426116d0565b9050610832565b60008381526007602052604090205461082f90426116d0565b90505b600061083f603c8361168f565b949350505050565b606060048054610450906116e7565b600260065414156108a95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610573565b6002600655600a5460ff16156108be57600080fd5b600b546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a91906115d4565b600b546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b15801561098d57600080fd5b505af11580156109a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c59190611599565b50600060646109d58360146116b1565b6109df919061168f565b9050610735336105df8385611677565b336001600160a01b03831614610a475760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f206e6f74206f776e20746865736520746f6b656e7300000000006044820152606401610573565b610a5182826111d8565b8060086000828254610a639190611677565b90915550505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610aee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610573565b610afb3385858403610e02565b5060019392505050565b60006104e0338484610f27565b600a5460405162438b6360e81b815233600482015260009182916101009091046001600160a01b03169063438b63009060240160006040518083038186803b158015610b5d57600080fd5b505afa158015610b71573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b9991908101906114d4565b90506000805b8251811015610c54576001838281518110610bbc57610bbc611753565b602002602001015111610c0e57663157def0046c00610bf3848381518110610be657610be6611753565b60200260200101516107ed565b610bfd91906116b1565b610c079083611677565b9150610c42565b660c55f7bc011b00610c2b848381518110610be657610be6611753565b610c3591906116b1565b610c3f9083611677565b91505b80610c4c81611722565b915050610b9f565b5092915050565b6005546001600160a01b03163314610c855760405162461bcd60e51b815260040161057390611642565b600b546040516370a0823160e01b815230600482018190526001600160a01b0390921691639dc29fac9183906370a082319060240160206040518083038186803b158015610cd257600080fd5b505afa158015610ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0a91906115d4565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610d5057600080fd5b505af1158015610d64573d6000803e3d6000fd5b50505050565b6005546001600160a01b03163314610d945760405162461bcd60e51b815260040161057390611642565b6001600160a01b038116610df95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610573565b6105e481611186565b6001600160a01b038316610e645760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610573565b6001600160a01b038216610ec55760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610573565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610f8b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610573565b6001600160a01b038216610fed5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610573565b6001600160a01b038316600090815260208190526040902054818110156110655760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610573565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061109c908490611677565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110e891815260200190565b60405180910390a3610d64565b7f00000000000000000000000000000000000000000000000000000000000000008161112060025490565b61112a9190611677565b11156111785760405162461bcd60e51b815260206004820152601960248201527f45524332304361707065643a20636170206578636565646564000000000000006044820152606401610573565b611182828261131e565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166112385760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610573565b6001600160a01b038216600090815260208190526040902054818110156112ac5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610573565b6001600160a01b03831660009081526020819052604081208383039055600280548492906112db9084906116d0565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610f1a565b6001600160a01b0382166113745760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610573565b80600260008282546113869190611677565b90915550506001600160a01b038216600090815260208190526040812080548392906113b3908490611677565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b80356001600160a01b038116811461141457600080fd5b919050565b60006020828403121561142b57600080fd5b611434826113fd565b9392505050565b6000806040838503121561144e57600080fd5b611457836113fd565b9150611465602084016113fd565b90509250929050565b60008060006060848603121561148357600080fd5b61148c846113fd565b925061149a602085016113fd565b9150604084013590509250925092565b600080604083850312156114bd57600080fd5b6114c6836113fd565b946020939093013593505050565b600060208083850312156114e757600080fd5b825167ffffffffffffffff808211156114ff57600080fd5b818501915085601f83011261151357600080fd5b81518181111561152557611525611769565b8060051b604051601f19603f8301168101818110858211171561154a5761154a611769565b604052828152858101935084860182860187018a101561156957600080fd5b600095505b8386101561158c57805185526001959095019493860193860161156e565b5098975050505050505050565b6000602082840312156115ab57600080fd5b8151801515811461143457600080fd5b6000602082840312156115cd57600080fd5b5035919050565b6000602082840312156115e657600080fd5b5051919050565b600060208083528351808285015260005b8181101561161a578581018301518582016040015282016115fe565b8181111561162c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561168a5761168a61173d565b500190565b6000826116ac57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156116cb576116cb61173d565b500290565b6000828210156116e2576116e261173d565b500390565b600181811c908216806116fb57607f821691505b6020821081141561171c57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156117365761173661173d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212201f9ad7807930ec628402c42edd99398f28ff6d3cbbf9304efc3c03543c7857a064736f6c6343000807003300000000000000000000000096316355c44be69414756d6706c61e61aecbd5f30000000000000000000000003ba5cb0c136d2bb99c3fcfe49a5adf2970be127d
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806371b0cbfa11610104578063a457c2d7116100a2578063dd62ed3e11610071578063dd62ed3e146103e5578063e60780151461041e578063e73b3d5a14610426578063f2fde38b1461042e57600080fd5b8063a457c2d7146103a8578063a9059cbb146103bb578063ae9c36ab146103ce578063d157e301146103dc57600080fd5b80638da5cb5b116100de5780638da5cb5b1461037457806395d89b41146103855780639d582e7d1461038d5780639dc29fac1461039557600080fd5b806371b0cbfa1461033957806379c58ea6146103415780638500e0d81461035457600080fd5b8063313ce5671161017c578063492037ac1161014b578063492037ac146102e35780636b6f0170146102fb57806370a0823114610308578063715018a61461033157600080fd5b8063313ce56714610293578063355274ea146102a2578063372500ab146102c857806339509351146102d057600080fd5b806318160ddd116101b857806318160ddd1461023857806323b872dd146102405780632622b64d146102535780632fbba1151461027e57600080fd5b80630245fcef146101df57806306fdde0314610200578063095ea7b314610215575b600080fd5b6101ed660c55f7bc011b0081565b6040519081526020015b60405180910390f35b610208610441565b6040516101f791906115ed565b6102286102233660046114aa565b6104d3565b60405190151581526020016101f7565b6002546101ed565b61022861024e36600461146e565b6104e9565b600b54610266906001600160a01b031681565b6040516001600160a01b0390911681526020016101f7565b61029161028c3660046115bb565b61059f565b005b604051601281526020016101f7565b7f00000000000000000000000000000000000000000048760583f6ec837e0000006101ed565b6102916105e7565b6102286102de3660046114aa565b61073e565b600a546102669061010090046001600160a01b031681565b600a546102289060ff1681565b6101ed610316366004611419565b6001600160a01b031660009081526020819052604090205490565b61029161077a565b6102916107b0565b6101ed61034f3660046115bb565b6107ed565b6101ed6103623660046115bb565b60076020526000908152604090205481565b6005546001600160a01b0316610266565b610208610847565b610291610856565b6102916103a33660046114aa565b6109ef565b6102286103b63660046114aa565b610a6c565b6102286103c93660046114aa565b610b05565b6101ed663157def0046c0081565b6101ed60085481565b6101ed6103f336600461143b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101ed610b12565b610291610c5b565b61029161043c366004611419565b610d6a565b606060038054610450906116e7565b80601f016020809104026020016040519081016040528092919081815260200182805461047c906116e7565b80156104c95780601f1061049e576101008083540402835291602001916104c9565b820191906000526020600020905b8154815290600101906020018083116104ac57829003601f168201915b5050505050905090565b60006104e0338484610e02565b50600192915050565b6001600160a01b03831660009081526001602090815260408083203384529091528120546000198114610589578281101561057c5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6105898533858403610e02565b610594858585610f27565b506001949350505050565b6005546001600160a01b031633146105c95760405162461bcd60e51b815260040161057390611642565b6105e4336105df83670de0b6b3a76400006116b1565b6110f5565b50565b6002600654141561063a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610573565b6002600655600a5460ff16151560011461065357600080fd5b61065f336105df610b12565b600a5460405162438b6360e81b815233600482015260009161010090046001600160a01b03169063438b63009060240160006040518083038186803b1580156106a757600080fd5b505afa1580156106bb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e391908101906114d4565b905060005b815181101561073557426007600084848151811061070857610708611753565b6020026020010151815260200190815260200160002081905550808061072d90611722565b9150506106e8565b50506001600655565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104e0918590610775908690611677565b610e02565b6005546001600160a01b031633146107a45760405162461bcd60e51b815260040161057390611642565b6107ae6000611186565b565b6005546001600160a01b031633146107da5760405162461bcd60e51b815260040161057390611642565b42600955600a805460ff19166001179055565b60008181526007602052604081205481906108165760095461080f90426116d0565b9050610832565b60008381526007602052604090205461082f90426116d0565b90505b600061083f603c8361168f565b949350505050565b606060048054610450906116e7565b600260065414156108a95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610573565b6002600655600a5460ff16156108be57600080fd5b600b546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a91906115d4565b600b546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd90606401602060405180830381600087803b15801561098d57600080fd5b505af11580156109a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109c59190611599565b50600060646109d58360146116b1565b6109df919061168f565b9050610735336105df8385611677565b336001600160a01b03831614610a475760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f206e6f74206f776e20746865736520746f6b656e7300000000006044820152606401610573565b610a5182826111d8565b8060086000828254610a639190611677565b90915550505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610aee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610573565b610afb3385858403610e02565b5060019392505050565b60006104e0338484610f27565b600a5460405162438b6360e81b815233600482015260009182916101009091046001600160a01b03169063438b63009060240160006040518083038186803b158015610b5d57600080fd5b505afa158015610b71573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b9991908101906114d4565b90506000805b8251811015610c54576001838281518110610bbc57610bbc611753565b602002602001015111610c0e57663157def0046c00610bf3848381518110610be657610be6611753565b60200260200101516107ed565b610bfd91906116b1565b610c079083611677565b9150610c42565b660c55f7bc011b00610c2b848381518110610be657610be6611753565b610c3591906116b1565b610c3f9083611677565b91505b80610c4c81611722565b915050610b9f565b5092915050565b6005546001600160a01b03163314610c855760405162461bcd60e51b815260040161057390611642565b600b546040516370a0823160e01b815230600482018190526001600160a01b0390921691639dc29fac9183906370a082319060240160206040518083038186803b158015610cd257600080fd5b505afa158015610ce6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0a91906115d4565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610d5057600080fd5b505af1158015610d64573d6000803e3d6000fd5b50505050565b6005546001600160a01b03163314610d945760405162461bcd60e51b815260040161057390611642565b6001600160a01b038116610df95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610573565b6105e481611186565b6001600160a01b038316610e645760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610573565b6001600160a01b038216610ec55760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610573565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610f8b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610573565b6001600160a01b038216610fed5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610573565b6001600160a01b038316600090815260208190526040902054818110156110655760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610573565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061109c908490611677565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110e891815260200190565b60405180910390a3610d64565b7f00000000000000000000000000000000000000000048760583f6ec837e0000008161112060025490565b61112a9190611677565b11156111785760405162461bcd60e51b815260206004820152601960248201527f45524332304361707065643a20636170206578636565646564000000000000006044820152606401610573565b611182828261131e565b5050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166112385760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610573565b6001600160a01b038216600090815260208190526040902054818110156112ac5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610573565b6001600160a01b03831660009081526020819052604081208383039055600280548492906112db9084906116d0565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610f1a565b6001600160a01b0382166113745760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610573565b80600260008282546113869190611677565b90915550506001600160a01b038216600090815260208190526040812080548392906113b3908490611677565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b80356001600160a01b038116811461141457600080fd5b919050565b60006020828403121561142b57600080fd5b611434826113fd565b9392505050565b6000806040838503121561144e57600080fd5b611457836113fd565b9150611465602084016113fd565b90509250929050565b60008060006060848603121561148357600080fd5b61148c846113fd565b925061149a602085016113fd565b9150604084013590509250925092565b600080604083850312156114bd57600080fd5b6114c6836113fd565b946020939093013593505050565b600060208083850312156114e757600080fd5b825167ffffffffffffffff808211156114ff57600080fd5b818501915085601f83011261151357600080fd5b81518181111561152557611525611769565b8060051b604051601f19603f8301168101818110858211171561154a5761154a611769565b604052828152858101935084860182860187018a101561156957600080fd5b600095505b8386101561158c57805185526001959095019493860193860161156e565b5098975050505050505050565b6000602082840312156115ab57600080fd5b8151801515811461143457600080fd5b6000602082840312156115cd57600080fd5b5035919050565b6000602082840312156115e657600080fd5b5051919050565b600060208083528351808285015260005b8181101561161a578581018301518582016040015282016115fe565b8181111561162c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561168a5761168a61173d565b500190565b6000826116ac57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156116cb576116cb61173d565b500290565b6000828210156116e2576116e261173d565b500390565b600181811c908216806116fb57607f821691505b6020821081141561171c57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156117365761173661173d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212201f9ad7807930ec628402c42edd99398f28ff6d3cbbf9304efc3c03543c7857a064736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000096316355c44be69414756d6706c61e61aecbd5f30000000000000000000000003ba5cb0c136d2bb99c3fcfe49a5adf2970be127d
-----Decoded View---------------
Arg [0] : CLABS (address): 0x96316355c44Be69414756D6706c61E61aECbD5f3
Arg [1] : CUT (address): 0x3BA5cB0C136D2bb99C3FcFe49A5aDF2970BE127d
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000096316355c44be69414756d6706c61e61aecbd5f3
Arg [1] : 0000000000000000000000003ba5cb0c136d2bb99c3fcfe49a5adf2970be127d
Deployed Bytecode Sourcemap
103951:3278:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;104200:55;;104236:19;104200:55;;;;;11122:25:1;;;11110:2;11095:18;104200:55:0;;;;;;;;77252:100;;;:::i;:::-;;;;;;;:::i;79592:169::-;;;;;;:::i;:::-;;:::i;:::-;;;4049:14:1;;4042:22;4024:41;;4012:2;3997:18;79592:169:0;3884:187:1;78372:108:0;78460:12;;78372:108;;80354:573;;;;;;:::i;:::-;;:::i;104374:30::-;;;;;-1:-1:-1;;;;;104374:30:0;;;;;;-1:-1:-1;;;;;3181:32:1;;;3163:51;;3151:2;3136:18;104374:30:0;3017:203:1;104626:123:0;;;;;;:::i;:::-;;:::i;:::-;;78214:93;;;78297:2;11300:36:1;;11288:2;11273:18;78214:93:0;11158:184:1;102838:83:0;102909:4;102838:83;;105691:327;;;:::i;81336:215::-;;;;;;:::i;:::-;;:::i;104339:28::-;;;;;;;;-1:-1:-1;;;;;104339:28:0;;;104296:34;;;;;;;;;78543:127;;;;;;:::i;:::-;-1:-1:-1;;;;;78644:18:0;78617:7;78644:18;;;;;;;;;;;;78543:127;70514:103;;;:::i;104757:130::-;;;:::i;106591:430::-;;;;;;:::i;:::-;;:::i;104031:49::-;;;;;;:::i;:::-;;;;;;;;;;;;;;69863:87;69936:6;;-1:-1:-1;;;;;69936:6:0;69863:87;;77471:104;;;:::i;105128:390::-;;;:::i;107029:189::-;;;;;;:::i;:::-;;:::i;82054:413::-;;;;;;:::i;:::-;;:::i;78883:175::-;;;;;;:::i;:::-;;:::i;104134:58::-;;104173:19;104134:58;;104089:36;;;;;;79121:151;;;;;;:::i;:::-;-1:-1:-1;;;;;79237:18:0;;;79210:7;79237:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;79121:151;106026:557;;;:::i;105526:129::-;;;:::i;70772:201::-;;;;;;:::i;:::-;;:::i;77252:100::-;77306:13;77339:5;77332:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;77252:100;:::o;79592:169::-;79675:4;79692:39;46842:10;79715:7;79724:6;79692:8;:39::i;:::-;-1:-1:-1;79749:4:0;79592:169;;;;:::o;80354:573::-;-1:-1:-1;;;;;80538:19:0;;80494:4;80538:19;;;:11;:19;;;;;;;;46842:10;80538:33;;;;;;;;-1:-1:-1;;80586:37:0;;80582:265;;80668:6;80648:16;:26;;80640:79;;;;-1:-1:-1;;;80640:79:0;;7715:2:1;80640:79:0;;;7697:21:1;7754:2;7734:18;;;7727:30;7793:34;7773:18;;;7766:62;-1:-1:-1;;;7844:18:1;;;7837:38;7892:19;;80640:79:0;;;;;;;;;80763:57;80772:6;46842:10;80813:6;80794:16;:25;80763:8;:57::i;:::-;80859:36;80869:6;80877:9;80888:6;80859:9;:36::i;:::-;-1:-1:-1;80915:4:0;;80354:573;-1:-1:-1;;;;80354:573:0:o;104626:123::-;69936:6;;-1:-1:-1;;;;;69936:6:0;46842:10;70083:23;70075:68;;;;-1:-1:-1;;;70075:68:0;;;;;;;:::i;:::-;104698:43:::1;104704:10;104717:22;:11:::0;104731:8:::1;104717:22;:::i;:::-;104698:5;:43::i;:::-;104626:123:::0;:::o;105691:327::-;43565:1;44163:7;;:19;;44155:63;;;;-1:-1:-1;;;44155:63:0;;10052:2:1;44155:63:0;;;10034:21:1;10091:2;10071:18;;;10064:30;10130:33;10110:18;;;10103:61;10181:18;;44155:63:0;9850:355:1;44155:63:0;43565:1;44296:7;:18;104947:14:::1;::::0;::::1;;:22;;:14:::0;:22:::1;104939:31;;;::::0;::::1;;105769:38:::2;105775:10;105787:19;:17;:19::i;105769:38::-;105852:10;::::0;:36:::2;::::0;-1:-1:-1;;;105852:36:0;;105877:10:::2;105852:36;::::0;::::2;3163:51:1::0;105828:21:0::2;::::0;105852:10:::2;::::0;::::2;-1:-1:-1::0;;;;;105852:10:0::2;::::0;:24:::2;::::0;3136:18:1;;105852:36:0::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;::::0;;::::2;-1:-1:-1::0;;105852:36:0::2;::::0;::::2;;::::0;::::2;::::0;;;::::2;::::0;::::2;:::i;:::-;105828:60;;105903:9;105899:112;105918:4;:11;105916:1;:13;105899:112;;;105984:15;105959:13;:22;105973:4;105978:1;105973:7;;;;;;;;:::i;:::-;;;;;;;105959:22;;;;;;;;;;;:40;;;;105930:3;;;;;:::i;:::-;;;;105899:112;;;-1:-1:-1::0;;43521:1:0;44475:7;:22;105691:327::o;81336:215::-;46842:10;81424:4;81473:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;81473:34:0;;;;;;;;;;81424:4;;81441:80;;81464:7;;81473:47;;81510:10;;81473:47;:::i;:::-;81441:8;:80::i;70514:103::-;69936:6;;-1:-1:-1;;;;;69936:6:0;46842:10;70083:23;70075:68;;;;-1:-1:-1;;;70075:68:0;;;;;;;:::i;:::-;70579:30:::1;70606:1;70579:18;:30::i;:::-;70514:103::o:0;104757:130::-;69936:6;;-1:-1:-1;;;;;69936:6:0;46842:10;70083:23;70075:68;;;;-1:-1:-1;;;70075:68:0;;;;;;;:::i;:::-;104832:15:::1;104814;:33:::0;104858:14:::1;:21:::0;;-1:-1:-1;;104858:21:0::1;104875:4;104858:21;::::0;;104757:130::o;106591:430::-;106654:7;106711:22;;;:13;:22;;;;;;106654:7;;106708:214;;106793:15;;106775:33;;:15;:33;:::i;:::-;106764:44;;106708:214;;;106888:22;;;;:13;:22;;;;;;106870:40;;:15;:40;:::i;:::-;106859:51;;106708:214;106942:18;106963:13;106974:2;106963:8;:13;:::i;:::-;106942:34;106591:430;-1:-1:-1;;;;106591:430:0:o;77471:104::-;77527:13;77560:7;77553:14;;;;;:::i;105128:390::-;43565:1;44163:7;;:19;;44155:63;;;;-1:-1:-1;;;44155:63:0;;10052:2:1;44155:63:0;;;10034:21:1;10091:2;10071:18;;;10064:30;10130:33;10110:18;;;10103:61;10181:18;;44155:63:0;9850:355:1;44155:63:0;43565:1;44296:7;:18;105047:14:::1;::::0;::::1;;:23;105039:32;;;::::0;::::1;;105231:11:::2;::::0;:33:::2;::::0;-1:-1:-1;;;105231:33:0;;105253:10:::2;105231:33;::::0;::::2;3163:51:1::0;105207:21:0::2;::::0;-1:-1:-1;;;;;105231:11:0::2;::::0;:21:::2;::::0;3136:18:1;;105231:33:0::2;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;105285:11;::::0;:66:::2;::::0;-1:-1:-1;;;105285:66:0;;105310:10:::2;105285:66;::::0;::::2;3465:34:1::0;105330:4:0::2;3515:18:1::0;;;3508:43;3567:18;;;3560:34;;;105207:57:0;;-1:-1:-1;;;;;;105285:11:0::2;::::0;:24:::2;::::0;3400:18:1;;105285:66:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;105385:22:0::2;105433:3;105411:18;:13:::0;105427:2:::2;105411:18;:::i;:::-;105410:26;;;;:::i;:::-;105385:51:::0;-1:-1:-1;105449:51:0::2;105455:10;105468:30;105385:51:::0;105468:13;:30:::2;:::i;107029:189::-:0;107103:10;-1:-1:-1;;;;;107103:19:0;;;107095:59;;;;-1:-1:-1;;;107095:59:0;;7359:2:1;107095:59:0;;;7341:21:1;7398:2;7378:18;;;7371:30;7437:29;7417:18;;;7410:57;7484:18;;107095:59:0;7157:351:1;107095:59:0;107159:21;107165:5;107172:7;107159:5;:21::i;:::-;107206:7;107185:17;;:28;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;107029:189:0:o;82054:413::-;46842:10;82147:4;82191:25;;;:11;:25;;;;;;;;-1:-1:-1;;;;;82191:34:0;;;;;;;;;;82244:35;;;;82236:85;;;;-1:-1:-1;;;82236:85:0;;10412:2:1;82236:85:0;;;10394:21:1;10451:2;10431:18;;;10424:30;10490:34;10470:18;;;10463:62;-1:-1:-1;;;10541:18:1;;;10534:35;10586:19;;82236:85:0;10210:401:1;82236:85:0;82357:67;46842:10;82380:7;82408:15;82389:16;:34;82357:8;:67::i;:::-;-1:-1:-1;82455:4:0;;82054:413;-1:-1:-1;;;82054:413:0:o;78883:175::-;78969:4;78986:42;46842:10;79010:9;79021:6;78986:9;:42::i;106026:557::-;106124:10;;:36;;-1:-1:-1;;;106124:36:0;;106149:10;106124:36;;;3163:51:1;106075:7:0;;;;106124:10;;;;-1:-1:-1;;;;;106124:10:0;;:24;;3136:18:1;;106124:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;106124:36:0;;;;;;;;;;;;:::i;:::-;106100:60;-1:-1:-1;106173:25:0;;106211:326;106230:4;:11;106228:1;:13;106211:326;;;106285:1;106274:4;106279:1;106274:7;;;;;;;;:::i;:::-;;;;;;;:12;106271:255;;104173:19;106342:25;106359:4;106364:1;106359:7;;;;;;;;:::i;:::-;;;;;;;106342:16;:25::i;:::-;:40;;;;:::i;:::-;106320:63;;;;:::i;:::-;;;106271:255;;;104236:19;106472:25;106489:4;106494:1;106489:7;;;;;;;;:::i;106472:25::-;:37;;;;:::i;:::-;106450:60;;;;:::i;:::-;;;106271:255;106242:3;;;;:::i;:::-;;;;106211:326;;;-1:-1:-1;106556:17:0;106026:557;-1:-1:-1;;106026:557:0:o;105526:129::-;69936:6;;-1:-1:-1;;;;;69936:6:0;46842:10;70083:23;70075:68;;;;-1:-1:-1;;;70075:68:0;;;;;;;:::i;:::-;105578:11:::1;::::0;105610:36:::1;::::0;-1:-1:-1;;;105610:36:0;;105603:4:::1;105610:36;::::0;::::1;3163:51:1::0;;;-1:-1:-1;;;;;105578:11:0;;::::1;::::0;:16:::1;::::0;:11;;105610:21:::1;::::0;3136:18:1;;105610:36:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;105578:69;::::0;-1:-1:-1;;;;;;105578:69:0::1;::::0;;;;;;-1:-1:-1;;;;;3797:32:1;;;105578:69:0::1;::::0;::::1;3779:51:1::0;3846:18;;;3839:34;3752:18;;105578:69:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;105526:129::o:0;70772:201::-;69936:6;;-1:-1:-1;;;;;69936:6:0;46842:10;70083:23;70075:68;;;;-1:-1:-1;;;70075:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;70861:22:0;::::1;70853:73;;;::::0;-1:-1:-1;;;70853:73:0;;6142:2:1;70853:73:0::1;::::0;::::1;6124:21:1::0;6181:2;6161:18;;;6154:30;6220:34;6200:18;;;6193:62;-1:-1:-1;;;6271:18:1;;;6264:36;6317:19;;70853:73:0::1;5940:402:1::0;70853:73:0::1;70937:28;70956:8;70937:18;:28::i;85738:380::-:0;-1:-1:-1;;;;;85874:19:0;;85866:68;;;;-1:-1:-1;;;85866:68:0;;9647:2:1;85866:68:0;;;9629:21:1;9686:2;9666:18;;;9659:30;9725:34;9705:18;;;9698:62;-1:-1:-1;;;9776:18:1;;;9769:34;9820:19;;85866:68:0;9445:400:1;85866:68:0;-1:-1:-1;;;;;85953:21:0;;85945:68;;;;-1:-1:-1;;;85945:68:0;;6549:2:1;85945:68:0;;;6531:21:1;6588:2;6568:18;;;6561:30;6627:34;6607:18;;;6600:62;-1:-1:-1;;;6678:18:1;;;6671:32;6720:19;;85945:68:0;6347:398:1;85945:68:0;-1:-1:-1;;;;;86026:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;86078:32;;11122:25:1;;;86078:32:0;;11095:18:1;86078:32:0;;;;;;;;85738:380;;;:::o;82957:733::-;-1:-1:-1;;;;;83097:20:0;;83089:70;;;;-1:-1:-1;;;83089:70:0;;8887:2:1;83089:70:0;;;8869:21:1;8926:2;8906:18;;;8899:30;8965:34;8945:18;;;8938:62;-1:-1:-1;;;9016:18:1;;;9009:35;9061:19;;83089:70:0;8685:401:1;83089:70:0;-1:-1:-1;;;;;83178:23:0;;83170:71;;;;-1:-1:-1;;;83170:71:0;;5335:2:1;83170:71:0;;;5317:21:1;5374:2;5354:18;;;5347:30;5413:34;5393:18;;;5386:62;-1:-1:-1;;;5464:18:1;;;5457:33;5507:19;;83170:71:0;5133:399:1;83170:71:0;-1:-1:-1;;;;;83338:17:0;;83314:21;83338:17;;;;;;;;;;;83374:23;;;;83366:74;;;;-1:-1:-1;;;83366:74:0;;6952:2:1;83366:74:0;;;6934:21:1;6991:2;6971:18;;;6964:30;7030:34;7010:18;;;7003:62;-1:-1:-1;;;7081:18:1;;;7074:36;7127:19;;83366:74:0;6750:402:1;83366:74:0;-1:-1:-1;;;;;83476:17:0;;;:9;:17;;;;;;;;;;;83496:22;;;83476:42;;83540:20;;;;;;;;:30;;83512:6;;83476:9;83540:30;;83512:6;;83540:30;:::i;:::-;;;;;;;;83605:9;-1:-1:-1;;;;;83588:35:0;83597:6;-1:-1:-1;;;;;83588:35:0;;83616:6;83588:35;;;;11122:25:1;;11110:2;11095:18;;10976:177;83588:35:0;;;;;;;;83636:46;84709:591;102979:207;102909:4;103094:6;103072:19;78460:12;;;78372:108;103072:19;:28;;;;:::i;:::-;:37;;103064:75;;;;-1:-1:-1;;;103064:75:0;;9293:2:1;103064:75:0;;;9275:21:1;9332:2;9312:18;;;9305:30;9371:27;9351:18;;;9344:55;9416:18;;103064:75:0;9091:349:1;103064:75:0;103150:28;103162:7;103171:6;103150:11;:28::i;:::-;102979:207;;:::o;71133:191::-;71226:6;;;-1:-1:-1;;;;;71243:17:0;;;-1:-1:-1;;;;;;71243:17:0;;;;;;;71276:40;;71226:6;;;71243:17;71226:6;;71276:40;;71207:16;;71276:40;71196:128;71133:191;:::o;84709:591::-;-1:-1:-1;;;;;84793:21:0;;84785:67;;;;-1:-1:-1;;;84785:67:0;;8485:2:1;84785:67:0;;;8467:21:1;8524:2;8504:18;;;8497:30;8563:34;8543:18;;;8536:62;-1:-1:-1;;;8614:18:1;;;8607:31;8655:19;;84785:67:0;8283:397:1;84785:67:0;-1:-1:-1;;;;;84952:18:0;;84927:22;84952:18;;;;;;;;;;;84989:24;;;;84981:71;;;;-1:-1:-1;;;84981:71:0;;5739:2:1;84981:71:0;;;5721:21:1;5778:2;5758:18;;;5751:30;5817:34;5797:18;;;5790:62;-1:-1:-1;;;5868:18:1;;;5861:32;5910:19;;84981:71:0;5537:398:1;84981:71:0;-1:-1:-1;;;;;85088:18:0;;:9;:18;;;;;;;;;;85109:23;;;85088:44;;85154:12;:22;;85126:6;;85088:9;85154:22;;85126:6;;85154:22;:::i;:::-;;;;-1:-1:-1;;85194:37:0;;11122:25:1;;;85220:1:0;;-1:-1:-1;;;;;85194:37:0;;;;;11110:2:1;11095:18;85194:37:0;10976:177:1;83977:399:0;-1:-1:-1;;;;;84061:21:0;;84053:65;;;;-1:-1:-1;;;84053:65:0;;10818:2:1;84053:65:0;;;10800:21:1;10857:2;10837:18;;;10830:30;10896:33;10876:18;;;10869:61;10947:18;;84053:65:0;10616:355:1;84053:65:0;84209:6;84193:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;;84226:18:0;;:9;:18;;;;;;;;;;:28;;84248:6;;84226:9;:28;;84248:6;;84226:28;:::i;:::-;;;;-1:-1:-1;;84270:37:0;;11122:25:1;;;-1:-1:-1;;;;;84270:37:0;;;84287:1;;84270:37;;11110:2:1;11095:18;84270:37:0;;;;;;;102979:207;;:::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:186::-;251:6;304:2;292:9;283:7;279:23;275:32;272:52;;;320:1;317;310:12;272:52;343:29;362:9;343:29;:::i;:::-;333:39;192:186;-1:-1:-1;;;192:186:1:o;383:260::-;451:6;459;512:2;500:9;491:7;487:23;483:32;480:52;;;528:1;525;518:12;480:52;551:29;570:9;551:29;:::i;:::-;541:39;;599:38;633:2;622:9;618:18;599:38;:::i;:::-;589:48;;383:260;;;;;:::o;648:328::-;725:6;733;741;794:2;782:9;773:7;769:23;765:32;762:52;;;810:1;807;800:12;762:52;833:29;852:9;833:29;:::i;:::-;823:39;;881:38;915:2;904:9;900:18;881:38;:::i;:::-;871:48;;966:2;955:9;951:18;938:32;928:42;;648:328;;;;;:::o;981:254::-;1049:6;1057;1110:2;1098:9;1089:7;1085:23;1081:32;1078:52;;;1126:1;1123;1116:12;1078:52;1149:29;1168:9;1149:29;:::i;:::-;1139:39;1225:2;1210:18;;;;1197:32;;-1:-1:-1;;;981:254:1:o;1240:1116::-;1335:6;1366:2;1409;1397:9;1388:7;1384:23;1380:32;1377:52;;;1425:1;1422;1415:12;1377:52;1458:9;1452:16;1487:18;1528:2;1520:6;1517:14;1514:34;;;1544:1;1541;1534:12;1514:34;1582:6;1571:9;1567:22;1557:32;;1627:7;1620:4;1616:2;1612:13;1608:27;1598:55;;1649:1;1646;1639:12;1598:55;1678:2;1672:9;1700:2;1696;1693:10;1690:36;;;1706:18;;:::i;:::-;1752:2;1749:1;1745:10;1784:2;1778:9;1847:2;1843:7;1838:2;1834;1830:11;1826:25;1818:6;1814:38;1902:6;1890:10;1887:22;1882:2;1870:10;1867:18;1864:46;1861:72;;;1913:18;;:::i;:::-;1949:2;1942:22;1999:18;;;2033:15;;;;-1:-1:-1;2068:11:1;;;2098;;;2094:20;;2091:33;-1:-1:-1;2088:53:1;;;2137:1;2134;2127:12;2088:53;2159:1;2150:10;;2169:156;2183:2;2180:1;2177:9;2169:156;;;2240:10;;2228:23;;2201:1;2194:9;;;;;2271:12;;;;2303;;2169:156;;;-1:-1:-1;2344:6:1;1240:1116;-1:-1:-1;;;;;;;;1240:1116:1:o;2361:277::-;2428:6;2481:2;2469:9;2460:7;2456:23;2452:32;2449:52;;;2497:1;2494;2487:12;2449:52;2529:9;2523:16;2582:5;2575:13;2568:21;2561:5;2558:32;2548:60;;2604:1;2601;2594:12;2643:180;2702:6;2755:2;2743:9;2734:7;2730:23;2726:32;2723:52;;;2771:1;2768;2761:12;2723:52;-1:-1:-1;2794:23:1;;2643:180;-1:-1:-1;2643:180:1:o;2828:184::-;2898:6;2951:2;2939:9;2930:7;2926:23;2922:32;2919:52;;;2967:1;2964;2957:12;2919:52;-1:-1:-1;2990:16:1;;2828:184;-1:-1:-1;2828:184:1:o;4531:597::-;4643:4;4672:2;4701;4690:9;4683:21;4733:6;4727:13;4776:6;4771:2;4760:9;4756:18;4749:34;4801:1;4811:140;4825:6;4822:1;4819:13;4811:140;;;4920:14;;;4916:23;;4910:30;4886:17;;;4905:2;4882:26;4875:66;4840:10;;4811:140;;;4969:6;4966:1;4963:13;4960:91;;;5039:1;5034:2;5025:6;5014:9;5010:22;5006:31;4999:42;4960:91;-1:-1:-1;5112:2:1;5091:15;-1:-1:-1;;5087:29:1;5072:45;;;;5119:2;5068:54;;4531:597;-1:-1:-1;;;4531:597:1:o;7922:356::-;8124:2;8106:21;;;8143:18;;;8136:30;8202:34;8197:2;8182:18;;8175:62;8269:2;8254:18;;7922:356::o;11347:128::-;11387:3;11418:1;11414:6;11411:1;11408:13;11405:39;;;11424:18;;:::i;:::-;-1:-1:-1;11460:9:1;;11347:128::o;11480:217::-;11520:1;11546;11536:132;;11590:10;11585:3;11581:20;11578:1;11571:31;11625:4;11622:1;11615:15;11653:4;11650:1;11643:15;11536:132;-1:-1:-1;11682:9:1;;11480:217::o;11702:168::-;11742:7;11808:1;11804;11800:6;11796:14;11793:1;11790:21;11785:1;11778:9;11771:17;11767:45;11764:71;;;11815:18;;:::i;:::-;-1:-1:-1;11855:9:1;;11702:168::o;11875:125::-;11915:4;11943:1;11940;11937:8;11934:34;;;11948:18;;:::i;:::-;-1:-1:-1;11985:9:1;;11875:125::o;12005:380::-;12084:1;12080:12;;;;12127;;;12148:61;;12202:4;12194:6;12190:17;12180:27;;12148:61;12255:2;12247:6;12244:14;12224:18;12221:38;12218:161;;;12301:10;12296:3;12292:20;12289:1;12282:31;12336:4;12333:1;12326:15;12364:4;12361:1;12354:15;12218:161;;12005:380;;;:::o;12390:135::-;12429:3;-1:-1:-1;;12450:17:1;;12447:43;;;12470:18;;:::i;:::-;-1:-1:-1;12517:1:1;12506:13;;12390:135::o;12530:127::-;12591:10;12586:3;12582:20;12579:1;12572:31;12622:4;12619:1;12612:15;12646:4;12643:1;12636:15;12662:127;12723:10;12718:3;12714:20;12711:1;12704:31;12754:4;12751:1;12744:15;12778:4;12775:1;12768:15;12794:127;12855:10;12850:3;12846:20;12843:1;12836:31;12886:4;12883:1;12876:15;12910:4;12907:1;12900:15
Swarm Source
ipfs://1f9ad7807930ec628402c42edd99398f28ff6d3cbbf9304efc3c03543c7857a0
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.