From 76164f17ff1ffa481a384687b27e6e6b979d6845 Mon Sep 17 00:00:00 2001 From: vicnaum Date: Sun, 5 Jan 2025 21:57:38 +0100 Subject: [PATCH] misc: some more info added about project and protocol structure into README --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cf491b8f..e8c86cdc 100644 --- a/README.md +++ b/README.md @@ -74,22 +74,45 @@ Run the following command, which deploys the full protocol with all present Rule yarn run deploy ``` +## Lens Core Structure + +The concept of Lens V3 is based on the following assumptions: +- Every EVM account is a Profile now (in Lens V2 a profile was an NFT) +- Accounts can be smart wallets (and in Lens Dashboard they are by default) and support bespoke Lens Social features (like account managers, etc.) +- The Protocol itself is a set of primitives (Feed, Graph, Group, Namespace) which are not necessarily connected with each other and each might be an entry point (in Lens V2 everything was all in the same LensHub contract which was an entry point for everything) +- The Protocol can be extended by developing new flavors of the primitives, Actions and Rules that can be applied to these primitives +- Action is assumed to be any contract that interacts with The Protocol +- Rule is seen more as a restrictive extension of the Protocol +- Our Primitive implementations (flavors) are RuleBased, so they all support adding Rules (with AND/OR chaining) and process them on set interactions + +### Primitives + ## Project Structure -The `contracts/` directory is divided into four main directories: `core/`, `dashboard/`, `rules/`, and `actions/`. In the future, each directory might live under its own repository; during this early stages of Lens Protocol V3 development they coexist in the same one. +The `contracts/` folder is divided into several main folders: `actions/`, `core/`, `extensions/`, `migration/` and `rules/`. +In the future, some of these folders might live under its own repository; during this early stages of Lens Protocol V3 development they coexist in this repo. ### Core Contains the main contracts that make up the base Lens Protocol. These contracts are envisioned as non-opinionated and flexible, allowing for a wide range of use cases. +They already are "Lens-Flavoured", but the "Core"-core contracts are still split separately as FeedCode, GroupCore, GraphCore, NamespaceCore. +We expect developers to build upon them, inherit from them, extend the functionality, and be creative with them. + +### Migration + +Contains modified versions of the Feed and Graph primitives, which do not do any checks and just fill up the storage during the initial migration. +The migration would be run by us and nobody else could access the network during that time (so it's assumed to be safe to have no access control or checks). -### Dashboard +### Extensions -Contains the Lens Dashboard's bespoke contracts. These contracts are opinionated and are designed to achieve the best experience while using the Lens Dashboard. +Contains the bespoke implementations of contracts for Lens Dashboard and initial version of Lens Social Protocol. +These contracts are opinionated and are designed to achieve the best experience while using the Lens Dashboard. +These also serve as examples of how developers could build on top of the Core contracts. ### Rules -Contains contracts implementing Lens Rules. +Contains contracts implementing Lens Rules. These also serve as examples of how developers could build their own Rules. ### Actions -Contains contracts implementing Lens Actions. +Contains contracts implementing Lens Actions. These also serve as examples of how developers could build their own Actions.