Smart Contracts

Useful resources for working with the Lens Protocol smart contracts.


Deployed Contracts

The Lens Protocol smart contracts are deployed on the Polygon Mainnet and Amoy Testnet. Below are the addresses and ABIs for the deployed contracts.

ContractAddressABI
LensHub0xDb46d1Dc155634FbC732f92E853b10B288AD5a1dJSON
LensHandles0xe7E7EaD361f3AaCD73A61A9bD6C10cA17F38E945JSON
TokenHandleRegistry0xD4F2F33680FCCb36748FA9831851643781608844JSON
FollowNFT0x288715E67B7b184fD299143280CA6c1Eb7F31e1BJSON
CollectNFT0x0c2a7761E2971D906338F5da1ecF0027E4247fd7JSON
ModuleRegistry0x1eD5983F0c883B96f7C35528a1e22EEA67DE3Ff9JSON

Misc / Helpers

ContractAddressABI
PermissionlessCreator0x0b5e6100243f793e480DE6088dE6bA70aA9f3872JSON
ProfileCreationProxy0xdCB72aaB62d52aBC2E6be99BEEe535C2D1361fc0JSON
PublicActProxy0x53582b1b7BE71622E7386D736b6baf87749B7a2BJSON
LitAccessControl0xE1A4f40b74f6E91159ffBd95489FE74Efe71fD97JSON

Follow Modules

ContractAddressABI
FeeFollowModule0xa8f6ba162dB789039D07A4f0ce90b1aE1f46FE8EJSON
RevertFollowModule0x4E2D0157464501C98E781491a9dbC99c2F3fD90fJSON

Open Action Modules

ContractAddressABI
CollectPublicationAction0x0D90C58cBe787CD70B5Effe94Ce58185D72143fBJSON

Reference Modules

ContractAddressABI
DegreesOfSeparationReferenceModule0xBe69302b0E3bAc1018B2772A7B26EB2325b3F9C8JSON
FollowerOnlyReferenceModule0x19F8980aF29207bbd7A6D0aD0858d59bd11d4647JSON

Collect Action Modules

Submodules of CollectPublicationAction module.

ContractAddressABI
SimpleFeeCollectModule0x060f5448ae8aCF0Bc06D040400c6A89F45b488bbJSON
MultirecipientFeeCollectModule0x50f1D8779078c790b82dE5Aa8d72A841e1CBBbE1JSON

Advanced Material

Contracts Book

If you want to dig deep into the contract please read our contracts book.

Run It Locally

First, clone the repository using SSH:

git clone [email protected]:lens-protocol/core.git

Next, install Foundry. You can follow the installation steps below, or for more detailed instructions, refer to the Foundry documentation.

# Install Foundrycurl -L https://foundry.paradigm.xyz | bash
# Once Foundry is installed, run the following commandfoundryup

After installing Foundry, navigate to the cloned repository folder and install the dependencies:

npm install && forge install

Finally, you can build the project:

npm run build