ILegacyCollectModule

Git Source

Author: Lens Protocol

This is the deprecated interface for previously Lens-compatible CollectModules.

Functions

initializePublicationCollectModule

Initializes data for a given publication being published. This can only be called by the hub.

function initializePublicationCollectModule(uint256 profileId, uint256 pubId, bytes calldata data)
    external
    returns (bytes memory);

Parameters

NameTypeDescription
profileIduint256The token ID of the profile publishing the publication.
pubIduint256The associated publication's LensHub publication ID.
databytesArbitrary data passed from the user! to be decoded.

Returns

NameTypeDescription
<none>bytesbytes An ABI-encoded encapsulating the execution's state changes. This will be emitted by the hub alongside the collect module's address and should be consumed by front ends.

processCollect

Processes a collect action for a given publication, this can only be called by the hub.

function processCollect(
    uint256 referrerProfileId,
    address collector,
    uint256 profileId,
    uint256 pubId,
    bytes calldata data
) external;

Parameters

NameTypeDescription
referrerProfileIduint256The LensHub profile token ID of the referrer's profile (only different in case of mirrors).
collectoraddressThe collector address.
profileIduint256The token ID of the profile associated with the publication being collected.
pubIduint256The LensHub publication ID associated with the publication being collected.
databytesArbitrary data passed from the collector! to be decoded.