ICollectModule
Author: Lens Protocol
This is the standard interface for all Lens-compatible CollectModules. Collect modules allow users to execute custom logic upon a collect action over a publication, like:
- Only allow the collect if the collector is following the publication author.
 - Only allow the collect if the collector has made a payment to
 - Allow any collect but only during the first 24 hours.
 - Etc.
 
Functions
initializePublicationCollectModule
Initializes data for a given publication being published.
function initializePublicationCollectModule(
    uint256 profileId,
    uint256 pubId,
    address transactionExecutor,
    bytes calldata data
) external returns (bytes memory);
Parameters
| Name | Type | Description | 
|---|---|---|
profileId | uint256 | The token ID of the profile publishing the publication. | 
pubId | uint256 | The associated publication's LensHub publication ID. | 
transactionExecutor | address | The owner or an approved delegated executor. | 
data | bytes | Arbitrary data passed from the user! to be decoded. | 
Returns
| Name | Type | Description | 
|---|---|---|
<none> | bytes | bytes Any custom ABI-encoded data. This will be a LensHub event params that can be used by indexers or UIs. | 
processCollect
Processes a collect action for a given publication.
function processCollect(Types.ProcessCollectParams calldata processCollectParams) external returns (bytes memory);
Parameters
| Name | Type | Description | 
|---|---|---|
processCollectParams | Types.ProcessCollectParams | The parameters for the collect action. | 
Returns
| Name | Type | Description | 
|---|---|---|
<none> | bytes | bytes Any custom ABI-encoded data. This will be a LensHub event params that can be used by indexers or UIs. |