FollowerOnlyReferenceModule
Inherits: HubRestricted, IReferenceModule
Author: Lens Protocol
A simple reference module that validates that comments, quotes or mirrors originate from a profile that follows the profile of the original publication.
Functions
constructor
constructor(address hub) HubRestricted(hub);
initializeReferenceModule
Initializes data for the given publication being published with this Reference module.
There is nothing needed at initialization.
function initializeReferenceModule(uint256, uint256, address, bytes calldata) external pure returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
<none> | uint256 | |
<none> | uint256 | |
<none> | address | |
<none> | bytes |
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. |
processComment
Processes a comment being published. This includes any module logic like transferring tokens, checking for conditions (e.g. token-gated), etc.
Validates that the commenting profile's owner is a follower.
function processComment(Types.ProcessCommentParams calldata processCommentParams)
external
view
override
returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
processCommentParams | Types.ProcessCommentParams | The parameters for processing a comment. |
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. |
processQuote
Processes a quote being published. This includes any module logic like transferring tokens, checking for conditions (e.g. token-gated), etc.
Validates that the quoting profile's owner is a follower.
function processQuote(Types.ProcessQuoteParams calldata processQuoteParams)
external
view
override
returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
processQuoteParams | Types.ProcessQuoteParams | The parameters for processing a quote. |
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. |
processMirror
Processes a mirror being published. This includes any module logic like transferring tokens, checking for conditions (e.g. token-gated), etc.
Validates that the mirroring profile's owner is a follower.
function processMirror(Types.ProcessMirrorParams calldata processMirrorParams)
external
view
override
returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
processMirrorParams | Types.ProcessMirrorParams | The parameters for processing a mirror. |
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. |