mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-09 22:28:04 -05:00
53 lines
2.0 KiB
Solidity
53 lines
2.0 KiB
Solidity
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
pragma solidity 0.8.10;
|
|
|
|
/**
|
|
* @title IReferenceModule
|
|
* @author Lens
|
|
*
|
|
* @notice This is the standard interface for all Lens-compatible ReferenceModules.
|
|
*/
|
|
interface IReferenceModule {
|
|
/**
|
|
* @notice Initializes data for a given publication being published. This can only be called by the hub.
|
|
* @param profileId The token ID of the profile publishing the publication.
|
|
* @param pubId The associated publication's LensHub publication ID.
|
|
* @param data Arbitrary data passed from the user to be decoded.
|
|
*
|
|
* @return An abi encoded byte array 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.
|
|
*/
|
|
function initializeReferenceModule(
|
|
uint256 profileId,
|
|
uint256 pubId,
|
|
bytes calldata data
|
|
) external returns (bytes memory);
|
|
|
|
/**
|
|
* @notice Processes a comment action referencing a given publication. This can only be called by the hub.
|
|
*
|
|
* @param profileId The token ID of the profile associated with the publication being published.
|
|
* @param profileIdPointed The profile ID of the profile associated the publication being referenced.
|
|
* @param pubIdPointed The publication ID of the publication being referenced.
|
|
*/
|
|
function processComment(
|
|
uint256 profileId,
|
|
uint256 profileIdPointed,
|
|
uint256 pubIdPointed
|
|
) external;
|
|
|
|
/**
|
|
* @notice Processes a mirror action referencing a given publication. This can only be called by the hub.
|
|
*
|
|
* @param profileId The token ID of the profile associated with the publication being published.
|
|
* @param profileIdPointed The profile ID of the profile associated the publication being referenced.
|
|
* @param pubIdPointed The publication ID of the publication being referenced.
|
|
*/
|
|
function processMirror(
|
|
uint256 profileId,
|
|
uint256 profileIdPointed,
|
|
uint256 pubIdPointed
|
|
) external;
|
|
}
|