Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
lens-modules
Advanced tools
All interfaces and base classes from Lens core used for creating follow, collect, and open action modules
This repository contains the module contracts from the core Lens Protocol repo (link) as a standalone library, useful in Hardhat and Foundry projects.
It provides all the libraries, interfaces, and base contracts required when creating follow, collect, and Open Action modules.
npm i lens-modules
pragma solidity ^0.8.21;
import {HubRestricted} from "lens-modules/contracts/base/HubRestricted.sol";
import {IPublicationActionModule} from "lens-modules/contracts/interfaces/IPublicationActionModule.sol";
import {Types} from "lens-modules/contracts/libraries/constants/Types.sol";
import {LensModuleMetadata} from "lens-modules/contracts/modules/LensModuleMetadata.sol";
contract OpenActionModule is
HubRestricted,
IPublicationActionModule,
LensModuleMetadata
{
constructor(
address owner,
address hub
)
Ownable(owner)
HubRestricted(hub)
LensModuleMetadata()
{
// ...
}
function initializePublicationAction(
uint256 profileId,
uint256 pubId,
address /* transactionExecutor */,
bytes calldata data
) external override onlyHub returns (bytes memory) {
// ...
}
function processPublicationAction(
Types.ProcessActionParams calldata params
) external override onlyHub returns (bytes memory) {
// ...
}
}
FAQs
All interfaces and base classes from Lens core used for creating follow, collect, and open action modules
The npm package lens-modules receives a total of 3 weekly downloads. As such, lens-modules popularity was classified as not popular.
We found that lens-modules demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.