ICollectNFT

Git Source

Author: Lens Protocol

This is the interface for the 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) 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.

mint

Mints a collect NFT to the specified address. This can only be called by the hub and is called upon collection.

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