LegacyCollectLib

Git Source

Author: Lens Protocol

Library containing the logic for legacy collect operation.

Functions

collect

function collect(
    Types.LegacyCollectParams calldata collectParams,
    address transactionExecutor,
    address collectorProfileOwner,
    address collectNFTImpl
) external returns (uint256);

_getOrDeployCollectNFT

function _getOrDeployCollectNFT(
    Types.Publication storage _collectedPublication,
    uint256 publicationCollectedProfileId,
    uint256 publicationCollectedId,
    address collectNFTImpl
) private returns (address);

_deployCollectNFT

Deploys the given profile's Collect NFT contract.

function _deployCollectNFT(uint256 profileId, uint256 pubId, address collectNFTImpl) private returns (address);

Parameters

NameTypeDescription
profileIduint256The token ID of the profile which Collect NFT should be deployed.
pubIduint256The publication ID of the publication being collected, which Collect NFT should be deployed.
collectNFTImpladdressThe address of the Collect NFT implementation that should be used for the deployment.

Returns

NameTypeDescription
<none>addressaddress The address of the deployed Collect NFT contract.

Events

CollectedLegacy

Emitted upon a successful legacy collect action.

event CollectedLegacy(
    uint256 indexed publicationCollectedProfileId,
    uint256 indexed publicationCollectedId,
    address transactionExecutor,
    uint256 referrerProfileId,
    uint256 referrerPubId,
    bytes collectModuleData,
    uint256 timestamp
);