Spend less on fees, more on crypto. Buy crypto easily with MoonPay Balance. 20M+ users trust MoonPay worldwide.
Don’t invest unless you’re prepared to lose all the money you invest.
3000+ Slots, 20+ Cryptos, 75K Raffle, Sports Promos - World's largest Crypto Casino & Sportsbook - Provably Fair!
Play in crypto to make deposits and withdrawals easy! Register and get a free daily shot at a 100 000 $ jackpot.
Monthly Wagering Contest - $500,000+ rewards. Provably Fair, Low House Edge and best VIP Program!
Daily free Spin 50000 Matic ,760% Deposit Bonus, 20%Rakeback, And Get 1000000 Matic free bonus on BC.Game
Deposit BONUS 300% and Cashbacks. without verification!
Holidays are coming soon! Start betting on 1xBit and get a secret gift from Santa!
Overview
POL Balance
POL Value
$0.00Token Holdings
Could not find any matches!
Latest 25 from a total of 755 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Set Prompt | 49452703 | 2023-11-02 12:06:24 | 413 days ago | 1698926784 | IN | 0 POL$0.00 | 0.02143631 | 131 | ||||
Set Prompt | 49446128 | 2023-11-02 8:06:35 | 413 days ago | 1698912395 | IN | 0 POL$0.00 | 0.01381497 | 125.8 | ||||
Set Prompt | 49415682 | 2023-11-01 13:50:03 | 414 days ago | 1698846603 | IN | 0 POL$0.00 | 0.00491446 | 95.02424843 | ||||
Set Prompt | 49415673 | 2023-11-01 13:49:43 | 414 days ago | 1698846583 | IN | 0 POL$0.00 | 0.01502708 | 91.8862926 | ||||
Set Prompt | 49402212 | 2023-11-01 5:35:20 | 414 days ago | 1698816920 | IN | 0 POL$0.00 | 0.00745657 | 67.9 | ||||
Set Prompt | 49352009 | 2023-10-30 23:29:59 | 416 days ago | 1698708599 | IN | 0 POL$0.00 | 0.00879634 | 80.1 | ||||
Set Prompt | 49311726 | 2023-10-29 23:21:20 | 417 days ago | 1698621680 | IN | 0 POL$0.00 | 0.00527027 | 84.4 | ||||
Set Prompt | 49303871 | 2023-10-29 18:33:43 | 417 days ago | 1698604423 | IN | 0 POL$0.00 | 0.00633806 | 101.5 | ||||
Set Prompt | 49290477 | 2023-10-29 10:20:04 | 417 days ago | 1698574804 | IN | 0 POL$0.00 | 0.00774234 | 70.29487043 | ||||
Set Prompt | 49284494 | 2023-10-29 6:40:23 | 417 days ago | 1698561623 | IN | 0 POL$0.00 | 0.01117148 | 48.31058172 | ||||
Set Prompt | 49279847 | 2023-10-29 3:53:56 | 417 days ago | 1698551636 | IN | 0 POL$0.00 | 0.01650377 | 71.42543983 | ||||
Set Prompt | 49279810 | 2023-10-29 3:52:38 | 417 days ago | 1698551558 | IN | 0 POL$0.00 | 0.00458063 | 73.10307133 | ||||
Set Prompt | 49279796 | 2023-10-29 3:52:07 | 417 days ago | 1698551527 | IN | 0 POL$0.00 | 0.01185567 | 72.39309253 | ||||
Set Prompt | 49279740 | 2023-10-29 3:50:07 | 417 days ago | 1698551407 | IN | 0 POL$0.00 | 0.0199779 | 72.21077979 | ||||
Set Prompt | 49279618 | 2023-10-29 3:45:49 | 417 days ago | 1698551149 | IN | 0 POL$0.00 | 0.00742421 | 74.31124168 | ||||
Set Prompt | 49279599 | 2023-10-29 3:45:01 | 417 days ago | 1698551101 | IN | 0 POL$0.00 | 0.00722575 | 65.6153465 | ||||
Set Prompt | 49279573 | 2023-10-29 3:44:07 | 417 days ago | 1698551047 | IN | 0 POL$0.00 | 0.0068531 | 67.53555518 | ||||
Set Prompt | 49279559 | 2023-10-29 3:43:37 | 417 days ago | 1698551017 | IN | 0 POL$0.00 | 0.00413093 | 66.12244821 | ||||
Set Prompt | 49279344 | 2023-10-29 3:36:01 | 417 days ago | 1698550561 | IN | 0 POL$0.00 | 0.01132435 | 67.96760202 | ||||
Set Prompt | 49279254 | 2023-10-29 3:32:49 | 417 days ago | 1698550369 | IN | 0 POL$0.00 | 0.00435848 | 72.72020489 | ||||
Set Prompt | 49279230 | 2023-10-29 3:31:55 | 417 days ago | 1698550315 | IN | 0 POL$0.00 | 0.00991285 | 71.62049968 | ||||
Set Prompt | 49265705 | 2023-10-28 19:18:57 | 418 days ago | 1698520737 | IN | 0 POL$0.00 | 0.00772722 | 78 | ||||
Set Prompt | 49240024 | 2023-10-28 3:56:49 | 418 days ago | 1698465409 | IN | 0 POL$0.00 | 0.00922462 | 84 | ||||
Set Prompt | 49192341 | 2023-10-26 23:11:29 | 420 days ago | 1698361889 | IN | 0 POL$0.00 | 0.0055138 | 88.3 | ||||
Set Prompt | 49152783 | 2023-10-25 23:28:29 | 421 days ago | 1698276509 | IN | 0 POL$0.00 | 0.00598837 | 95.9 |
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import {Proxied} from "./vendor/hardhat-deploy/Proxied.sol"; import {ILensHub} from "./vendor/lens/ILensHub.sol"; import { AddressUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import { EnumerableSetUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; struct Prompt { uint256 profileId; string prompt; } contract LensGelatoGPT is Proxied { using AddressUpgradeable for address payable; using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet; ILensHub public immutable lensHub; address public immutable dedicatedMsgSender; uint256 public fee = 0 ether; mapping(uint256 => string) public promptByProfileId; EnumerableSetUpgradeable.UintSet private _profileIds; EnumerableSetUpgradeable.UintSet private _newProfileIds; constructor(ILensHub _lensHub, address _dedicatedMsgSender) { lensHub = _lensHub; dedicatedMsgSender = _dedicatedMsgSender; } modifier onlyProfileOwner(uint256 _profileId) { require( msg.sender == lensHub.ownerOf(_profileId), "LensGelatoGPT.onlyProfileOwner" ); _; } modifier onlyDedicatedMsgSender() { require( msg.sender == dedicatedMsgSender, "LensGelatoGPT.onlyDedicatedMsgSender" ); _; } function setFee(uint256 _fee) external onlyProxyAdmin { fee = _fee; } function collectFee(address payable _to) external onlyProxyAdmin { _to.sendValue(address(this).balance); } function setPrompt( uint256 _profileId, string calldata _prompt ) external payable onlyProfileOwner(_profileId) { require(msg.value == fee, "LensGelatoGPT.setPrompt: fee"); require( bytes(_prompt).length <= 160, "LensGelatoGPT.setPrompt: length" ); require( lensHub.getDispatcher(_profileId) == dedicatedMsgSender, "LensGelatoGPT.setPrompt: dispatcher" ); _newProfileIds.add(_profileId); _profileIds.add(_profileId); promptByProfileId[_profileId] = _prompt; } function stopPrompt( uint256 _profileId ) external onlyProfileOwner(_profileId) { require( _profileIds.contains(_profileId), "LensGelatoGPT.stopPrompt: 404" ); _newProfileIds.remove(_profileId); _profileIds.remove(_profileId); delete promptByProfileId[_profileId]; } function removeNewProfileIds( uint256[] calldata __profileIds ) external onlyDedicatedMsgSender { for (uint256 i = 0; i < __profileIds.length; i++) { _newProfileIds.remove(__profileIds[i]); } for (uint256 i = 0; i < __profileIds.length; i++) { if (__profileIds[i] == 0) { _newProfileIds.remove(__profileIds[i]); } } } function getPaginatedPrompts( uint256 _from, uint256 _to ) external view returns (Prompt[] memory prompts) { require(_from < _to, "LensGelatoGPT.getPaginatedPrompts: _to"); require( _from <= _profileIds.length(), "LensGelatoGPT.getPaginatedPrompts: _from" ); if (_to >= _profileIds.length()) _to = _profileIds.length(); prompts = new Prompt[](_to - _from); for (uint256 i = _from; i < _to; i++) { uint256 profileId = _profileIds.at(i); // Filter out users with wrong Dispatcher on Lens if (lensHub.getDispatcher(profileId) != dedicatedMsgSender) continue; prompts[i - _from] = Prompt( profileId, promptByProfileId[profileId] ); } } function getNewPrompts() external view returns (Prompt[] memory prompts) { uint256 length = _newProfileIds.length(); prompts = new Prompt[](length); for (uint256 i = 0; i < length; i++) { uint256 newProfileId = _newProfileIds.at(i); // Filter out users with wrong Dispatcher on Lens if (lensHub.getDispatcher(newProfileId) != dedicatedMsgSender) continue; prompts[i] = Prompt(newProfileId, promptByProfileId[newProfileId]); } } function getProfileIds() external view returns (uint256[] memory) { return _profileIds.values(); } function getNewProfileIds() external view returns (uint256[] memory) { return _newProfileIds.values(); } function getTotalNumberOfProfiles() external view returns (uint256) { return _profileIds.length(); } function areThereNewProfileIds() external view returns (bool) { return _newProfileIds.length() > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. 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. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSetUpgradeable { // 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) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // 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; /// @solidity memory-safe-assembly 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 in 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; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Proxied { /// @notice to be used by initialisation / postUpgrade function so that only the proxy's admin can execute them /// It also allows these functions to be called inside a contructor /// even if the contract is meant to be used without proxy modifier proxied() { address proxyAdminAddress = _proxyAdmin(); // With hardhat-deploy proxies // the proxyAdminAddress is zero only for the implementation contract // if the implementation contract want to be used as a standalone/immutable contract // it simply has to execute the `proxied` function // This ensure the proxyAdminAddress is never zero post deployment // And allow you to keep the same code for both proxied contract and immutable contract if (proxyAdminAddress == address(0)) { // ensure can not be called twice when used outside of proxy : no admin // solhint-disable-next-line security/no-inline-assembly assembly { sstore( 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF ) } } else { require(msg.sender == proxyAdminAddress); } _; } modifier onlyProxyAdmin() { require(msg.sender == _proxyAdmin(), "NOT_AUTHORIZED"); _; } function _proxyAdmin() internal view returns (address ownerAddress) { // solhint-disable-next-line security/no-inline-assembly assembly { ownerAddress := sload( 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103 ) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; /** * @title DataTypes * @author Lens Protocol * * @notice A standard library of data types used throughout the Lens Protocol. */ library DataTypes { /** * @notice An enum containing the different states the protocol can be in, limiting certain actions. * * @param Unpaused The fully unpaused state. * @param PublishingPaused The state where only publication creation functions are paused. * @param Paused The fully paused state. */ enum ProtocolState { Unpaused, PublishingPaused, Paused } /** * @notice An enum specifically used in a helper function to easily retrieve the publication type for integrations. * * @param Post A standard post, having a URI, a collect module but no pointer to another publication. * @param Comment A comment, having a URI, a collect module and a pointer to another publication. * @param Mirror A mirror, having a pointer to another publication, but no URI or collect module. * @param Nonexistent An indicator showing the queried publication does not exist. */ enum PubType { Post, Comment, Mirror, Nonexistent } /** * @notice A struct containing the necessary information to reconstruct an EIP-712 typed data signature. * * @param v The signature's recovery parameter. * @param r The signature's r parameter. * @param s The signature's s parameter * @param deadline The signature's deadline */ struct EIP712Signature { uint8 v; bytes32 r; bytes32 s; uint256 deadline; } /** * @notice A struct containing profile data. * * @param pubCount The number of publications made to this profile. * @param followModule The address of the current follow module in use by this profile, can be empty. * @param followNFT The address of the followNFT associated with this profile, can be empty.. * @param handle The profile's associated handle. * @param imageURI The URI to be used for the profile's image. * @param followNFTURI The URI to be used for the follow NFT. */ struct ProfileStruct { uint256 pubCount; address followModule; address followNFT; string handle; string imageURI; string followNFTURI; } /** * @notice A struct containing data associated with each new publication. * * @param profileIdPointed The profile token ID this publication points to, for mirrors and comments. * @param pubIdPointed The publication ID this publication points to, for mirrors and comments. * @param contentURI The URI associated with this publication. * @param referenceModule The address of the current reference module in use by this publication, can be empty. * @param collectModule The address of the collect module associated with this publication, this exists for all publication. * @param collectNFT The address of the collectNFT associated with this publication, if any. */ struct PublicationStruct { uint256 profileIdPointed; uint256 pubIdPointed; string contentURI; address referenceModule; address collectModule; address collectNFT; } /** * @notice A struct containing the parameters required for the `createProfile()` function. * * @param to The address receiving the profile. * @param handle The handle to set for the profile, must be unique and non-empty. * @param imageURI The URI to set for the profile image. * @param followModule The follow module to use, can be the zero address. * @param followModuleInitData The follow module initialization data, if any. * @param followNFTURI The URI to use for the follow NFT. */ struct CreateProfileData { address to; string handle; string imageURI; address followModule; bytes followModuleInitData; string followNFTURI; } /** * @notice A struct containing the parameters required for the `setDefaultProfileWithSig()` function. Parameters are * the same as the regular `setDefaultProfile()` function, with an added EIP712Signature. * * @param wallet The address of the wallet setting the default profile. * @param profileId The token ID of the profile which will be set as default, or zero. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct SetDefaultProfileWithSigData { address wallet; uint256 profileId; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `setFollowModuleWithSig()` function. Parameters are * the same as the regular `setFollowModule()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile to change the followModule for. * @param followModule The followModule to set for the given profile, must be whitelisted. * @param followModuleInitData The data to be passed to the followModule for initialization. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct SetFollowModuleWithSigData { uint256 profileId; address followModule; bytes followModuleInitData; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `setDispatcherWithSig()` function. Parameters are the same * as the regular `setDispatcher()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile to set the dispatcher for. * @param dispatcher The dispatcher address to set for the profile. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct SetDispatcherWithSigData { uint256 profileId; address dispatcher; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `setProfileImageURIWithSig()` function. Parameters are the same * as the regular `setProfileImageURI()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile to set the URI for. * @param imageURI The URI to set for the given profile image. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct SetProfileImageURIWithSigData { uint256 profileId; string imageURI; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `setFollowNFTURIWithSig()` function. Parameters are the same * as the regular `setFollowNFTURI()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile for which to set the followNFT URI. * @param followNFTURI The follow NFT URI to set. * @param sig The EIP712Signature struct containing the followNFT's associated profile owner's signature. */ struct SetFollowNFTURIWithSigData { uint256 profileId; string followNFTURI; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `post()` function. * * @param profileId The token ID of the profile to publish to. * @param contentURI The URI to set for this new publication. * @param collectModule The collect module to set for this new publication. * @param collectModuleInitData The data to pass to the collect module's initialization. * @param referenceModule The reference module to set for the given publication, must be whitelisted. * @param referenceModuleInitData The data to be passed to the reference module for initialization. */ struct PostData { uint256 profileId; string contentURI; address collectModule; bytes collectModuleInitData; address referenceModule; bytes referenceModuleInitData; } /** * @notice A struct containing the parameters required for the `postWithSig()` function. Parameters are the same as * the regular `post()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile to publish to. * @param contentURI The URI to set for this new publication. * @param collectModule The collectModule to set for this new publication. * @param collectModuleInitData The data to pass to the collectModule's initialization. * @param referenceModule The reference module to set for the given publication, must be whitelisted. * @param referenceModuleInitData The data to be passed to the reference module for initialization. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct PostWithSigData { uint256 profileId; string contentURI; address collectModule; bytes collectModuleInitData; address referenceModule; bytes referenceModuleInitData; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `comment()` function. * * @param profileId The token ID of the profile to publish to. * @param contentURI The URI to set for this new publication. * @param profileIdPointed The profile token ID to point the comment to. * @param pubIdPointed The publication ID to point the comment to. * @param referenceModuleData The data passed to the reference module. * @param collectModule The collect module to set for this new publication. * @param collectModuleInitData The data to pass to the collect module's initialization. * @param referenceModule The reference module to set for the given publication, must be whitelisted. * @param referenceModuleInitData The data to be passed to the reference module for initialization. */ struct CommentData { uint256 profileId; string contentURI; uint256 profileIdPointed; uint256 pubIdPointed; bytes referenceModuleData; address collectModule; bytes collectModuleInitData; address referenceModule; bytes referenceModuleInitData; } /** * @notice A struct containing the parameters required for the `commentWithSig()` function. Parameters are the same as * the regular `comment()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile to publish to. * @param contentURI The URI to set for this new publication. * @param profileIdPointed The profile token ID to point the comment to. * @param pubIdPointed The publication ID to point the comment to. * @param referenceModuleData The data passed to the reference module. * @param collectModule The collectModule to set for this new publication. * @param collectModuleInitData The data to pass to the collectModule's initialization. * @param referenceModule The reference module to set for the given publication, must be whitelisted. * @param referenceModuleInitData The data to be passed to the reference module for initialization. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct CommentWithSigData { uint256 profileId; string contentURI; uint256 profileIdPointed; uint256 pubIdPointed; bytes referenceModuleData; address collectModule; bytes collectModuleInitData; address referenceModule; bytes referenceModuleInitData; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `mirror()` function. * * @param profileId The token ID of the profile to publish to. * @param profileIdPointed The profile token ID to point the mirror to. * @param pubIdPointed The publication ID to point the mirror to. * @param referenceModuleData The data passed to the reference module. * @param referenceModule The reference module to set for the given publication, must be whitelisted. * @param referenceModuleInitData The data to be passed to the reference module for initialization. */ struct MirrorData { uint256 profileId; uint256 profileIdPointed; uint256 pubIdPointed; bytes referenceModuleData; address referenceModule; bytes referenceModuleInitData; } /** * @notice A struct containing the parameters required for the `mirrorWithSig()` function. Parameters are the same as * the regular `mirror()` function, with an added EIP712Signature. * * @param profileId The token ID of the profile to publish to. * @param profileIdPointed The profile token ID to point the mirror to. * @param pubIdPointed The publication ID to point the mirror to. * @param referenceModuleData The data passed to the reference module. * @param referenceModule The reference module to set for the given publication, must be whitelisted. * @param referenceModuleInitData The data to be passed to the reference module for initialization. * @param sig The EIP712Signature struct containing the profile owner's signature. */ struct MirrorWithSigData { uint256 profileId; uint256 profileIdPointed; uint256 pubIdPointed; bytes referenceModuleData; address referenceModule; bytes referenceModuleInitData; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `followWithSig()` function. Parameters are the same * as the regular `follow()` function, with the follower's (signer) address and an EIP712Signature added. * * @param follower The follower which is the message signer. * @param profileIds The array of token IDs of the profiles to follow. * @param datas The array of arbitrary data to pass to the followModules if needed. * @param sig The EIP712Signature struct containing the follower's signature. */ struct FollowWithSigData { address follower; uint256[] profileIds; bytes[] datas; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `collectWithSig()` function. Parameters are the same as * the regular `collect()` function, with the collector's (signer) address and an EIP712Signature added. * * @param collector The collector which is the message signer. * @param profileId The token ID of the profile that published the publication to collect. * @param pubId The publication to collect's publication ID. * @param data The arbitrary data to pass to the collectModule if needed. * @param sig The EIP712Signature struct containing the collector's signature. */ struct CollectWithSigData { address collector; uint256 profileId; uint256 pubId; bytes data; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `setProfileMetadataWithSig()` function. * * @param profileId The profile ID for which to set the metadata. * @param metadata The metadata string to set for the profile and user. * @param sig The EIP712Signature struct containing the user's signature. */ struct SetProfileMetadataWithSigData { uint256 profileId; string metadata; EIP712Signature sig; } /** * @notice A struct containing the parameters required for the `toggleFollowWithSig()` function. * * @param follower The follower which is the message signer. * @param profileIds The token ID array of the profiles. * @param enables The array of booleans to enable/disable follows. * @param sig The EIP712Signature struct containing the follower's signature. */ struct ToggleFollowWithSigData { address follower; uint256[] profileIds; bool[] enables; EIP712Signature sig; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import {DataTypes} from "./DataTypes.sol"; /** * @title ILensHub * @author Lens Protocol * * @notice This is the interface for the LensHub contract, the main entry point for the Lens Protocol. * You'll find all the events and external functions, as well as the reasoning behind them here. */ interface ILensHub { /** * @notice Initializes the LensHub NFT, setting the initial governance address as well as the name and symbol in * the LensNFTBase contract. * * @param name The name to set for the hub NFT. * @param symbol The symbol to set for the hub NFT. * @param newGovernance The governance address to set. */ function initialize( string calldata name, string calldata symbol, address newGovernance ) external; function ownerOf(uint256) external view returns (address); /** * @notice Sets the privileged governance role. This function can only be called by the current governance * address. * * @param newGovernance The new governance address to set. */ function setGovernance(address newGovernance) external; /** * @notice Sets the emergency admin, which is a permissioned role able to set the protocol state. This function * can only be called by the governance address. * * @param newEmergencyAdmin The new emergency admin address to set. */ function setEmergencyAdmin(address newEmergencyAdmin) external; /** * @notice Sets the protocol state to either a global pause, a publishing pause or an unpaused state. This function * can only be called by the governance address or the emergency admin address. * * Note that this reverts if the emergency admin calls it if: * 1. The emergency admin is attempting to unpause. * 2. The emergency admin is calling while the protocol is already paused. * * @param newState The state to set, as a member of the ProtocolState enum. */ function setState(DataTypes.ProtocolState newState) external; /** * @notice Adds or removes a profile creator from the whitelist. This function can only be called by the current * governance address. * * @param profileCreator The profile creator address to add or remove from the whitelist. * @param whitelist Whether or not the profile creator should be whitelisted. */ function whitelistProfileCreator( address profileCreator, bool whitelist ) external; /** * @notice Adds or removes a follow module from the whitelist. This function can only be called by the current * governance address. * * @param followModule The follow module contract address to add or remove from the whitelist. * @param whitelist Whether or not the follow module should be whitelisted. */ function whitelistFollowModule( address followModule, bool whitelist ) external; /** * @notice Adds or removes a reference module from the whitelist. This function can only be called by the current * governance address. * * @param referenceModule The reference module contract to add or remove from the whitelist. * @param whitelist Whether or not the reference module should be whitelisted. */ function whitelistReferenceModule( address referenceModule, bool whitelist ) external; /** * @notice Adds or removes a collect module from the whitelist. This function can only be called by the current * governance address. * * @param collectModule The collect module contract address to add or remove from the whitelist. * @param whitelist Whether or not the collect module should be whitelisted. */ function whitelistCollectModule( address collectModule, bool whitelist ) external; /** * @notice Creates a profile with the specified parameters, minting a profile NFT to the given recipient. This * function must be called by a whitelisted profile creator. * * @param vars A CreateProfileData struct containing the following params: * to: The address receiving the profile. * handle: The handle to set for the profile, must be unique and non-empty. * imageURI: The URI to set for the profile image. * followModule: The follow module to use, can be the zero address. * followModuleInitData: The follow module initialization data, if any. */ function createProfile( DataTypes.CreateProfileData calldata vars ) external returns (uint256); /** * @notice Sets the mapping between wallet and its main profile identity. * * @param profileId The token ID of the profile to set as the main profile identity. */ function setDefaultProfile(uint256 profileId) external; /** * @notice Sets the mapping between wallet and its main profile identity via signature with the specified parameters. * * @param vars A SetDefaultProfileWithSigData struct, including the regular parameters and an EIP712Signature struct. */ function setDefaultProfileWithSig( DataTypes.SetDefaultProfileWithSigData calldata vars ) external; /** * @notice Sets a profile's follow module, must be called by the profile owner. * * @param profileId The token ID of the profile to set the follow module for. * @param followModule The follow module to set for the given profile, must be whitelisted. * @param followModuleInitData The data to be passed to the follow module for initialization. */ function setFollowModule( uint256 profileId, address followModule, bytes calldata followModuleInitData ) external; /** * @notice Sets a profile's follow module via signature with the specified parameters. * * @param vars A SetFollowModuleWithSigData struct, including the regular parameters and an EIP712Signature struct. */ function setFollowModuleWithSig( DataTypes.SetFollowModuleWithSigData calldata vars ) external; /** * @notice Sets a profile's dispatcher, giving that dispatcher rights to publish to that profile. * * @param profileId The token ID of the profile of the profile to set the dispatcher for. * @param dispatcher The dispatcher address to set for the given profile ID. */ function setDispatcher(uint256 profileId, address dispatcher) external; /** * @notice Sets a profile's dispatcher via signature with the specified parameters. * * @param vars A SetDispatcherWithSigData struct, including the regular parameters and an EIP712Signature struct. */ function setDispatcherWithSig( DataTypes.SetDispatcherWithSigData calldata vars ) external; /** * @notice Sets a profile's URI, which is reflected in the `tokenURI()` function. * * @param profileId The token ID of the profile of the profile to set the URI for. * @param imageURI The URI to set for the given profile. */ function setProfileImageURI( uint256 profileId, string calldata imageURI ) external; /** * @notice Sets a profile's URI via signature with the specified parameters. * * @param vars A SetProfileImageURIWithSigData struct, including the regular parameters and an EIP712Signature struct. */ function setProfileImageURIWithSig( DataTypes.SetProfileImageURIWithSigData calldata vars ) external; /** * @notice Sets a followNFT URI for a given profile's follow NFT. * * @param profileId The token ID of the profile for which to set the followNFT URI. * @param followNFTURI The follow NFT URI to set. */ function setFollowNFTURI( uint256 profileId, string calldata followNFTURI ) external; /** * @notice Sets a followNFT URI via signature with the specified parameters. * * @param vars A SetFollowNFTURIWithSigData struct, including the regular parameters and an EIP712Signature struct. */ function setFollowNFTURIWithSig( DataTypes.SetFollowNFTURIWithSigData calldata vars ) external; /** * @notice Publishes a post to a given profile, must be called by the profile owner. * * @param vars A PostData struct containing the needed parameters. * * @return uint256 An integer representing the post's publication ID. */ function post(DataTypes.PostData calldata vars) external returns (uint256); /** * @notice Publishes a post to a given profile via signature with the specified parameters. * * @param vars A PostWithSigData struct containing the regular parameters and an EIP712Signature struct. * * @return uint256 An integer representing the post's publication ID. */ function postWithSig( DataTypes.PostWithSigData calldata vars ) external returns (uint256); /** * @notice Publishes a comment to a given profile, must be called by the profile owner. * * @param vars A CommentData struct containing the needed parameters. * * @return uint256 An integer representing the comment's publication ID. */ function comment( DataTypes.CommentData calldata vars ) external returns (uint256); /** * @notice Publishes a comment to a given profile via signature with the specified parameters. * * @param vars A CommentWithSigData struct containing the regular parameters and an EIP712Signature struct. * * @return uint256 An integer representing the comment's publication ID. */ function commentWithSig( DataTypes.CommentWithSigData calldata vars ) external returns (uint256); /** * @notice Publishes a mirror to a given profile, must be called by the profile owner. * * @param vars A MirrorData struct containing the necessary parameters. * * @return uint256 An integer representing the mirror's publication ID. */ function mirror( DataTypes.MirrorData calldata vars ) external returns (uint256); /** * @notice Publishes a mirror to a given profile via signature with the specified parameters. * * @param vars A MirrorWithSigData struct containing the regular parameters and an EIP712Signature struct. * * @return uint256 An integer representing the mirror's publication ID. */ function mirrorWithSig( DataTypes.MirrorWithSigData calldata vars ) external returns (uint256); /** * @notice Follows the given profiles, executing each profile's follow module logic (if any) and minting followNFTs to the caller. * * NOTE: Both the `profileIds` and `datas` arrays must be of the same length, regardless if the profiles do not have a follow module set. * * @param profileIds The token ID array of the profiles to follow. * @param datas The arbitrary data array to pass to the follow module for each profile if needed. * * @return uint256[] An array of integers representing the minted follow NFTs token IDs. */ function follow( uint256[] calldata profileIds, bytes[] calldata datas ) external returns (uint256[] memory); /** * @notice Follows a given profile via signature with the specified parameters. * * @param vars A FollowWithSigData struct containing the regular parameters as well as the signing follower's address * and an EIP712Signature struct. * * @return uint256[] An array of integers representing the minted follow NFTs token IDs. */ function followWithSig( DataTypes.FollowWithSigData calldata vars ) external returns (uint256[] memory); /** * @notice Collects a given publication, executing collect module logic and minting a collectNFT to the caller. * * @param profileId The token ID of the profile that published the publication to collect. * @param pubId The publication to collect's publication ID. * @param data The arbitrary data to pass to the collect module if needed. * * @return uint256 An integer representing the minted token ID. */ function collect( uint256 profileId, uint256 pubId, bytes calldata data ) external returns (uint256); /** * @notice Collects a given publication via signature with the specified parameters. * * @param vars A CollectWithSigData struct containing the regular parameters as well as the collector's address and * an EIP712Signature struct. * * @return uint256 An integer representing the minted token ID. */ function collectWithSig( DataTypes.CollectWithSigData calldata vars ) external returns (uint256); /** * @dev Helper function to emit a detailed followNFT transfer event from the hub, to be consumed by frontends to track * followNFT transfers. * * @param profileId The token ID of the profile associated with the followNFT being transferred. * @param followNFTId The followNFT being transferred's token ID. * @param from The address the followNFT is being transferred from. * @param to The address the followNFT is being transferred to. */ function emitFollowNFTTransferEvent( uint256 profileId, uint256 followNFTId, address from, address to ) external; /** * @dev Helper function to emit a detailed collectNFT transfer event from the hub, to be consumed by frontends to track * collectNFT transfers. * * @param profileId The token ID of the profile associated with the collect NFT being transferred. * @param pubId The publication ID associated with the collect NFT being transferred. * @param collectNFTId The collectNFT being transferred's token ID. * @param from The address the collectNFT is being transferred from. * @param to The address the collectNFT is being transferred to. */ function emitCollectNFTTransferEvent( uint256 profileId, uint256 pubId, uint256 collectNFTId, address from, address to ) external; /// ************************ /// *****VIEW FUNCTIONS***** /// ************************ /** * @notice Returns whether or not a profile creator is whitelisted. * * @param profileCreator The address of the profile creator to check. * * @return bool True if the profile creator is whitelisted, false otherwise. */ function isProfileCreatorWhitelisted( address profileCreator ) external view returns (bool); /** * @notice Returns default profile for a given wallet address * * @param wallet The address to find the default mapping * * @return uint256 The default profile id, which will be 0 if not mapped. */ function defaultProfile(address wallet) external view returns (uint256); /** * @notice Returns whether or not a follow module is whitelisted. * * @param followModule The address of the follow module to check. * * @return bool True if the the follow module is whitelisted, false otherwise. */ function isFollowModuleWhitelisted( address followModule ) external view returns (bool); /** * @notice Returns whether or not a reference module is whitelisted. * * @param referenceModule The address of the reference module to check. * * @return bool True if the the reference module is whitelisted, false otherwise. */ function isReferenceModuleWhitelisted( address referenceModule ) external view returns (bool); /** * @notice Returns whether or not a collect module is whitelisted. * * @param collectModule The address of the collect module to check. * * @return bool True if the the collect module is whitelisted, false otherwise. */ function isCollectModuleWhitelisted( address collectModule ) external view returns (bool); /** * @notice Returns the currently configured governance address. * * @return address The address of the currently configured governance. */ function getGovernance() external view returns (address); /** * @notice Returns the dispatcher associated with a profile. * * @param profileId The token ID of the profile to query the dispatcher for. * * @return address The dispatcher address associated with the profile. */ function getDispatcher(uint256 profileId) external view returns (address); /** * @notice Returns the publication count for a given profile. * * @param profileId The token ID of the profile to query. * * @return uint256 The number of publications associated with the queried profile. */ function getPubCount(uint256 profileId) external view returns (uint256); /** * @notice Returns the followNFT associated with a given profile, if any. * * @param profileId The token ID of the profile to query the followNFT for. * * @return address The followNFT associated with the given profile. */ function getFollowNFT(uint256 profileId) external view returns (address); /** * @notice Returns the followNFT URI associated with a given profile. * * @param profileId The token ID of the profile to query the followNFT URI for. * * @return string The followNFT URI associated with the given profile. */ function getFollowNFTURI( uint256 profileId ) external view returns (string memory); /** * @notice Returns the collectNFT associated with a given publication, if any. * * @param profileId The token ID of the profile that published the publication to query. * @param pubId The publication ID of the publication to query. * * @return address The address of the collectNFT associated with the queried publication. */ function getCollectNFT( uint256 profileId, uint256 pubId ) external view returns (address); /** * @notice Returns the follow module associated witha given profile, if any. * * @param profileId The token ID of the profile to query the follow module for. * * @return address The address of the follow module associated with the given profile. */ function getFollowModule(uint256 profileId) external view returns (address); /** * @notice Returns the collect module associated with a given publication. * * @param profileId The token ID of the profile that published the publication to query. * @param pubId The publication ID of the publication to query. * * @return address The address of the collect module associated with the queried publication. */ function getCollectModule( uint256 profileId, uint256 pubId ) external view returns (address); /** * @notice Returns the reference module associated witha given profile, if any. * * @param profileId The token ID of the profile that published the publication to querythe reference module for. * @param pubId The publication ID of the publication to query the reference module for. * * @return address The address of the reference module associated with the given profile. */ function getReferenceModule( uint256 profileId, uint256 pubId ) external view returns (address); /** * @notice Returns the handle associated with a profile. * * @param profileId The token ID of the profile to query the handle for. * * @return string The handle associated with the profile. */ function getHandle(uint256 profileId) external view returns (string memory); /** * @notice Returns the publication pointer (profileId & pubId) associated with a given publication. * * @param profileId The token ID of the profile that published the publication to query the pointer for. * @param pubId The publication ID of the publication to query the pointer for. * * @return tuple First, the profile ID of the profile the current publication is pointing to, second, the * publication ID of the publication the current publication is pointing to. */ function getPubPointer( uint256 profileId, uint256 pubId ) external view returns (uint256, uint256); /** * @notice Returns the URI associated with a given publication. * * @param profileId The token ID of the profile that published the publication to query. * @param pubId The publication ID of the publication to query. * * @return string The URI associated with a given publication. */ function getContentURI( uint256 profileId, uint256 pubId ) external view returns (string memory); /** * @notice Returns the profile token ID according to a given handle. * * @param handle The handle to resolve the profile token ID with. * * @return uint256 The profile ID the passed handle points to. */ function getProfileIdByHandle( string calldata handle ) external view returns (uint256); /** * @notice Returns the full profile struct associated with a given profile token ID. * * @param profileId The token ID of the profile to query. * * @return ProfileStruct The profile struct of the given profile. */ function getProfile( uint256 profileId ) external view returns (DataTypes.ProfileStruct memory); /** * @notice Returns the full publication struct for a given publication. * * @param profileId The token ID of the profile that published the publication to query. * @param pubId The publication ID of the publication to query. * * @return PublicationStruct The publication struct associated with the queried publication. */ function getPub( uint256 profileId, uint256 pubId ) external view returns (DataTypes.PublicationStruct memory); /** * @notice Returns the publication type associated with a given publication. * * @param profileId The token ID of the profile that published the publication to query. * @param pubId The publication ID of the publication to query. * * @return PubType The publication type, as a member of an enum (either "post," "comment" or "mirror"). */ function getPubType( uint256 profileId, uint256 pubId ) external view returns (DataTypes.PubType); /** * @notice Returns the follow NFT implementation address. * * @return address The follow NFT implementation address. */ function getFollowNFTImpl() external view returns (address); /** * @notice Returns the collect NFT implementation address. * * @return address The collect NFT implementation address. */ function getCollectNFTImpl() external view returns (address); struct TokenData { address owner; uint96 mintTimestamp; } /** * @notice Returns the token data associated with a given NFT. This allows fetching the token owner and * mint timestamp in a single call. * * @param tokenId The token ID of the NFT to query the token data for. * * @return TokenData token data struct containing both the owner address and the mint timestamp. */ function tokenDataOf( uint256 tokenId ) external view returns (TokenData memory); /** * @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 the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"inputs":[{"internalType":"contract ILensHub","name":"_lensHub","type":"address"},{"internalType":"address","name":"_dedicatedMsgSender","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"areThereNewProfileIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"collectFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dedicatedMsgSender","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNewProfileIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNewPrompts","outputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"prompt","type":"string"}],"internalType":"struct Prompt[]","name":"prompts","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getPaginatedPrompts","outputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"prompt","type":"string"}],"internalType":"struct Prompt[]","name":"prompts","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProfileIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalNumberOfProfiles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lensHub","outputs":[{"internalType":"contract ILensHub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"promptByProfileId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"__profileIds","type":"uint256[]"}],"name":"removeNewProfileIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_profileId","type":"uint256"},{"internalType":"string","name":"_prompt","type":"string"}],"name":"setPrompt","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_profileId","type":"uint256"}],"name":"stopPrompt","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052600080553480156200001557600080fd5b50604051620018f8380380620018f8833981016040819052620000389162000069565b6001600160a01b039182166080521660a052620000a8565b6001600160a01b03811681146200006657600080fd5b50565b600080604083850312156200007d57600080fd5b82516200008a8162000050565b60208401519092506200009d8162000050565b809150509250929050565b60805160a0516117eb6200010d60003960008181610129015281816104570152818161088701528181610bc50152610e7d0152600081816102ab01528181610481015281816108b101528181610a5d01528181610d060152610ea701526117eb6000f3fe6080604052600436106100e85760003560e01c806370455b7f1161008a578063b02cfdc311610059578063b02cfdc314610299578063ddca3f43146102cd578063f65d7234146102e3578063f7f7a5a7146102f857600080fd5b806370455b7f14610216578063738eaf12146102395780637b2d9e40146102595780639019f8b01461027957600080fd5b80634f103884116100c65780634f103884146101855780635d343dbf146101b257806369b59e75146101d457806369fe0e2d146101f657600080fd5b806323df61a4146100ed57806328f150eb14610117578063470c477b14610163575b600080fd5b3480156100f957600080fd5b5061010261030b565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061014b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161010e565b34801561016f57600080fd5b5061017861031e565b60405161010e919061135d565b34801561019157600080fd5b506101a56101a03660046113a1565b61032f565b60405161010e9190611400565b3480156101be57600080fd5b506101c76103c9565b60405161010e9190611413565b3480156101e057600080fd5b506101f46101ef36600461149c565b610608565b005b34801561020257600080fd5b506101f46102113660046113a1565b610696565b34801561022257600080fd5b5061022b61070e565b60405190815260200161010e565b34801561024557600080fd5b506101c76102543660046114b9565b61071a565b34801561026557600080fd5b506101f46102743660046113a1565b610a45565b34801561028557600080fd5b506101f46102943660046114db565b610bba565b3480156102a557600080fd5b5061014b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102d957600080fd5b5061022b60005481565b3480156102ef57600080fd5b50610178610ce2565b6101f4610306366004611550565b610cee565b6000806103186004610fce565b11905090565b606061032a6002610fde565b905090565b60016020526000908152604090208054610348906115cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610374906115cc565b80156103c15780601f10610396576101008083540402835291602001916103c1565b820191906000526020600020905b8154815290600101906020018083116103a457829003601f168201915b505050505081565b606060006103d76004610fce565b90508067ffffffffffffffff8111156103f2576103f2611606565b60405190808252806020026020018201604052801561043857816020015b6040805180820190915260008152606060208201528152602001906001900390816104105790505b50915060005b81811015610603576000610453600483610ff2565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663540528b9836040518263ffffffff1660e01b81526004016104cd91815260200190565b602060405180830381865afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e919061161c565b6001600160a01b03161461052257506105f1565b6040518060400160405280828152602001600160008481526020019081526020016000208054610551906115cc565b80601f016020809104026020016040519081016040528092919081815260200182805461057d906115cc565b80156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b50505050508152508483815181106105e4576105e4611639565b6020026020010181905250505b806105fb81611665565b91505061043e565b505090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316336001600160a01b0316146106805760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b6106936001600160a01b03821647610ffe565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316336001600160a01b0316146107095760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610677565b600055565b600061032a6002610fce565b606081831061077a5760405162461bcd60e51b815260206004820152602660248201527f4c656e7347656c61746f4750542e676574506167696e6174656450726f6d7074604482015265733a205f746f60d01b6064820152608401610677565b6107846002610fce565b8311156107e45760405162461bcd60e51b815260206004820152602860248201527f4c656e7347656c61746f4750542e676574506167696e6174656450726f6d7074604482015267733a205f66726f6d60c01b6064820152608401610677565b6107ee6002610fce565b8210610801576107fe6002610fce565b91505b61080b838361167e565b67ffffffffffffffff81111561082357610823611606565b60405190808252806020026020018201604052801561086957816020015b6040805180820190915260008152606060208201528152602001906001900390816108415790505b509050825b82811015610a3e576000610883600283610ff2565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663540528b9836040518263ffffffff1660e01b81526004016108fd91815260200190565b602060405180830381865afa15801561091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e919061161c565b6001600160a01b0316146109525750610a2c565b6040518060400160405280828152602001600160008481526020019081526020016000208054610981906115cc565b80601f01602080910402602001604051908101604052809291908181526020018280546109ad906115cc565b80156109fa5780601f106109cf576101008083540402835291602001916109fa565b820191906000526020600020905b8154815290600101906020018083116109dd57829003601f168201915b5050505050815250838684610a0f919061167e565b81518110610a1f57610a1f611639565b6020026020010181905250505b80610a3681611665565b91505061086e565b5092915050565b6040516331a9108f60e11b81526004810182905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad0919061161c565b6001600160a01b0316336001600160a01b031614610b305760405162461bcd60e51b815260206004820152601e60248201527f4c656e7347656c61746f4750542e6f6e6c7950726f66696c654f776e657200006044820152606401610677565b610b3b600283611117565b610b875760405162461bcd60e51b815260206004820152601d60248201527f4c656e7347656c61746f4750542e73746f7050726f6d70743a203430340000006044820152606401610677565b610b9260048361112f565b50610b9e60028361112f565b506000828152600160205260408120610bb69161130f565b5050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c3e5760405162461bcd60e51b8152602060048201526024808201527f4c656e7347656c61746f4750542e6f6e6c794465646963617465644d73675365604482015263373232b960e11b6064820152608401610677565b60005b81811015610c8857610c75838383818110610c5e57610c5e611639565b90506020020135600461112f90919063ffffffff16565b5080610c8081611665565b915050610c41565b5060005b81811015610cdd57828282818110610ca657610ca6611639565b90506020020135600003610ccb57610cc9838383818110610c5e57610c5e611639565b505b80610cd581611665565b915050610c8c565b505050565b606061032a6004610fde565b6040516331a9108f60e11b81526004810184905283907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015610d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d79919061161c565b6001600160a01b0316336001600160a01b031614610dd95760405162461bcd60e51b815260206004820152601e60248201527f4c656e7347656c61746f4750542e6f6e6c7950726f66696c654f776e657200006044820152606401610677565b6000543414610e2a5760405162461bcd60e51b815260206004820152601c60248201527f4c656e7347656c61746f4750542e73657450726f6d70743a20666565000000006044820152606401610677565b60a0821115610e7b5760405162461bcd60e51b815260206004820152601f60248201527f4c656e7347656c61746f4750542e73657450726f6d70743a206c656e677468006044820152606401610677565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663540528b9866040518263ffffffff1660e01b8152600401610ef391815260200190565b602060405180830381865afa158015610f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f34919061161c565b6001600160a01b031614610f965760405162461bcd60e51b815260206004820152602360248201527f4c656e7347656c61746f4750542e73657450726f6d70743a20646973706174636044820152623432b960e91b6064820152608401610677565b610fa160048561113b565b50610fad60028561113b565b506000848152600160205260409020610fc78385836116df565b5050505050565b6000610fd8825490565b92915050565b60606000610feb83611147565b9392505050565b6000610feb83836111a3565b8047101561104e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610677565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461109b576040519150601f19603f3d011682016040523d82523d6000602084013e6110a0565b606091505b5050905080610cdd5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610677565b60008181526001830160205260408120541515610feb565b6000610feb83836111cd565b6000610feb83836112c0565b60608160000180548060200260200160405190810160405280929190818152602001828054801561119757602002820191906000526020600020905b815481526020019060010190808311611183575b50505050509050919050565b60008260000182815481106111ba576111ba611639565b9060005260206000200154905092915050565b600081815260018301602052604081205480156112b65760006111f160018361167e565b85549091506000906112059060019061167e565b905081811461126a57600086600001828154811061122557611225611639565b906000526020600020015490508087600001848154811061124857611248611639565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061127b5761127b61179f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610fd8565b6000915050610fd8565b600081815260018301602052604081205461130757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610fd8565b506000610fd8565b50805461131b906115cc565b6000825580601f1061132b575050565b601f01602090049060005260206000209081019061069391905b808211156113595760008155600101611345565b5090565b6020808252825182820181905260009190848201906040850190845b8181101561139557835183529284019291840191600101611379565b50909695505050505050565b6000602082840312156113b357600080fd5b5035919050565b6000815180845260005b818110156113e0576020818501810151868301820152016113c4565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610feb60208301846113ba565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561147957888303603f19018552815180518452870151878401879052611466878501826113ba565b958801959350509086019060010161143a565b509098975050505050505050565b6001600160a01b038116811461069357600080fd5b6000602082840312156114ae57600080fd5b8135610feb81611487565b600080604083850312156114cc57600080fd5b50508035926020909101359150565b600080602083850312156114ee57600080fd5b823567ffffffffffffffff8082111561150657600080fd5b818501915085601f83011261151a57600080fd5b81358181111561152957600080fd5b8660208260051b850101111561153e57600080fd5b60209290920196919550909350505050565b60008060006040848603121561156557600080fd5b83359250602084013567ffffffffffffffff8082111561158457600080fd5b818601915086601f83011261159857600080fd5b8135818111156115a757600080fd5b8760208285010111156115b957600080fd5b6020830194508093505050509250925092565b600181811c908216806115e057607f821691505b60208210810361160057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561162e57600080fd5b8151610feb81611487565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016116775761167761164f565b5060010190565b81810381811115610fd857610fd861164f565b601f821115610cdd57600081815260208120601f850160051c810160208610156116b85750805b601f850160051c820191505b818110156116d7578281556001016116c4565b505050505050565b67ffffffffffffffff8311156116f7576116f7611606565b61170b8361170583546115cc565b83611691565b6000601f84116001811461173f57600085156117275750838201355b600019600387901b1c1916600186901b178355610fc7565b600083815260209020601f19861690835b828110156117705786850135825560209485019460019092019101611750565b508682101561178d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603160045260246000fdfea26469706673582212207e4fa7f523c5914ed18a3baf68fd6337a32f9d735aafef835c7acd32f9c4f0bc64736f6c63430008120033000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd225
Deployed Bytecode
0x6080604052600436106100e85760003560e01c806370455b7f1161008a578063b02cfdc311610059578063b02cfdc314610299578063ddca3f43146102cd578063f65d7234146102e3578063f7f7a5a7146102f857600080fd5b806370455b7f14610216578063738eaf12146102395780637b2d9e40146102595780639019f8b01461027957600080fd5b80634f103884116100c65780634f103884146101855780635d343dbf146101b257806369b59e75146101d457806369fe0e2d146101f657600080fd5b806323df61a4146100ed57806328f150eb14610117578063470c477b14610163575b600080fd5b3480156100f957600080fd5b5061010261030b565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b5061014b7f000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd22581565b6040516001600160a01b03909116815260200161010e565b34801561016f57600080fd5b5061017861031e565b60405161010e919061135d565b34801561019157600080fd5b506101a56101a03660046113a1565b61032f565b60405161010e9190611400565b3480156101be57600080fd5b506101c76103c9565b60405161010e9190611413565b3480156101e057600080fd5b506101f46101ef36600461149c565b610608565b005b34801561020257600080fd5b506101f46102113660046113a1565b610696565b34801561022257600080fd5b5061022b61070e565b60405190815260200161010e565b34801561024557600080fd5b506101c76102543660046114b9565b61071a565b34801561026557600080fd5b506101f46102743660046113a1565b610a45565b34801561028557600080fd5b506101f46102943660046114db565b610bba565b3480156102a557600080fd5b5061014b7f000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d81565b3480156102d957600080fd5b5061022b60005481565b3480156102ef57600080fd5b50610178610ce2565b6101f4610306366004611550565b610cee565b6000806103186004610fce565b11905090565b606061032a6002610fde565b905090565b60016020526000908152604090208054610348906115cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610374906115cc565b80156103c15780601f10610396576101008083540402835291602001916103c1565b820191906000526020600020905b8154815290600101906020018083116103a457829003601f168201915b505050505081565b606060006103d76004610fce565b90508067ffffffffffffffff8111156103f2576103f2611606565b60405190808252806020026020018201604052801561043857816020015b6040805180820190915260008152606060208201528152602001906001900390816104105790505b50915060005b81811015610603576000610453600483610ff2565b90507f000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd2256001600160a01b03167f000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d6001600160a01b031663540528b9836040518263ffffffff1660e01b81526004016104cd91815260200190565b602060405180830381865afa1580156104ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050e919061161c565b6001600160a01b03161461052257506105f1565b6040518060400160405280828152602001600160008481526020019081526020016000208054610551906115cc565b80601f016020809104026020016040519081016040528092919081815260200182805461057d906115cc565b80156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b50505050508152508483815181106105e4576105e4611639565b6020026020010181905250505b806105fb81611665565b91505061043e565b505090565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316336001600160a01b0316146106805760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b6106936001600160a01b03821647610ffe565b50565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b0316336001600160a01b0316146107095760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610677565b600055565b600061032a6002610fce565b606081831061077a5760405162461bcd60e51b815260206004820152602660248201527f4c656e7347656c61746f4750542e676574506167696e6174656450726f6d7074604482015265733a205f746f60d01b6064820152608401610677565b6107846002610fce565b8311156107e45760405162461bcd60e51b815260206004820152602860248201527f4c656e7347656c61746f4750542e676574506167696e6174656450726f6d7074604482015267733a205f66726f6d60c01b6064820152608401610677565b6107ee6002610fce565b8210610801576107fe6002610fce565b91505b61080b838361167e565b67ffffffffffffffff81111561082357610823611606565b60405190808252806020026020018201604052801561086957816020015b6040805180820190915260008152606060208201528152602001906001900390816108415790505b509050825b82811015610a3e576000610883600283610ff2565b90507f000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd2256001600160a01b03167f000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d6001600160a01b031663540528b9836040518263ffffffff1660e01b81526004016108fd91815260200190565b602060405180830381865afa15801561091a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093e919061161c565b6001600160a01b0316146109525750610a2c565b6040518060400160405280828152602001600160008481526020019081526020016000208054610981906115cc565b80601f01602080910402602001604051908101604052809291908181526020018280546109ad906115cc565b80156109fa5780601f106109cf576101008083540402835291602001916109fa565b820191906000526020600020905b8154815290600101906020018083116109dd57829003601f168201915b5050505050815250838684610a0f919061167e565b81518110610a1f57610a1f611639565b6020026020010181905250505b80610a3681611665565b91505061086e565b5092915050565b6040516331a9108f60e11b81526004810182905281907f000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d6001600160a01b031690636352211e90602401602060405180830381865afa158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad0919061161c565b6001600160a01b0316336001600160a01b031614610b305760405162461bcd60e51b815260206004820152601e60248201527f4c656e7347656c61746f4750542e6f6e6c7950726f66696c654f776e657200006044820152606401610677565b610b3b600283611117565b610b875760405162461bcd60e51b815260206004820152601d60248201527f4c656e7347656c61746f4750542e73746f7050726f6d70743a203430340000006044820152606401610677565b610b9260048361112f565b50610b9e60028361112f565b506000828152600160205260408120610bb69161130f565b5050565b336001600160a01b037f000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd2251614610c3e5760405162461bcd60e51b8152602060048201526024808201527f4c656e7347656c61746f4750542e6f6e6c794465646963617465644d73675365604482015263373232b960e11b6064820152608401610677565b60005b81811015610c8857610c75838383818110610c5e57610c5e611639565b90506020020135600461112f90919063ffffffff16565b5080610c8081611665565b915050610c41565b5060005b81811015610cdd57828282818110610ca657610ca6611639565b90506020020135600003610ccb57610cc9838383818110610c5e57610c5e611639565b505b80610cd581611665565b915050610c8c565b505050565b606061032a6004610fde565b6040516331a9108f60e11b81526004810184905283907f000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d6001600160a01b031690636352211e90602401602060405180830381865afa158015610d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d79919061161c565b6001600160a01b0316336001600160a01b031614610dd95760405162461bcd60e51b815260206004820152601e60248201527f4c656e7347656c61746f4750542e6f6e6c7950726f66696c654f776e657200006044820152606401610677565b6000543414610e2a5760405162461bcd60e51b815260206004820152601c60248201527f4c656e7347656c61746f4750542e73657450726f6d70743a20666565000000006044820152606401610677565b60a0821115610e7b5760405162461bcd60e51b815260206004820152601f60248201527f4c656e7347656c61746f4750542e73657450726f6d70743a206c656e677468006044820152606401610677565b7f000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd2256001600160a01b03167f000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d6001600160a01b031663540528b9866040518263ffffffff1660e01b8152600401610ef391815260200190565b602060405180830381865afa158015610f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f34919061161c565b6001600160a01b031614610f965760405162461bcd60e51b815260206004820152602360248201527f4c656e7347656c61746f4750542e73657450726f6d70743a20646973706174636044820152623432b960e91b6064820152608401610677565b610fa160048561113b565b50610fad60028561113b565b506000848152600160205260409020610fc78385836116df565b5050505050565b6000610fd8825490565b92915050565b60606000610feb83611147565b9392505050565b6000610feb83836111a3565b8047101561104e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610677565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461109b576040519150601f19603f3d011682016040523d82523d6000602084013e6110a0565b606091505b5050905080610cdd5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610677565b60008181526001830160205260408120541515610feb565b6000610feb83836111cd565b6000610feb83836112c0565b60608160000180548060200260200160405190810160405280929190818152602001828054801561119757602002820191906000526020600020905b815481526020019060010190808311611183575b50505050509050919050565b60008260000182815481106111ba576111ba611639565b9060005260206000200154905092915050565b600081815260018301602052604081205480156112b65760006111f160018361167e565b85549091506000906112059060019061167e565b905081811461126a57600086600001828154811061122557611225611639565b906000526020600020015490508087600001848154811061124857611248611639565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061127b5761127b61179f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610fd8565b6000915050610fd8565b600081815260018301602052604081205461130757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610fd8565b506000610fd8565b50805461131b906115cc565b6000825580601f1061132b575050565b601f01602090049060005260206000209081019061069391905b808211156113595760008155600101611345565b5090565b6020808252825182820181905260009190848201906040850190845b8181101561139557835183529284019291840191600101611379565b50909695505050505050565b6000602082840312156113b357600080fd5b5035919050565b6000815180845260005b818110156113e0576020818501810151868301820152016113c4565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610feb60208301846113ba565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561147957888303603f19018552815180518452870151878401879052611466878501826113ba565b958801959350509086019060010161143a565b509098975050505050505050565b6001600160a01b038116811461069357600080fd5b6000602082840312156114ae57600080fd5b8135610feb81611487565b600080604083850312156114cc57600080fd5b50508035926020909101359150565b600080602083850312156114ee57600080fd5b823567ffffffffffffffff8082111561150657600080fd5b818501915085601f83011261151a57600080fd5b81358181111561152957600080fd5b8660208260051b850101111561153e57600080fd5b60209290920196919550909350505050565b60008060006040848603121561156557600080fd5b83359250602084013567ffffffffffffffff8082111561158457600080fd5b818601915086601f83011261159857600080fd5b8135818111156115a757600080fd5b8760208285010111156115b957600080fd5b6020830194508093505050509250925092565b600181811c908216806115e057607f821691505b60208210810361160057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561162e57600080fd5b8151610feb81611487565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016116775761167761164f565b5060010190565b81810381811115610fd857610fd861164f565b601f821115610cdd57600081815260208120601f850160051c810160208610156116b85750805b601f850160051c820191505b818110156116d7578281556001016116c4565b505050505050565b67ffffffffffffffff8311156116f7576116f7611606565b61170b8361170583546115cc565b83611691565b6000601f84116001811461173f57600085156117275750838201355b600019600387901b1c1916600186901b178355610fc7565b600083815260209020601f19861690835b828110156117705786850135825560209485019460019092019101611750565b508682101561178d5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603160045260246000fdfea26469706673582212207e4fa7f523c5914ed18a3baf68fd6337a32f9d735aafef835c7acd32f9c4f0bc64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd225
-----Decoded View---------------
Arg [0] : _lensHub (address): 0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d
Arg [1] : _dedicatedMsgSender (address): 0xbB97656cd5fECe3a643335d03C8919D5E7DcD225
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000db46d1dc155634fbc732f92e853b10b288ad5a1d
Arg [1] : 000000000000000000000000bb97656cd5fece3a643335d03c8919d5e7dcd225
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Note:
Please DO NOT store any passwords or private keys here.
The compiled contract might be susceptible to VerbatimInvalidDeduplication (low-severity), FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity) Solidity Compiler Bugs.
Connect a Wallet
Connect a Wallet
Connect a Wallet
Before You Copy
Transaction Private Note
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.