Create a Group
This guide will help you create a Group on Lens.
This guide provides an introduction to the concept of Lens Groups. More information will be provided in due course.
To create an Group, you need to:
Create an Group Metadata object
Upload the Group Metadata object onto a public URI.
Deploy the Lens Group smart contract.
See the Lens Metadata Standards guide for more information on creating and hosting Metadata objects.
- TS/JS
- JSON Schema
Use the @lens-protocol/metadata package to construct a valid GroupMetadata object:
Example
import { group } from "@lens-protocol/metadata";
const metadata = group({ name: "XYZ", slug: "xyz", description: "My group description", icon: "lens://BsdfA...",});
Then, upload the Group Metadata object to a public URI.
import { uploadJson } from "./my-upload-lib";
const metadataURI = await uploadJson(metadata); // e.g., lens://4f91ca…
- GraphQL
- React
- TypeScript
You can use the createGroup mutation to deploy the Lens Feed smart contract.
You MUST be authenticated as Builder to make this request.
Finally, handle the result as explained in the Transaction Lifecycle guide.
That's it—you have successfully created a Group on Lens!