Skip to content

Commit

Permalink
misc: some more info added about project and protocol structure into …
Browse files Browse the repository at this point in the history
…README
  • Loading branch information
vicnaum committed Jan 5, 2025
1 parent 26d8b89 commit 76164f1
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 76164f1

Please sign in to comment.