{"id":13767418,"url":"https://github.com/lens-protocol/modules","last_synced_at":"2026-03-09T12:38:41.129Z","repository":{"id":59481983,"uuid":"500494674","full_name":"lens-protocol/modules","owner":"lens-protocol","description":"Repository for adding Lens Protocol collect, follow and reference modules","archived":false,"fork":false,"pushed_at":"2023-11-16T17:18:13.000Z","size":725,"stargazers_count":79,"open_issues_count":4,"forks_count":26,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T08:39:11.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.lens.xyz/docs/module-interfaces","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lens-protocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-06-06T15:45:15.000Z","updated_at":"2025-03-08T02:20:31.000Z","dependencies_parsed_at":"2023-11-16T18:31:18.242Z","dependency_job_id":"49631ff1-7702-4c55-b587-c4e02ae6ff5b","html_url":"https://github.com/lens-protocol/modules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fmodules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fmodules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fmodules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fmodules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lens-protocol","download_url":"https://codeload.github.com/lens-protocol/modules/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254330782,"owners_count":22053048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:01:08.508Z","updated_at":"2026-03-09T12:38:36.107Z","avatar_url":"https://github.com/lens-protocol.png","language":"TypeScript","funding_links":[],"categories":["Development"],"sub_categories":["Modules"],"readme":"# lens-modules\n\nRepository for adding Lens Protocol collect, follow and reference modules.\n\n**To have your module added to Lens Testnet or Mainnet please open a PR and follow the instructions here: #TODO**\n\n## Installation\n\n1. `npm install`\n2. If you also want to use Foundry - follow the Foundry installation instructions [here](https://getfoundry.sh/).\n\n## Testing\n\nThis repository contains both - Hardhat and Foundry tests. Foundry will be used for all future modules, and existing modules will be migrated to Foundry testing suite.\n\n### Hardhat\n\n1. `npm run test` will compile and run the Hardhat tests suite\n\n### Foundry\n\n1. `forge test` will compile and run the Foundry tests suite.\n\n### Foundry tests against forks\n\n1. Edit `TESTING_FORK` .env variable to be one of `mainnet/testnet/sandbox` and fill the rest of .env (`FOUNDRY` section)\n2. If a module is already deployed and its address exists in `addresses.json` - tests will be run against that deployment. If there is no module in json - a new local instance of the module will be deployed. Remove the module key from `addresses.json` if you want to force testing a local module deployment.\n3. Run `forge test` to fork the chosen network and test against existing LensHub contracts.\n\n## Deployment\n\n1. Make sure to fill in the `.env` using `.env.example` (the `Foundry` section). You can specify either a `MNEMONIC` or a single `PRIVATE_KEY` (make sure to include both variables, even if one of them is an empty string)\n2. Run deployment script with a command like `bash script/deploy-module.sh testnet StepwiseCollectModule` from the project root folder (e.g. to deploy `StepwiseCollectModule` on `testnet`).\n3. Follow the on-screen instructions to verify if everything is correct and confirm deployment \u0026 contract verification.\n4. If only the verification is needed of an existing deployed contract - use the `--verify-only` flag followed by ABI-Encoded constructor args.\n\n## Deployement addresses in `addresses.json`\n\nThe `addresses.json` file in root contains all existing deployed contracts on all of target environments (mainnet/testnet/sandbox) on corresponding chains.\nAfter a succesful module deployment the new address will be added to `addresses.json`, overwriting the existing one (the script will ask for confirmation if you want to redeploy an already existing deployment).\n\n## Coverage\n\n1. `npm run coverage` for Hardhat coverage report\n2. `forge coverage` for Foundry coverage report\n\n# Modules\n\n## Collect modules\n\n- [**Aave Fee Collect Module**](./contracts/collect/AaveFeeCollectModule.sol): Extend the LimitedFeeCollectModule to deposit all received fees into the Aave Polygon Market (if applicable for the asset) and send the resulting aTokens to the beneficiary.\n- [**Auction Collect Module**](./contracts/collect/AuctionCollectModule.sol): This module works by creating an English auction for the underlying publication. After the auction ends, only the auction winner is allowed to collect the publication.\n- [**Base Fee Collect Module**](./contracts/collect/base/BaseFeeCollectModule.sol): An abstract base fee collect module contract which can be used to construct flexible fee collect modules using inheritance.\n- [**Multirecipient Fee Collect Module**](./contracts/collect/MultirecipientFeeCollectModule.sol): Fee Collect module that allows multiple recipients (up to 5) with different proportions of fees payout.\n- [**Simple Fee Collect Module**](./contracts/collect/SimpleFeeCollectModule.sol): A simple fee collect module implementation, as an example of using base fee collect module abstract contract.\n- [**Updatable Ownable Fee Collect Module**](./contracts/collect/UpdatableOwnableFeeCollectModule.sol): A fee collect module that, for each publication that uses it, mints an ERC-721 ownership-NFT to its author. Whoever owns the ownership-NFT has the rights to update the parameters required to do a successful collect operation over its underlying publication.\n\n## Follow modules\n\n## Reference modules\n\n- [**Degrees Of Separation Reference Module**](./contracts/reference/DegreesOfSeparationReferenceModule.sol): This reference module allows to set a degree of separation `n`, and then allows to comment/mirror only to profiles that are at most at `n` degrees of separation from the author of the root publication.\n- [**Token Gated Reference Module**](./contracts/reference/TokenGatedReferenceModule.sol): A reference module that validates that the user who tries to reference has a required minimum balance of ERC20/ERC721 token.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-protocol%2Fmodules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flens-protocol%2Fmodules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-protocol%2Fmodules/lists"}