ILegacyCollectNFT

Git Source

Author: Lens Protocol

This is the interface for the Lens V1 CollectNFT contract. Which is cloned upon the first collect for any given publication.

Functions

initialize

Initializes the collect NFT, setting the feed as the privileged minter, storing the collected publication pointer and initializing the name and symbol in the LensNFTBase contract.

function initialize(uint256 profileId, uint256 pubId, string calldata name, string calldata symbol) external;

Parameters

NameTypeDescription
profileIduint256The token ID of the profile in the hub that this Collect NFT points to.
pubIduint256The profile publication ID in the hub that this Collect NFT points to.
namestringThe name to set for this NFT.
symbolstringThe symbol to set for this NFT.

mint

Mints a collect NFT to the specified address.

function mint(address to) external returns (uint256);

Parameters

NameTypeDescription
toaddressThe address to mint the NFT to.

Returns

NameTypeDescription
<none>uint256uint256 An integer representing the minted token ID.

getSourcePublicationPointer

Returns the source publication of this collect NFT.

function getSourcePublicationPointer() external view returns (uint256, uint256);

Returns

NameTypeDescription
<none>uint256tuple First is the profile ID, and second is the publication ID.
<none>uint256