├── .nvmrc
├── apps
├── README.md
├── web
│ ├── .dockerignore
│ ├── README.md
│ ├── .gitignore
│ ├── packages
│ │ ├── README.md
│ │ ├── workers
│ │ │ ├── freshdesk
│ │ │ │ ├── README.md
│ │ │ │ ├── .dev.vars.example
│ │ │ │ ├── tsconfig.json
│ │ │ │ ├── .eslintrc.js
│ │ │ │ └── wrangler.toml
│ │ │ ├── sts-generator
│ │ │ │ ├── .dockerignore
│ │ │ │ ├── .env.example
│ │ │ │ ├── README.md
│ │ │ │ └── .eslintrc.js
│ │ │ ├── metadata
│ │ │ │ ├── .dev.vars.example
│ │ │ │ ├── tsconfig.json
│ │ │ │ ├── .eslintrc.js
│ │ │ │ ├── wrangler.toml
│ │ │ │ └── README.md
│ │ │ └── prerender
│ │ │ │ ├── tsconfig.json
│ │ │ │ ├── wrangler.toml
│ │ │ │ ├── .eslintrc.js
│ │ │ │ ├── package.json
│ │ │ │ ├── README.md
│ │ │ │ └── src
│ │ │ │ └── index.ts
│ │ ├── data
│ │ │ ├── aave-members.ts
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ ├── errors.ts
│ │ │ ├── staffs.ts
│ │ │ ├── apps.ts
│ │ │ ├── storage.ts
│ │ │ ├── lineaster-members.ts
│ │ │ ├── lens-endpoints.ts
│ │ │ ├── index.ts
│ │ │ ├── hashflags.ts
│ │ │ └── package.json
│ │ ├── ui
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ └── src
│ │ │ │ ├── PageLoading.tsx
│ │ │ │ └── EmptyState.tsx
│ │ ├── abis
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ ├── index.ts
│ │ │ └── package.json
│ │ ├── lib
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ ├── trimify.ts
│ │ │ ├── getSnapshotProposalId.ts
│ │ │ ├── stopEventPropagation.ts
│ │ │ ├── hasGm.ts
│ │ │ ├── getURLs.ts
│ │ │ ├── getStampFyiURL.ts
│ │ │ ├── humanize.ts
│ │ │ ├── getAppName.ts
│ │ │ ├── getTokenImage.ts
│ │ │ ├── imageProxy.ts
│ │ │ ├── isVerified.ts
│ │ │ ├── truncateByWords.ts
│ │ │ ├── isStaff.ts
│ │ │ ├── getIsDispatcherEnabled.tsx
│ │ │ ├── isGardener.ts
│ │ │ ├── hasPrideLogo.ts
│ │ │ └── getTags.ts
│ │ ├── snapshot
│ │ │ ├── apollo
│ │ │ │ ├── index.ts
│ │ │ │ ├── cache.ts
│ │ │ │ ├── httpLink.ts
│ │ │ │ ├── retryLink.ts
│ │ │ │ └── webClient.ts
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ ├── codegen.yml
│ │ │ └── Snapshot.graphql
│ │ ├── image-cropper
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ ├── README.md
│ │ │ └── types.d.ts
│ │ ├── lens
│ │ │ ├── documents
│ │ │ │ ├── queries
│ │ │ │ │ ├── ProfileInterests.graphql
│ │ │ │ │ ├── Challenge.graphql
│ │ │ │ │ ├── ProfileAddress.graphql
│ │ │ │ │ ├── EnabledCurrencyModules.graphql
│ │ │ │ │ ├── NftChallenge.graphql
│ │ │ │ │ ├── NotificationCount.graphql
│ │ │ │ │ ├── Trending.graphql
│ │ │ │ │ ├── RecommendedProfiles.graphql
│ │ │ │ │ ├── RelevantPeople.graphql
│ │ │ │ │ ├── FollowerNftOwnedTokenIds.graphql
│ │ │ │ │ ├── PublicationRevenue.graphql
│ │ │ │ │ ├── Mirrors.graphql
│ │ │ │ │ ├── GenerateModuleCurrencyApprovalData.graphql
│ │ │ │ │ ├── Profiles.graphql
│ │ │ │ │ ├── EnabledModules.graphql
│ │ │ │ │ ├── SearchProfiles.graphql
│ │ │ │ │ ├── MutualFollowersList.graphql
│ │ │ │ │ ├── LensterStats.graphql
│ │ │ │ │ ├── Following.graphql
│ │ │ │ │ ├── Likes.graphql
│ │ │ │ │ ├── Collectors.graphql
│ │ │ │ │ ├── EnabledCurrencyModulesWithProfile.graphql
│ │ │ │ │ ├── NftFeed.graphql
│ │ │ │ │ ├── CommentFeed.graphql
│ │ │ │ │ ├── HasTxHashBeenIndexed.graphql
│ │ │ │ │ ├── ApprovedModuleAllowanceAmount.graphql
│ │ │ │ │ ├── UserProfiles.graphql
│ │ │ │ │ ├── Followers.graphql
│ │ │ │ │ ├── NftGalleries.graphql
│ │ │ │ │ ├── SuperFollow.graphql
│ │ │ │ │ ├── MutualFollowers.graphql
│ │ │ │ │ ├── ProfileFeed.graphql
│ │ │ │ │ ├── FeedHighlights.graphql
│ │ │ │ │ ├── ExploreFeed.graphql
│ │ │ │ │ ├── SearchPublications.graphql
│ │ │ │ │ ├── CollectModule.graphql
│ │ │ │ │ └── CanDecryptStatus.graphql
│ │ │ │ ├── mutations
│ │ │ │ │ ├── AddReaction.graphql
│ │ │ │ │ ├── ProxyAction.graphql
│ │ │ │ │ ├── RemoveReaction.graphql
│ │ │ │ │ ├── CreateNftGallery.graphql
│ │ │ │ │ ├── DeleteNftGallery.graphql
│ │ │ │ │ ├── HidePublication.graphql
│ │ │ │ │ ├── ReportPublication.graphql
│ │ │ │ │ ├── AddProfileInterest.graphql
│ │ │ │ │ ├── UpdateNftGalleryInfo.graphql
│ │ │ │ │ ├── UpdateNftGalleryItems.graphql
│ │ │ │ │ ├── RemoveProfileInterest.graphql
│ │ │ │ │ ├── CreateProfile.graphql
│ │ │ │ │ ├── UpdateNftGalleryItemsOrder.graphql
│ │ │ │ │ ├── Authenticate.graphql
│ │ │ │ │ ├── CreateMirrorViaDispatcher.graphql
│ │ │ │ │ ├── CreatePostViaDispatcher.graphql
│ │ │ │ │ ├── CreateCommentViaDispatcher.graphql
│ │ │ │ │ ├── CreateSetProfileImageURIViaDispatcher.graphql
│ │ │ │ │ ├── Broadcast.graphql
│ │ │ │ │ ├── CreateSetProfileMetadataViaDispatcher.graphql
│ │ │ │ │ └── CreateUnfollowTypedData.graphql
│ │ │ │ └── fragments
│ │ │ │ │ ├── ModuleFeeAmountFields.graphql
│ │ │ │ │ ├── StatsFields.graphql
│ │ │ │ │ ├── RelayerResultFields.graphql
│ │ │ │ │ ├── SimpleConditionFields.graphql
│ │ │ │ │ └── ProfileFields.graphql
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ ├── apollo
│ │ │ │ ├── lib
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── keyFields.ts
│ │ │ │ ├── httpLink.ts
│ │ │ │ ├── nodeClient.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── cache
│ │ │ │ │ ├── createFollowingFieldPolicy.ts
│ │ │ │ │ ├── createSearchFieldPolicy.ts
│ │ │ │ │ ├── createFollowersFieldPolicy.ts
│ │ │ │ │ ├── createNftsFieldPolicy.ts
│ │ │ │ │ ├── createFeedFieldPolicy.ts
│ │ │ │ │ ├── createFeedHighlightsFieldPolicy.ts
│ │ │ │ │ ├── createWhoReactedPublicationFieldPolicy.ts
│ │ │ │ │ ├── createExplorePublicationsFieldPolicy.ts
│ │ │ │ │ ├── createProfilesFieldPolicy.ts
│ │ │ │ │ ├── createWhoCollectedPublicationFieldPolicy.ts
│ │ │ │ │ ├── createNotificationsFieldPolicy.ts
│ │ │ │ │ ├── createMutualFollowersProfilesFieldPolicy.ts
│ │ │ │ │ └── createPublicationsFieldPolicy.ts
│ │ │ │ ├── retryLink.ts
│ │ │ │ └── webClient.ts
│ │ │ └── codegen.yml
│ │ ├── tsconfig
│ │ │ ├── package.json
│ │ │ ├── nextjs.json
│ │ │ └── base.json
│ │ └── bundlr
│ │ │ ├── .eslintrc.js
│ │ │ ├── tsconfig.json
│ │ │ └── package.json
│ ├── pnpm-workspace.yaml
│ ├── .prettierignore
│ ├── .eslintrc.js
│ ├── src
│ │ ├── pages
│ │ │ ├── mod.tsx
│ │ │ ├── index.tsx
│ │ │ ├── search.tsx
│ │ │ ├── terms.tsx
│ │ │ ├── explore.tsx
│ │ │ ├── thanks.tsx
│ │ │ ├── contact.tsx
│ │ │ ├── privacy.tsx
│ │ │ ├── messages
│ │ │ │ ├── index.tsx
│ │ │ │ └── [...conversationKey].tsx
│ │ │ ├── u
│ │ │ │ └── [username].tsx
│ │ │ ├── new
│ │ │ │ └── profile.tsx
│ │ │ ├── stafftools
│ │ │ │ └── index.tsx
│ │ │ ├── notifications.tsx
│ │ │ ├── posts
│ │ │ │ └── [id].tsx
│ │ │ ├── report
│ │ │ │ └── [id]
│ │ │ │ │ └── index.tsx
│ │ │ ├── settings
│ │ │ │ ├── delete.tsx
│ │ │ │ ├── index.tsx
│ │ │ │ ├── account.tsx
│ │ │ │ ├── cleanup.tsx
│ │ │ │ ├── allowance.tsx
│ │ │ │ ├── interests.tsx
│ │ │ │ ├── dispatcher.tsx
│ │ │ │ └── preferences.tsx
│ │ │ └── nft
│ │ │ │ └── [address]
│ │ │ │ └── [tokenId].tsx
│ │ ├── constants.ts
│ │ ├── components
│ │ │ ├── utils
│ │ │ │ ├── uniqBy.ts
│ │ │ │ └── hooks
│ │ │ │ │ ├── useIsMounted.tsx
│ │ │ │ │ ├── useModMode.tsx
│ │ │ │ │ ├── useStaffMode.tsx
│ │ │ │ │ ├── useSimpleDebounce.tsx
│ │ │ │ │ └── useDebounce.tsx
│ │ │ ├── Shared
│ │ │ │ ├── Markup
│ │ │ │ │ └── Code.tsx
│ │ │ │ ├── Shimmer
│ │ │ │ │ ├── TrendingTagShimmer.tsx
│ │ │ │ │ ├── NftsShimmer.tsx
│ │ │ │ │ ├── PublicationContentShimmer.tsx
│ │ │ │ │ ├── NftPickerShimmer.tsx
│ │ │ │ │ ├── PublicationsShimmer.tsx
│ │ │ │ │ └── NftShimmer.tsx
│ │ │ │ ├── Slug.tsx
│ │ │ │ ├── Loader.tsx
│ │ │ │ ├── IFramely
│ │ │ │ │ └── Player.tsx
│ │ │ │ ├── Badges
│ │ │ │ │ ├── Beta.tsx
│ │ │ │ │ └── New.tsx
│ │ │ │ ├── Loading.tsx
│ │ │ │ └── CommentWarning.tsx
│ │ │ ├── StaffTools
│ │ │ │ └── Sidebar.tsx
│ │ │ ├── Profile
│ │ │ │ └── Message.tsx
│ │ │ └── Publication
│ │ │ │ ├── HiddenPublication.tsx
│ │ │ │ └── Type
│ │ │ │ └── Commented.tsx
│ │ ├── types
│ │ │ └── dayjs-twitter.d.ts
│ │ ├── lib
│ │ │ ├── getUserLocale.ts
│ │ │ ├── onError.ts
│ │ │ ├── mixpanel.ts
│ │ │ ├── isValidEthAddress.ts
│ │ │ ├── splitSignature.ts
│ │ │ ├── conversationMatchesProfile.ts
│ │ │ ├── resetAuthData.ts
│ │ │ ├── getIsAuthTokensAvailable.ts
│ │ │ ├── chunkArray.ts
│ │ │ └── getToastOptions.ts
│ │ ├── store
│ │ │ ├── auth.ts
│ │ │ ├── profile-feed.ts
│ │ │ └── transaction.ts
│ │ └── enums.ts
│ ├── public
│ │ ├── lens.png
│ │ ├── favicon.ico
│ │ ├── favicon-16x16-dark.png
│ │ ├── favicon-16x16-light.png
│ │ ├── favicon-32x32-dark.png
│ │ ├── favicon-32x32-light.png
│ │ ├── apple-touch-icon-dark.png
│ │ ├── fonts
│ │ │ ├── AtypText-Bold.woff2
│ │ │ ├── AtypDisplay-Bold.woff2
│ │ │ ├── AtypText-Italic.woff2
│ │ │ ├── AtypText-Light.woff2
│ │ │ ├── AtypText-Medium.woff2
│ │ │ ├── AtypText-Regular.woff2
│ │ │ ├── AtypDisplay-Italic.woff2
│ │ │ ├── AtypDisplay-Light.woff2
│ │ │ ├── AtypDisplay-Medium.woff2
│ │ │ ├── AtypText-Semibold.woff2
│ │ │ ├── CircularXXSub-Bold.woff
│ │ │ ├── CircularXXSub-Book.woff
│ │ │ ├── AtypDisplay-Regular.woff2
│ │ │ ├── AtypDisplay-Semibold.woff2
│ │ │ ├── AtypText-BoldItalic.woff2
│ │ │ ├── AtypText-LightItalic.woff2
│ │ │ ├── AtypText-MediumItalic.woff2
│ │ │ ├── CircularXXSub-Medium.woff
│ │ │ ├── AtypDisplay-BoldItalic.woff2
│ │ │ ├── AtypDisplay-LightItalic.woff2
│ │ │ ├── AtypText-SemiboldItalic.woff2
│ │ │ ├── AtypDisplay-MediumItalic.woff2
│ │ │ └── AtypDisplay-SemiboldItalic.woff2
│ │ ├── apple-touch-icon-light.png
│ │ ├── android-chrome-192x192-dark.png
│ │ ├── android-chrome-192x192-light.png
│ │ ├── android-chrome-512x512-dark.png
│ │ ├── android-chrome-512x512-light.png
│ │ ├── .well-known
│ │ │ └── security.txt
│ │ ├── assets
│ │ │ ├── type-italic.svg
│ │ │ ├── type-bold.svg
│ │ │ └── type-code.svg
│ │ ├── robots.txt
│ │ └── opensearch.xml
│ ├── .npmrc
│ ├── postcss.config.js
│ ├── .env.example
│ ├── .prettierrc
│ ├── next-env.d.ts
│ ├── tailwind.config.js
│ └── tsconfig.json
└── prerender
│ ├── README.md
│ ├── .eslintrc.js
│ ├── .env.example
│ ├── src
│ ├── constants.ts
│ ├── pages
│ │ ├── index.tsx
│ │ └── _app.tsx
│ └── components
│ │ └── Shared
│ │ └── DefaultTags.tsx
│ ├── next-env.d.ts
│ ├── tsconfig.json
│ └── next.config.js
├── docs
├── devops.md
└── development.md
├── packages
├── README.md
├── workers
│ ├── freshdesk
│ │ ├── README.md
│ │ ├── .dev.vars.example
│ │ ├── tsconfig.json
│ │ ├── .eslintrc.js
│ │ └── wrangler.toml
│ ├── sts-generator
│ │ ├── .dockerignore
│ │ ├── .env.example
│ │ ├── README.md
│ │ └── .eslintrc.js
│ ├── metadata
│ │ ├── .dev.vars.example
│ │ ├── tsconfig.json
│ │ ├── .eslintrc.js
│ │ ├── wrangler.toml
│ │ └── README.md
│ └── prerender
│ │ ├── tsconfig.json
│ │ ├── wrangler.toml
│ │ ├── .eslintrc.js
│ │ ├── package.json
│ │ ├── README.md
│ │ └── src
│ │ └── index.ts
├── data
│ ├── aave-members.ts
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ ├── errors.ts
│ ├── staffs.ts
│ ├── apps.ts
│ ├── storage.ts
│ ├── lineaster-members.ts
│ ├── lens-endpoints.ts
│ ├── index.ts
│ ├── hashflags.ts
│ └── package.json
├── abis
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ ├── index.ts
│ └── package.json
├── lib
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ ├── trimify.ts
│ ├── getSnapshotProposalId.ts
│ ├── stopEventPropagation.ts
│ ├── hasGm.ts
│ ├── getURLs.ts
│ ├── getStampFyiURL.ts
│ ├── humanize.ts
│ ├── getAppName.ts
│ ├── getTokenImage.ts
│ ├── imageProxy.ts
│ ├── isVerified.ts
│ ├── isStaff.ts
│ ├── truncateByWords.ts
│ ├── getIsDispatcherEnabled.tsx
│ ├── isGardener.ts
│ ├── hasPrideLogo.ts
│ └── getTags.ts
├── ui
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ └── src
│ │ ├── PageLoading.tsx
│ │ └── EmptyState.tsx
├── snapshot
│ ├── apollo
│ │ ├── index.ts
│ │ ├── cache.ts
│ │ ├── httpLink.ts
│ │ ├── retryLink.ts
│ │ └── webClient.ts
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ ├── codegen.yml
│ └── Snapshot.graphql
├── image-cropper
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ ├── README.md
│ └── types.d.ts
├── lens
│ ├── documents
│ │ ├── queries
│ │ │ ├── ProfileInterests.graphql
│ │ │ ├── Challenge.graphql
│ │ │ ├── ProfileAddress.graphql
│ │ │ ├── EnabledCurrencyModules.graphql
│ │ │ ├── NftChallenge.graphql
│ │ │ ├── NotificationCount.graphql
│ │ │ ├── Trending.graphql
│ │ │ ├── RecommendedProfiles.graphql
│ │ │ ├── RelevantPeople.graphql
│ │ │ ├── FollowerNftOwnedTokenIds.graphql
│ │ │ ├── PublicationRevenue.graphql
│ │ │ ├── Mirrors.graphql
│ │ │ ├── GenerateModuleCurrencyApprovalData.graphql
│ │ │ ├── Profiles.graphql
│ │ │ ├── EnabledModules.graphql
│ │ │ ├── SearchProfiles.graphql
│ │ │ ├── MutualFollowersList.graphql
│ │ │ ├── LensterStats.graphql
│ │ │ ├── Following.graphql
│ │ │ ├── Likes.graphql
│ │ │ ├── EnabledCurrencyModulesWithProfile.graphql
│ │ │ ├── Collectors.graphql
│ │ │ ├── NftFeed.graphql
│ │ │ ├── CommentFeed.graphql
│ │ │ ├── HasTxHashBeenIndexed.graphql
│ │ │ ├── ApprovedModuleAllowanceAmount.graphql
│ │ │ ├── UserProfiles.graphql
│ │ │ ├── Followers.graphql
│ │ │ ├── NftGalleries.graphql
│ │ │ ├── SuperFollow.graphql
│ │ │ ├── MutualFollowers.graphql
│ │ │ ├── ProfileFeed.graphql
│ │ │ ├── FeedHighlights.graphql
│ │ │ ├── ExploreFeed.graphql
│ │ │ ├── SearchPublications.graphql
│ │ │ ├── CollectModule.graphql
│ │ │ └── CanDecryptStatus.graphql
│ │ ├── mutations
│ │ │ ├── AddReaction.graphql
│ │ │ ├── ProxyAction.graphql
│ │ │ ├── RemoveReaction.graphql
│ │ │ ├── HidePublication.graphql
│ │ │ ├── CreateNftGallery.graphql
│ │ │ ├── DeleteNftGallery.graphql
│ │ │ ├── ReportPublication.graphql
│ │ │ ├── AddProfileInterest.graphql
│ │ │ ├── UpdateNftGalleryInfo.graphql
│ │ │ ├── RemoveProfileInterest.graphql
│ │ │ ├── UpdateNftGalleryItems.graphql
│ │ │ ├── CreateProfile.graphql
│ │ │ ├── UpdateNftGalleryItemsOrder.graphql
│ │ │ ├── Authenticate.graphql
│ │ │ ├── CreateMirrorViaDispatcher.graphql
│ │ │ ├── CreatePostViaDispatcher.graphql
│ │ │ ├── CreateCommentViaDispatcher.graphql
│ │ │ ├── CreateSetProfileImageURIViaDispatcher.graphql
│ │ │ ├── Broadcast.graphql
│ │ │ ├── CreateSetProfileMetadataViaDispatcher.graphql
│ │ │ ├── CreateUnfollowTypedData.graphql
│ │ │ └── CreateBurnProfileTypedData.graphql
│ │ └── fragments
│ │ │ ├── ModuleFeeAmountFields.graphql
│ │ │ ├── StatsFields.graphql
│ │ │ ├── RelayerResultFields.graphql
│ │ │ ├── SimpleConditionFields.graphql
│ │ │ └── ProfileFields.graphql
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ ├── apollo
│ │ ├── lib
│ │ │ ├── index.ts
│ │ │ └── keyFields.ts
│ │ ├── httpLink.ts
│ │ ├── nodeClient.ts
│ │ ├── index.ts
│ │ ├── cache
│ │ │ ├── createSearchFieldPolicy.ts
│ │ │ ├── createFollowersFieldPolicy.ts
│ │ │ ├── createFollowingFieldPolicy.ts
│ │ │ ├── createNftsFieldPolicy.ts
│ │ │ ├── createFeedFieldPolicy.ts
│ │ │ ├── createFeedHighlightsFieldPolicy.ts
│ │ │ ├── createWhoReactedPublicationFieldPolicy.ts
│ │ │ ├── createExplorePublicationsFieldPolicy.ts
│ │ │ ├── createWhoCollectedPublicationFieldPolicy.ts
│ │ │ ├── createProfilesFieldPolicy.ts
│ │ │ ├── createNotificationsFieldPolicy.ts
│ │ │ ├── createMutualFollowersProfilesFieldPolicy.ts
│ │ │ └── createPublicationsFieldPolicy.ts
│ │ ├── retryLink.ts
│ │ └── webClient.ts
│ └── codegen.yml
├── tsconfig
│ ├── package.json
│ ├── nextjs.json
│ └── base.json
└── bundlr
│ ├── .eslintrc.js
│ ├── tsconfig.json
│ └── package.json
├── script
├── README.md
└── clean-branches
├── .vscode
├── settings.json
└── extensions.json
├── blockchain
├── .env.example
├── .prettierignore
├── tsconfig.json
├── .prettierrc
├── .eslintrc.json
└── hardhat.config.ts
├── .github
├── CODEOWNERS
├── FUNDING.yml
├── workflows
│ ├── load-test.yml
│ ├── releaser-dev.yaml
│ └── releaser-uat.yaml
└── PULL_REQUEST_TEMPLATE.md
├── .prettierignore
├── tests
├── .eslintrc.js
├── tsconfig.json
├── constants.ts
├── scripts
│ ├── apps
│ │ └── web
│ │ │ ├── contact.spec.ts
│ │ │ ├── privacy.spec.ts
│ │ │ └── terms.spec.ts
│ └── packages
│ │ └── lib
│ │ ├── isStaff.spec.ts
│ │ ├── isVerified.spec.ts
│ │ ├── isGardener.spec.ts
│ │ └── trimify.spec.ts
└── package.json
├── .husky
└── pre-commit
├── pnpm-workspace.yaml
├── .npmrc
├── CHANGELOG.md
├── k6
├── Dockerfile
├── .eslintrc.js
├── grafana-datasource.yaml
├── grafana-dashboard.yaml
└── run-load-test.sh
├── .eslintrc.js
├── .prettierrc
├── release-uat.sh
├── release-dev.sh
├── .deepsource.toml
└── turbo.json
/.nvmrc:
--------------------------------------------------------------------------------
1 | 18
2 |
--------------------------------------------------------------------------------
/apps/README.md:
--------------------------------------------------------------------------------
1 | # Apps
2 |
--------------------------------------------------------------------------------
/docs/devops.md:
--------------------------------------------------------------------------------
1 | # DevOps
2 |
--------------------------------------------------------------------------------
/packages/README.md:
--------------------------------------------------------------------------------
1 | # Packages
2 |
--------------------------------------------------------------------------------
/script/README.md:
--------------------------------------------------------------------------------
1 | # Scripts
2 |
--------------------------------------------------------------------------------
/apps/web/.dockerignore:
--------------------------------------------------------------------------------
1 | **/node_modules
--------------------------------------------------------------------------------
/apps/web/README.md:
--------------------------------------------------------------------------------
1 | # Lineaster Web
2 |
--------------------------------------------------------------------------------
/apps/web/.gitignore:
--------------------------------------------------------------------------------
1 | src/locales/**/*.js
2 |
--------------------------------------------------------------------------------
/apps/web/packages/README.md:
--------------------------------------------------------------------------------
1 | # Packages
2 |
--------------------------------------------------------------------------------
/apps/prerender/README.md:
--------------------------------------------------------------------------------
1 | # Lineaster Prerender for SEO
2 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.tabSize": 2,
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - 'packages/*'
3 |
--------------------------------------------------------------------------------
/blockchain/.env.example:
--------------------------------------------------------------------------------
1 | LINEA_RPC_URL=
2 | PRIVATE_KEY=
3 |
--------------------------------------------------------------------------------
/packages/workers/freshdesk/README.md:
--------------------------------------------------------------------------------
1 | # Freshdesk worker
2 |
--------------------------------------------------------------------------------
/packages/workers/sts-generator/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @Akaryatrh @alainncls @igorms-cons @mlallai
2 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/freshdesk/README.md:
--------------------------------------------------------------------------------
1 | # Freshdesk worker
2 |
--------------------------------------------------------------------------------
/packages/data/aave-members.ts:
--------------------------------------------------------------------------------
1 | export const aaveMembers = [];
2 |
--------------------------------------------------------------------------------
/packages/workers/freshdesk/.dev.vars.example:
--------------------------------------------------------------------------------
1 | POSTMARK_TOKEN=""
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | out
3 | .next
4 | .turbo
5 | .github
6 |
--------------------------------------------------------------------------------
/apps/web/packages/data/aave-members.ts:
--------------------------------------------------------------------------------
1 | export const aaveMembers = [];
2 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/sts-generator/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/packages/workers/metadata/.dev.vars.example:
--------------------------------------------------------------------------------
1 | BUNDLR_PRIVATE_KEY=""
2 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/freshdesk/.dev.vars.example:
--------------------------------------------------------------------------------
1 | POSTMARK_TOKEN=""
2 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/metadata/.dev.vars.example:
--------------------------------------------------------------------------------
1 | BUNDLR_PRIVATE_KEY=""
2 |
--------------------------------------------------------------------------------
/apps/web/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | out
3 | .next
4 | .turbo
5 | .github
6 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [lensterxyz]
2 | custom: ['https://lenster.xyz/donate']
3 |
--------------------------------------------------------------------------------
/blockchain/.prettierignore:
--------------------------------------------------------------------------------
1 | artifacts
2 | cache
3 | node_modules
4 | typechain-types
5 |
--------------------------------------------------------------------------------
/tests/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/src/pages/mod.tsx:
--------------------------------------------------------------------------------
1 | import Mod from '@components/Mod';
2 |
3 | export default Mod;
4 |
--------------------------------------------------------------------------------
/apps/prerender/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/public/lens.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/lens.png
--------------------------------------------------------------------------------
/apps/web/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import Home from '@components/Home';
2 |
3 | export default Home;
4 |
--------------------------------------------------------------------------------
/packages/abis/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/packages/data/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/packages/lib/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/packages/ui/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | pnpm lint:fix
5 | pnpm typecheck
6 |
--------------------------------------------------------------------------------
/apps/web/packages/ui/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/src/pages/search.tsx:
--------------------------------------------------------------------------------
1 | import Search from '@components/Search';
2 |
3 | export default Search;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/terms.tsx:
--------------------------------------------------------------------------------
1 | import Terms from '@components/Pages/Terms';
2 |
3 | export default Terms;
4 |
--------------------------------------------------------------------------------
/packages/snapshot/apollo/index.ts:
--------------------------------------------------------------------------------
1 | import webClient from './webClient';
2 |
3 | export { webClient };
4 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/abis/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/packages/data/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/favicon.ico
--------------------------------------------------------------------------------
/apps/web/src/pages/explore.tsx:
--------------------------------------------------------------------------------
1 | import Explore from '@components/Explore';
2 |
3 | export default Explore;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/thanks.tsx:
--------------------------------------------------------------------------------
1 | import Thanks from '@components/Pages/Thanks';
2 |
3 | export default Thanks;
4 |
--------------------------------------------------------------------------------
/packages/image-cropper/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/apollo/index.ts:
--------------------------------------------------------------------------------
1 | import webClient from './webClient';
2 |
3 | export { webClient };
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/contact.tsx:
--------------------------------------------------------------------------------
1 | import Contact from '@components/Pages/Contact';
2 |
3 | export default Contact;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/privacy.tsx:
--------------------------------------------------------------------------------
1 | import Privacy from '@components/Pages/Privacy';
2 |
3 | export default Privacy;
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/ProfileInterests.graphql:
--------------------------------------------------------------------------------
1 | query ProfileInterests {
2 | profileInterests
3 | }
4 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - 'apps/*'
3 | - 'packages/*'
4 | - 'packages/workers/*'
5 | - 'tests'
6 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 | auto-install-peers=true
3 | strict-peer-dependencies=false
4 | link-workspace-packages=false
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | Visit [releases](https://github.com/ConsenSys/lineaster/releases) for full changelog.
4 |
--------------------------------------------------------------------------------
/apps/web/packages/image-cropper/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint']
4 | };
5 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/ProfileInterests.graphql:
--------------------------------------------------------------------------------
1 | query ProfileInterests {
2 | profileInterests
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/messages/index.tsx:
--------------------------------------------------------------------------------
1 | import Messages from '@components/Messages';
2 |
3 | export default Messages;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/u/[username].tsx:
--------------------------------------------------------------------------------
1 | import ViewProfile from '@components/Profile';
2 |
3 | export default ViewProfile;
4 |
--------------------------------------------------------------------------------
/k6/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM --platform=linux/amd64 grafana/k6
2 | COPY script.js ./script.js
3 | ENTRYPOINT ["k6", "run" "script.js"]
--------------------------------------------------------------------------------
/apps/prerender/.env.example:
--------------------------------------------------------------------------------
1 | # mainnet, testnet, staging, sandbox or staging-sandbox
2 | NEXT_PUBLIC_LENS_NETWORK="testnet"
3 |
--------------------------------------------------------------------------------
/apps/web/src/constants.ts:
--------------------------------------------------------------------------------
1 | import { lineaTestnet } from '@wagmi/chains';
2 |
3 | export const CHAIN_ID = lineaTestnet.id;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/new/profile.tsx:
--------------------------------------------------------------------------------
1 | import NewProfile from '@components/Profile/New';
2 |
3 | export default NewProfile;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/stafftools/index.tsx:
--------------------------------------------------------------------------------
1 | import Stats from '@components/StaffTools/Stats';
2 |
3 | export default Stats;
4 |
--------------------------------------------------------------------------------
/apps/web/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 | auto-install-peers=true
3 | strict-peer-dependencies=false
4 | link-workspace-packages=false
--------------------------------------------------------------------------------
/apps/web/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {}
5 | }
6 | };
7 |
--------------------------------------------------------------------------------
/apps/web/public/favicon-16x16-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/favicon-16x16-dark.png
--------------------------------------------------------------------------------
/apps/web/public/favicon-16x16-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/favicon-16x16-light.png
--------------------------------------------------------------------------------
/apps/web/public/favicon-32x32-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/favicon-32x32-dark.png
--------------------------------------------------------------------------------
/apps/web/public/favicon-32x32-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/favicon-32x32-light.png
--------------------------------------------------------------------------------
/apps/web/src/pages/notifications.tsx:
--------------------------------------------------------------------------------
1 | import Notification from '@components/Notification';
2 |
3 | export default Notification;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/posts/[id].tsx:
--------------------------------------------------------------------------------
1 | import ViewPublication from '@components/Publication';
2 |
3 | export default ViewPublication;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/report/[id]/index.tsx:
--------------------------------------------------------------------------------
1 | import Report from '@components/Shared/Modal/Report';
2 |
3 | export default Report;
4 |
--------------------------------------------------------------------------------
/k6/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | sourceType: 'module',
4 | env: {
5 | es6: true
6 | }
7 | };
8 |
--------------------------------------------------------------------------------
/apps/web/public/apple-touch-icon-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/apple-touch-icon-dark.png
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-Bold.woff2
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | settings: {
4 | next: {
5 | rootDir: ['apps/*/']
6 | }
7 | }
8 | };
9 |
--------------------------------------------------------------------------------
/apps/web/public/apple-touch-icon-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/apple-touch-icon-light.png
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-Bold.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-Italic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-Light.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-Medium.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-Regular.woff2
--------------------------------------------------------------------------------
/apps/web/src/pages/messages/[...conversationKey].tsx:
--------------------------------------------------------------------------------
1 | import Message from '@components/Messages/Message';
2 |
3 | export default Message;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/delete.tsx:
--------------------------------------------------------------------------------
1 | import DeleteSettings from '@components/Settings/Delete';
2 |
3 | export default DeleteSettings;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/index.tsx:
--------------------------------------------------------------------------------
1 | import ProfileSettings from '@components/Settings/Profile';
2 |
3 | export default ProfileSettings;
4 |
--------------------------------------------------------------------------------
/packages/lens/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | ignorePatterns: ['generated.ts']
5 | };
6 |
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-Italic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-Light.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-Medium.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-Semibold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-Semibold.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/CircularXXSub-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/CircularXXSub-Bold.woff
--------------------------------------------------------------------------------
/apps/web/public/fonts/CircularXXSub-Book.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/CircularXXSub-Book.woff
--------------------------------------------------------------------------------
/apps/web/src/pages/nft/[address]/[tokenId].tsx:
--------------------------------------------------------------------------------
1 | import NFTDetail from '@components/Profile/NftGallery/Detail';
2 |
3 | export default NFTDetail;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/account.tsx:
--------------------------------------------------------------------------------
1 | import AccountSettings from '@components/Settings/Account';
2 |
3 | export default AccountSettings;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/cleanup.tsx:
--------------------------------------------------------------------------------
1 | import CleanupSettings from '@components/Settings/Cleanup';
2 |
3 | export default CleanupSettings;
4 |
--------------------------------------------------------------------------------
/packages/snapshot/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | ignorePatterns: ['generated.ts']
5 | };
6 |
--------------------------------------------------------------------------------
/apps/web/.env.example:
--------------------------------------------------------------------------------
1 | # mainnet, testnet, staging, sandbox or staging-sandbox
2 | NEXT_PUBLIC_LENS_NETWORK=testnet
3 | NEXT_PUBLIC_MIXPANEL_TOKEN=
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | ignorePatterns: ['generated.ts']
5 | };
6 |
--------------------------------------------------------------------------------
/apps/web/public/android-chrome-192x192-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/android-chrome-192x192-dark.png
--------------------------------------------------------------------------------
/apps/web/public/android-chrome-192x192-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/android-chrome-192x192-light.png
--------------------------------------------------------------------------------
/apps/web/public/android-chrome-512x512-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/android-chrome-512x512-dark.png
--------------------------------------------------------------------------------
/apps/web/public/android-chrome-512x512-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/android-chrome-512x512-light.png
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-Regular.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-Semibold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-Semibold.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-BoldItalic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-LightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-LightItalic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-MediumItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-MediumItalic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/CircularXXSub-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/CircularXXSub-Medium.woff
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/allowance.tsx:
--------------------------------------------------------------------------------
1 | import AllowanceSettings from '@components/Settings/Allowance';
2 |
3 | export default AllowanceSettings;
4 |
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/interests.tsx:
--------------------------------------------------------------------------------
1 | import InterestsSettings from '@components/Settings/Interests';
2 |
3 | export default InterestsSettings;
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/AddReaction.graphql:
--------------------------------------------------------------------------------
1 | mutation AddReaction($request: ReactionRequest!) {
2 | addReaction(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | ignorePatterns: ['generated.ts']
5 | };
6 |
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-BoldItalic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-LightItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-LightItalic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypText-SemiboldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypText-SemiboldItalic.woff2
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/dispatcher.tsx:
--------------------------------------------------------------------------------
1 | import DispatcherSettings from '@components/Settings/Dispatcher';
2 |
3 | export default DispatcherSettings;
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/ProxyAction.graphql:
--------------------------------------------------------------------------------
1 | mutation ProxyAction($request: ProxyActionRequest!) {
2 | proxyAction(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/AddReaction.graphql:
--------------------------------------------------------------------------------
1 | mutation AddReaction($request: ReactionRequest!) {
2 | addReaction(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/ProxyAction.graphql:
--------------------------------------------------------------------------------
1 | mutation ProxyAction($request: ProxyActionRequest!) {
2 | proxyAction(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-MediumItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-MediumItalic.woff2
--------------------------------------------------------------------------------
/apps/web/public/fonts/AtypDisplay-SemiboldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Consensys/lineaster/HEAD/apps/web/public/fonts/AtypDisplay-SemiboldItalic.woff2
--------------------------------------------------------------------------------
/apps/web/src/pages/settings/preferences.tsx:
--------------------------------------------------------------------------------
1 | import PreferencesSettings from '@components/Settings/Preferences';
2 |
3 | export default PreferencesSettings;
4 |
--------------------------------------------------------------------------------
/packages/abis/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/data/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/RemoveReaction.graphql:
--------------------------------------------------------------------------------
1 | mutation RemoveReaction($request: ReactionRequest!) {
2 | removeReaction(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/lib/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Challenge.graphql:
--------------------------------------------------------------------------------
1 | query Challenge($request: ChallengeRequest!) {
2 | challenge(request: $request) {
3 | text
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/snapshot/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/prerender/src/constants.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data';
2 |
3 | export const BASE_URL = IS_MAINNET ? 'https://lenster.xyz' : 'https://testnet.lenster.xyz';
4 |
--------------------------------------------------------------------------------
/apps/web/packages/abis/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/data/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/RemoveReaction.graphql:
--------------------------------------------------------------------------------
1 | mutation RemoveReaction($request: ReactionRequest!) {
2 | removeReaction(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Challenge.graphql:
--------------------------------------------------------------------------------
1 | query Challenge($request: ChallengeRequest!) {
2 | challenge(request: $request) {
3 | text
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/image-cropper/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/HidePublication.graphql:
--------------------------------------------------------------------------------
1 | mutation HidePublication($request: HidePublicationRequest!) {
2 | hidePublication(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/abis/index.ts:
--------------------------------------------------------------------------------
1 | export * from './FollowNft';
2 | export * from './LensHub';
3 | export * from './LensPeriphery';
4 | export * from './UpdateOwnableFeeCollectModule';
5 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateNftGallery.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateNftGallery($request: NftGalleryCreateRequest!) {
2 | createNftGallery(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/DeleteNftGallery.graphql:
--------------------------------------------------------------------------------
1 | mutation DeleteNftGallery($request: NftGalleryDeleteRequest!) {
2 | deleteNftGallery(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/ReportPublication.graphql:
--------------------------------------------------------------------------------
1 | mutation ReportPublication($request: ReportPublicationRequest!) {
2 | reportPublication(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/workers/sts-generator/.env.example:
--------------------------------------------------------------------------------
1 | STS_BUCKET_NAME=
2 | STS_BUCKET_REGION=
3 | STS_ENDPOINT=
4 | STS_FILE_PATH=
5 | STS_SECRET_CONTENT=
6 | STS_CORS=
7 | STS_PORT=
8 |
--------------------------------------------------------------------------------
/apps/web/packages/image-cropper/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateNftGallery.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateNftGallery($request: NftGalleryCreateRequest!) {
2 | createNftGallery(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/DeleteNftGallery.graphql:
--------------------------------------------------------------------------------
1 | mutation DeleteNftGallery($request: NftGalleryDeleteRequest!) {
2 | deleteNftGallery(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/HidePublication.graphql:
--------------------------------------------------------------------------------
1 | mutation HidePublication($request: HidePublicationRequest!) {
2 | hidePublication(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/abis/index.ts:
--------------------------------------------------------------------------------
1 | export * from './FollowNft';
2 | export * from './LensHub';
3 | export * from './LensPeriphery';
4 | export * from './UpdateOwnableFeeCollectModule';
5 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/ReportPublication.graphql:
--------------------------------------------------------------------------------
1 | mutation ReportPublication($request: ReportPublicationRequest!) {
2 | reportPublication(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/sts-generator/.env.example:
--------------------------------------------------------------------------------
1 | STS_BUCKET_NAME=
2 | STS_BUCKET_REGION=
3 | STS_ENDPOINT=
4 | STS_FILE_PATH=
5 | STS_SECRET_CONTENT=
6 | STS_CORS=
7 | STS_PORT=
8 |
--------------------------------------------------------------------------------
/packages/data/errors.ts:
--------------------------------------------------------------------------------
1 | export enum Errors {
2 | SomethingWentWrong = 'Something went wrong!',
3 | SignWallet = 'Please sign in your wallet.'
4 | }
5 |
6 | export default Errors;
7 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/AddProfileInterest.graphql:
--------------------------------------------------------------------------------
1 | mutation AddProfileInterest($request: AddProfileInterestsRequest!) {
2 | addProfileInterests(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/prerender/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import type { NextPage } from 'next';
2 |
3 | const Home: NextPage = () => {
4 | return
Prerender App
;
5 | };
6 |
7 | export default Home;
8 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/AddProfileInterest.graphql:
--------------------------------------------------------------------------------
1 | mutation AddProfileInterest($request: AddProfileInterestsRequest!) {
2 | addProfileInterests(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/UpdateNftGalleryInfo.graphql:
--------------------------------------------------------------------------------
1 | mutation UpdateNftGalleryInfo($request: NftGalleryUpdateInfoRequest!) {
2 | updateNftGalleryInfo(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/data/errors.ts:
--------------------------------------------------------------------------------
1 | export enum Errors {
2 | SomethingWentWrong = 'Something went wrong!',
3 | SignWallet = 'Please sign in your wallet.'
4 | }
5 |
6 | export default Errors;
7 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/RemoveProfileInterest.graphql:
--------------------------------------------------------------------------------
1 | mutation RemoveProfileInterest($request: RemoveProfileInterestsRequest!) {
2 | removeProfileInterests(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/UpdateNftGalleryItems.graphql:
--------------------------------------------------------------------------------
1 | mutation UpdateNftGalleryItems($request: NftGalleryUpdateItemsRequest!) {
2 | updateNftGalleryItems(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/ProfileAddress.graphql:
--------------------------------------------------------------------------------
1 | query ProfileAddress($request: SingleProfileQueryRequest!) {
2 | profile(request: $request) {
3 | id
4 | ownedBy
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/workers/freshdesk/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/base.json",
3 | "compilerOptions": {
4 | "types": ["@cloudflare/workers-types"],
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/workers/metadata/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/base.json",
3 | "compilerOptions": {
4 | "types": ["@cloudflare/workers-types"],
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/workers/prerender/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/base.json",
3 | "compilerOptions": {
4 | "types": ["@cloudflare/workers-types"],
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/UpdateNftGalleryInfo.graphql:
--------------------------------------------------------------------------------
1 | mutation UpdateNftGalleryInfo($request: NftGalleryUpdateInfoRequest!) {
2 | updateNftGalleryInfo(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/UpdateNftGalleryItems.graphql:
--------------------------------------------------------------------------------
1 | mutation UpdateNftGalleryItems($request: NftGalleryUpdateItemsRequest!) {
2 | updateNftGalleryItems(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateProfile.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateProfile($request: CreateProfileRequest!) {
2 | createProfile(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/UpdateNftGalleryItemsOrder.graphql:
--------------------------------------------------------------------------------
1 | mutation UpdateNftGalleryOrder($request: NftGalleryUpdateItemOrderRequest!) {
2 | updateNftGalleryOrder(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/packages/ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | },
7 | "include": ["**/*.ts", "**/*.tsx"]
8 | }
9 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/RemoveProfileInterest.graphql:
--------------------------------------------------------------------------------
1 | mutation RemoveProfileInterest($request: RemoveProfileInterestsRequest!) {
2 | removeProfileInterests(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/ProfileAddress.graphql:
--------------------------------------------------------------------------------
1 | query ProfileAddress($request: SingleProfileQueryRequest!) {
2 | profile(request: $request) {
3 | id
4 | ownedBy
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/freshdesk/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/base.json",
3 | "compilerOptions": {
4 | "types": ["@cloudflare/workers-types"],
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/metadata/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/base.json",
3 | "compilerOptions": {
4 | "types": ["@cloudflare/workers-types"],
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/prerender/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/base.json",
3 | "compilerOptions": {
4 | "types": ["@cloudflare/workers-types"],
5 | "noEmit": true
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/data/staffs.ts:
--------------------------------------------------------------------------------
1 | import { lineasterMembers } from './lineaster-members';
2 |
3 | export const mainnetStaffs = [...lineasterMembers];
4 |
5 | export const testnetStaffs = [...lineasterMembers];
6 |
--------------------------------------------------------------------------------
/packages/lens/documents/fragments/ModuleFeeAmountFields.graphql:
--------------------------------------------------------------------------------
1 | fragment ModuleFeeAmountFields on ModuleFeeAmount {
2 | asset {
3 | symbol
4 | decimals
5 | address
6 | }
7 | value
8 | }
9 |
--------------------------------------------------------------------------------
/packages/lens/documents/fragments/StatsFields.graphql:
--------------------------------------------------------------------------------
1 | fragment StatsFields on PublicationStats {
2 | totalUpvotes
3 | totalAmountOfMirrors
4 | totalAmountOfCollects
5 | totalAmountOfComments
6 | }
7 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/EnabledCurrencyModules.graphql:
--------------------------------------------------------------------------------
1 | query EnabledCurrencyModules {
2 | enabledModuleCurrencies {
3 | name
4 | symbol
5 | decimals
6 | address
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/NftChallenge.graphql:
--------------------------------------------------------------------------------
1 | query NftChallenge($request: NftOwnershipChallengeRequest!) {
2 | nftOwnershipChallenge(request: $request) {
3 | id
4 | text
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/workers/prerender/wrangler.toml:
--------------------------------------------------------------------------------
1 | name = "prerender"
2 | main = "src/index.ts"
3 | compatibility_date = "2023-01-25"
4 |
5 | routes = [
6 | "lenster.xyz/u/*",
7 | "lenster.xyz/posts/*"
8 | ]
9 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateProfile.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateProfile($request: CreateProfileRequest!) {
2 | createProfile(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/UpdateNftGalleryItemsOrder.graphql:
--------------------------------------------------------------------------------
1 | mutation UpdateNftGalleryOrder($request: NftGalleryUpdateItemOrderRequest!) {
2 | updateNftGalleryOrder(request: $request)
3 | }
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/EnabledCurrencyModules.graphql:
--------------------------------------------------------------------------------
1 | query EnabledCurrencyModules {
2 | enabledModuleCurrencies {
3 | name
4 | symbol
5 | decimals
6 | address
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/apps/web/packages/ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true
6 | },
7 | "include": ["**/*.ts", "**/*.tsx"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/Authenticate.graphql:
--------------------------------------------------------------------------------
1 | mutation Authenticate($request: SignedAuthChallenge!) {
2 | authenticate(request: $request) {
3 | accessToken
4 | refreshToken
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/data/staffs.ts:
--------------------------------------------------------------------------------
1 | import { lineasterMembers } from './lineaster-members';
2 |
3 | export const mainnetStaffs = [...lineasterMembers];
4 |
5 | export const testnetStaffs = [...lineasterMembers];
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/fragments/ModuleFeeAmountFields.graphql:
--------------------------------------------------------------------------------
1 | fragment ModuleFeeAmountFields on ModuleFeeAmount {
2 | asset {
3 | symbol
4 | decimals
5 | address
6 | }
7 | value
8 | }
9 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/fragments/StatsFields.graphql:
--------------------------------------------------------------------------------
1 | fragment StatsFields on PublicationStats {
2 | totalUpvotes
3 | totalAmountOfMirrors
4 | totalAmountOfCollects
5 | totalAmountOfComments
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/Authenticate.graphql:
--------------------------------------------------------------------------------
1 | mutation Authenticate($request: SignedAuthChallenge!) {
2 | authenticate(request: $request) {
3 | accessToken
4 | refreshToken
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/NftChallenge.graphql:
--------------------------------------------------------------------------------
1 | query NftChallenge($request: NftOwnershipChallengeRequest!) {
2 | nftOwnershipChallenge(request: $request) {
3 | id
4 | text
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/prerender/wrangler.toml:
--------------------------------------------------------------------------------
1 | name = "prerender"
2 | main = "src/index.ts"
3 | compatibility_date = "2023-01-25"
4 |
5 | routes = [
6 | "lenster.xyz/u/*",
7 | "lenster.xyz/posts/*"
8 | ]
9 |
--------------------------------------------------------------------------------
/packages/tsconfig/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tsconfig",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "publishConfig": {
7 | "access": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/apps/prerender/src/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import type { AppProps } from 'next/app';
2 |
3 | const App = ({ Component, pageProps }: AppProps) => {
4 | return ;
5 | };
6 |
7 | export default App;
8 |
--------------------------------------------------------------------------------
/apps/web/packages/tsconfig/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tsconfig",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "publishConfig": {
7 | "access": "public"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/k6/grafana-datasource.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | datasources:
4 | - name: k6influxdb
5 | type: influxdb
6 | access: proxy
7 | database: k6
8 | url: http://influxdb:8086
9 | isDefault: true
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/NotificationCount.graphql:
--------------------------------------------------------------------------------
1 | query NotificationCount($request: NotificationRequest!) {
2 | notifications(request: $request) {
3 | pageInfo {
4 | totalCount
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Trending.graphql:
--------------------------------------------------------------------------------
1 | query Trending($request: AllPublicationsTagsRequest!) {
2 | allPublicationsTags(request: $request) {
3 | items {
4 | tag
5 | total
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/apps/web/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "arrowParens": "always",
3 | "bracketSpacing": true,
4 | "semi": true,
5 | "useTabs": false,
6 | "trailingComma": "none",
7 | "singleQuote": true,
8 | "printWidth": 110
9 | }
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/NotificationCount.graphql:
--------------------------------------------------------------------------------
1 | query NotificationCount($request: NotificationRequest!) {
2 | notifications(request: $request) {
3 | pageInfo {
4 | totalCount
5 | }
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/workers/sts-generator/README.md:
--------------------------------------------------------------------------------
1 | # STS token generator worker
2 |
3 | STS service to generate temporary tokens for end-users to upload media to our S3 bucket.
4 |
5 | The generated STS tokens are valid for 900 seconds.
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Trending.graphql:
--------------------------------------------------------------------------------
1 | query Trending($request: AllPublicationsTagsRequest!) {
2 | allPublicationsTags(request: $request) {
3 | items {
4 | tag
5 | total
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/k6/grafana-dashboard.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 | providers:
3 | - name: 'default'
4 | org_id: 1
5 | folder: ''
6 | type: 'file'
7 | options:
8 | path: /var/lib/grafana/dashboards
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateMirrorViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateMirrorViaDispatcher($request: CreateMirrorRequest!) {
2 | createMirrorViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreatePostViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreatePostViaDispatcher($request: CreatePublicPostRequest!) {
2 | createPostViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/RecommendedProfiles.graphql:
--------------------------------------------------------------------------------
1 | query RecommendedProfiles($options: RecommendedProfileOptions) {
2 | recommendedProfiles(options: $options) {
3 | ...ProfileFields
4 | isFollowedByMe
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/sts-generator/README.md:
--------------------------------------------------------------------------------
1 | # STS token generator worker
2 |
3 | STS service to generate temporary tokens for end-users to upload media to our S3 bucket.
4 |
5 | The generated STS tokens are valid for 900 seconds.
6 |
--------------------------------------------------------------------------------
/packages/image-cropper/README.md:
--------------------------------------------------------------------------------
1 | # Image cropper
2 |
3 | This package contains an image cropper component and related helper functions. It is a largely modified version of [react-easy-crop](https://valentinh.github.io/react-easy-crop/).
4 |
--------------------------------------------------------------------------------
/packages/lens/documents/fragments/RelayerResultFields.graphql:
--------------------------------------------------------------------------------
1 | fragment RelayerResultFields on RelayResult {
2 | ... on RelayerResult {
3 | txHash
4 | txId
5 | }
6 | ... on RelayError {
7 | reason
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/RelevantPeople.graphql:
--------------------------------------------------------------------------------
1 | query RelevantPeople($request: ProfileQueryRequest!) {
2 | profiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isFollowedByMe
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tests/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true,
6 | "paths": {
7 | "test/constants": ["constants.ts"]
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateMirrorViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateMirrorViaDispatcher($request: CreateMirrorRequest!) {
2 | createMirrorViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreatePostViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreatePostViaDispatcher($request: CreatePublicPostRequest!) {
2 | createPostViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/RecommendedProfiles.graphql:
--------------------------------------------------------------------------------
1 | query RecommendedProfiles($options: RecommendedProfileOptions) {
2 | recommendedProfiles(options: $options) {
3 | ...ProfileFields
4 | isFollowedByMe
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateCommentViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateCommentViaDispatcher($request: CreatePublicCommentRequest!) {
2 | createCommentViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/prerender/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
4 | // NOTE: This file should not be edited
5 | // see https://nextjs.org/docs/basic-features/typescript for more information.
6 |
--------------------------------------------------------------------------------
/apps/web/packages/image-cropper/README.md:
--------------------------------------------------------------------------------
1 | # Image cropper
2 |
3 | This package contains an image cropper component and related helper functions. It is a largely modified version of [react-easy-crop](https://valentinh.github.io/react-easy-crop/).
4 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/fragments/RelayerResultFields.graphql:
--------------------------------------------------------------------------------
1 | fragment RelayerResultFields on RelayResult {
2 | ... on RelayerResult {
3 | txHash
4 | txId
5 | }
6 | ... on RelayError {
7 | reason
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/RelevantPeople.graphql:
--------------------------------------------------------------------------------
1 | query RelevantPeople($request: ProfileQueryRequest!) {
2 | profiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isFollowedByMe
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateCommentViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateCommentViaDispatcher($request: CreatePublicCommentRequest!) {
2 | createCommentViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/snapshot/apollo/cache.ts:
--------------------------------------------------------------------------------
1 | import { InMemoryCache } from '@apollo/client';
2 |
3 | import result from '../generated';
4 |
5 | const cache = new InMemoryCache({
6 | possibleTypes: result.possibleTypes
7 | });
8 |
9 | export default cache;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/lib/index.ts:
--------------------------------------------------------------------------------
1 | import cursorBasedPagination from './cursorBasedPagination';
2 | import { publicationKeyFields } from './keyFields';
3 | import parseJwt from './parseJwt';
4 |
5 | export { cursorBasedPagination, parseJwt, publicationKeyFields };
6 |
--------------------------------------------------------------------------------
/packages/snapshot/apollo/httpLink.ts:
--------------------------------------------------------------------------------
1 | import { HttpLink } from '@apollo/client';
2 |
3 | const httpLink = new HttpLink({
4 | uri: 'https://hub.snapshot.org/graphql',
5 | fetchOptions: 'no-cors',
6 | fetch
7 | });
8 |
9 | export default httpLink;
10 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "arrowParens": "always",
3 | "bracketSpacing": true,
4 | "semi": true,
5 | "useTabs": false,
6 | "trailingComma": "none",
7 | "singleQuote": true,
8 | "printWidth": 110,
9 | "plugins": ["prettier-plugin-tailwindcss"]
10 | }
11 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/apollo/cache.ts:
--------------------------------------------------------------------------------
1 | import { InMemoryCache } from '@apollo/client';
2 |
3 | import result from '../generated';
4 |
5 | const cache = new InMemoryCache({
6 | possibleTypes: result.possibleTypes
7 | });
8 |
9 | export default cache;
10 |
--------------------------------------------------------------------------------
/apps/web/src/components/utils/uniqBy.ts:
--------------------------------------------------------------------------------
1 | export const uniqBy = (arr: Array, key: string) => {
2 | return Object.values(
3 | arr.reduce((m, i) => {
4 | m[key.split('.').reduce((a, p) => a?.[p], i)] = i;
5 | return m;
6 | }, {})
7 | );
8 | };
9 |
--------------------------------------------------------------------------------
/packages/lens/apollo/httpLink.ts:
--------------------------------------------------------------------------------
1 | import { HttpLink } from '@apollo/client';
2 | import { API_URL } from 'data';
3 |
4 | const httpLink = new HttpLink({
5 | uri: API_URL,
6 | fetchOptions: 'no-cors',
7 | fetch
8 | });
9 |
10 | export default httpLink;
11 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/FollowerNftOwnedTokenIds.graphql:
--------------------------------------------------------------------------------
1 | query FollowersNftOwnedTokenIds($request: FollowerNftOwnedTokenIdsRequest!) {
2 | followerNftOwnedTokenIds(request: $request) {
3 | followerNftAddress
4 | tokensIds
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/lib/index.ts:
--------------------------------------------------------------------------------
1 | import cursorBasedPagination from './cursorBasedPagination';
2 | import { publicationKeyFields } from './keyFields';
3 | import parseJwt from './parseJwt';
4 |
5 | export { cursorBasedPagination, parseJwt, publicationKeyFields };
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/FollowerNftOwnedTokenIds.graphql:
--------------------------------------------------------------------------------
1 | query FollowersNftOwnedTokenIds($request: FollowerNftOwnedTokenIdsRequest!) {
2 | followerNftOwnedTokenIds(request: $request) {
3 | followerNftAddress
4 | tokensIds
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/apollo/httpLink.ts:
--------------------------------------------------------------------------------
1 | import { HttpLink } from '@apollo/client';
2 |
3 | const httpLink = new HttpLink({
4 | uri: 'https://hub.snapshot.org/graphql',
5 | fetchOptions: 'no-cors',
6 | fetch
7 | });
8 |
9 | export default httpLink;
10 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Markup/Code.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | const Code: FC = (props: any) => {
4 | return ;
5 | };
6 |
7 | export default Code;
8 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/PublicationRevenue.graphql:
--------------------------------------------------------------------------------
1 | query PublicationRevenue($request: PublicationRevenueQueryRequest!) {
2 | publicationRevenue(request: $request) {
3 | revenue {
4 | total {
5 | value
6 | }
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/httpLink.ts:
--------------------------------------------------------------------------------
1 | import { HttpLink } from '@apollo/client';
2 | import { API_URL } from 'data';
3 |
4 | const httpLink = new HttpLink({
5 | uri: API_URL,
6 | fetchOptions: 'no-cors',
7 | fetch
8 | });
9 |
10 | export default httpLink;
11 |
--------------------------------------------------------------------------------
/packages/bundlr/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateSetProfileImageURIViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateSetProfileImageURIViaDispatcher($request: UpdateProfileImageRequest!) {
2 | createSetProfileImageURIViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Mirrors.graphql:
--------------------------------------------------------------------------------
1 | query Mirrors($request: ProfileQueryRequest!) {
2 | profiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isFollowedByMe
6 | }
7 | pageInfo {
8 | next
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/PublicationRevenue.graphql:
--------------------------------------------------------------------------------
1 | query PublicationRevenue($request: PublicationRevenueQueryRequest!) {
2 | publicationRevenue(request: $request) {
3 | revenue {
4 | total {
5 | value
6 | }
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/GenerateModuleCurrencyApprovalData.graphql:
--------------------------------------------------------------------------------
1 | query GenerateModuleCurrencyApprovalData($request: GenerateModuleCurrencyApprovalDataRequest!) {
2 | generateModuleCurrencyApprovalData(request: $request) {
3 | to
4 | from
5 | data
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/apps/web/packages/bundlr/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateSetProfileImageURIViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateSetProfileImageURIViaDispatcher($request: UpdateProfileImageRequest!) {
2 | createSetProfileImageURIViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Mirrors.graphql:
--------------------------------------------------------------------------------
1 | query Mirrors($request: ProfileQueryRequest!) {
2 | profiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isFollowedByMe
6 | }
7 | pageInfo {
8 | next
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/data/apps.ts:
--------------------------------------------------------------------------------
1 | export const apps = [
2 | 'lenster',
3 | 'lenstube',
4 | 'lenstube-bytes',
5 | 'orb',
6 | 'phaver',
7 | 'lensport',
8 | 'buttrfly',
9 | 'memester',
10 | 'pinsta',
11 | 'chainjet',
12 | 'wav3s',
13 | 'lensta',
14 | 'beats'
15 | ];
16 |
--------------------------------------------------------------------------------
/packages/workers/freshdesk/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/packages/workers/metadata/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/packages/workers/prerender/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/GenerateModuleCurrencyApprovalData.graphql:
--------------------------------------------------------------------------------
1 | query GenerateModuleCurrencyApprovalData($request: GenerateModuleCurrencyApprovalDataRequest!) {
2 | generateModuleCurrencyApprovalData(request: $request) {
3 | to
4 | from
5 | data
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/Broadcast.graphql:
--------------------------------------------------------------------------------
1 | mutation Broadcast($request: BroadcastRequest!) {
2 | broadcast(request: $request) {
3 | ... on RelayerResult {
4 | txHash
5 | txId
6 | }
7 | ... on RelayError {
8 | reason
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateSetProfileMetadataViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateSetProfileMetadataViaDispatcher($request: CreatePublicSetProfileMetadataURIRequest!) {
2 | createSetProfileMetadataViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/apps/web/packages/data/apps.ts:
--------------------------------------------------------------------------------
1 | export const apps = [
2 | 'lenster',
3 | 'lenstube',
4 | 'lenstube-bytes',
5 | 'orb',
6 | 'phaver',
7 | 'lensport',
8 | 'buttrfly',
9 | 'memester',
10 | 'pinsta',
11 | 'chainjet',
12 | 'wav3s',
13 | 'lensta',
14 | 'beats'
15 | ];
16 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/freshdesk/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/metadata/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/prerender/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['weblint'],
4 | rules: {
5 | 'import/no-anonymous-default-export': 'off',
6 | 'import/no-anonymous-default-export': 'off',
7 | 'no-use-before-define': 'off'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/packages/workers/sts-generator/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
7 | parser: '@typescript-eslint/parser',
8 | plugins: ['@typescript-eslint']
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/Broadcast.graphql:
--------------------------------------------------------------------------------
1 | mutation Broadcast($request: BroadcastRequest!) {
2 | broadcast(request: $request) {
3 | ... on RelayerResult {
4 | txHash
5 | txId
6 | }
7 | ... on RelayError {
8 | reason
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateSetProfileMetadataViaDispatcher.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateSetProfileMetadataViaDispatcher($request: CreatePublicSetProfileMetadataURIRequest!) {
2 | createSetProfileMetadataViaDispatcher(request: $request) {
3 | ...RelayerResultFields
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Profiles.graphql:
--------------------------------------------------------------------------------
1 | query Profiles($request: ProfileQueryRequest!) {
2 | profiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isDefault
6 | isFollowedByMe
7 | }
8 | pageInfo {
9 | next
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/lib/trimify.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Trims a string and removes excess newlines.
3 | *
4 | * @param value The string to trim.
5 | * @returns The trimmed string.
6 | */
7 | const trimify = (value: string): string => value?.replace(/\n\n\s*\n/g, '\n\n').trim();
8 |
9 | export default trimify;
10 |
--------------------------------------------------------------------------------
/packages/workers/freshdesk/wrangler.toml:
--------------------------------------------------------------------------------
1 | name = "freshdesk"
2 | main = "src/index.ts"
3 | compatibility_date = "2023-01-25"
4 | keep_vars = true
5 |
6 | routes = [
7 | { pattern = "freshdesk.lenster.xyz", custom_domain = true }
8 | ]
9 |
10 | [env.production.vars]
11 | POSTMARK_TOKEN = ""
12 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/sts-generator/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: {
4 | node: true
5 | },
6 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
7 | parser: '@typescript-eslint/parser',
8 | plugins: ['@typescript-eslint']
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/src/types/dayjs-twitter.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'dayjs-twitter' {
2 | import type { PluginFunc } from 'dayjs';
3 | declare const plugin: PluginFunc;
4 | export default plugin;
5 | declare module 'dayjs' {
6 | interface Dayjs {
7 | twitter(): string;
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/blockchain/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2020",
4 | "module": "commonjs",
5 | "esModuleInterop": true,
6 | "forceConsistentCasingInFileNames": true,
7 | "strict": true,
8 | "skipLibCheck": true,
9 | "resolveJsonModule": true
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Profiles.graphql:
--------------------------------------------------------------------------------
1 | query Profiles($request: ProfileQueryRequest!) {
2 | profiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isDefault
6 | isFollowedByMe
7 | }
8 | pageInfo {
9 | next
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/trimify.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Trims a string and removes excess newlines.
3 | *
4 | * @param value The string to trim.
5 | * @returns The trimmed string.
6 | */
7 | const trimify = (value: string): string => value?.replace(/\n\n\s*\n/g, '\n\n').trim();
8 |
9 | export default trimify;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/freshdesk/wrangler.toml:
--------------------------------------------------------------------------------
1 | name = "freshdesk"
2 | main = "src/index.ts"
3 | compatibility_date = "2023-01-25"
4 | keep_vars = true
5 |
6 | routes = [
7 | { pattern = "freshdesk.lenster.xyz", custom_domain = true }
8 | ]
9 |
10 | [env.production.vars]
11 | POSTMARK_TOKEN = ""
12 |
--------------------------------------------------------------------------------
/packages/lens/apollo/nodeClient.ts:
--------------------------------------------------------------------------------
1 | import { ApolloClient, from, InMemoryCache } from '@apollo/client';
2 |
3 | import httpLink from './httpLink';
4 |
5 | const nodeClient = new ApolloClient({
6 | link: from([httpLink]),
7 | cache: new InMemoryCache()
8 | });
9 |
10 | export default nodeClient;
11 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/EnabledModules.graphql:
--------------------------------------------------------------------------------
1 | query EnabledModules {
2 | enabledModules {
3 | collectModules {
4 | moduleName
5 | contractAddress
6 | }
7 | }
8 | enabledModuleCurrencies {
9 | name
10 | symbol
11 | decimals
12 | address
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/lens/apollo/index.ts:
--------------------------------------------------------------------------------
1 | import { ApolloCache, ApolloProvider, gql, useApolloClient, useQuery } from '@apollo/client';
2 |
3 | import nodeClient from './nodeClient';
4 | import webClient from './webClient';
5 |
6 | export { ApolloCache, ApolloProvider, gql, nodeClient, useApolloClient, useQuery, webClient };
7 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/nodeClient.ts:
--------------------------------------------------------------------------------
1 | import { ApolloClient, from, InMemoryCache } from '@apollo/client';
2 |
3 | import httpLink from './httpLink';
4 |
5 | const nodeClient = new ApolloClient({
6 | link: from([httpLink]),
7 | cache: new InMemoryCache()
8 | });
9 |
10 | export default nodeClient;
11 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/EnabledModules.graphql:
--------------------------------------------------------------------------------
1 | query EnabledModules {
2 | enabledModules {
3 | collectModules {
4 | moduleName
5 | contractAddress
6 | }
7 | }
8 | enabledModuleCurrencies {
9 | name
10 | symbol
11 | decimals
12 | address
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/docs/development.md:
--------------------------------------------------------------------------------
1 | # Development
2 |
3 | ## Setup
4 |
5 | ### Install dependencies
6 |
7 | ```bash
8 | pnpm install
9 | ```
10 |
11 | ### Run the development server
12 |
13 | ```bash
14 | pnpm dev
15 | ```
16 |
17 | ### Run the production server
18 |
19 | ```bash
20 | pnpm build
21 | pnpm start
22 | ```
23 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/index.ts:
--------------------------------------------------------------------------------
1 | import { ApolloCache, ApolloProvider, gql, useApolloClient, useQuery } from '@apollo/client';
2 |
3 | import nodeClient from './nodeClient';
4 | import webClient from './webClient';
5 |
6 | export { ApolloCache, ApolloProvider, gql, nodeClient, useApolloClient, useQuery, webClient };
7 |
--------------------------------------------------------------------------------
/apps/web/src/lib/getUserLocale.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Get user's locale for metadata
3 | *
4 | * @returns the user's locale or 'en-US' as default
5 | */
6 | const getUserLocale = () => {
7 | return navigator?.languages?.length ? navigator.languages[0] : navigator.language;
8 | };
9 |
10 | export default getUserLocale;
11 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/SearchProfiles.graphql:
--------------------------------------------------------------------------------
1 | query SearchProfiles($request: SearchQueryRequest!) {
2 | search(request: $request) {
3 | ... on ProfileSearchResult {
4 | items {
5 | ...ProfileFields
6 | }
7 | pageInfo {
8 | next
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/workers/metadata/wrangler.toml:
--------------------------------------------------------------------------------
1 | name = "metadata"
2 | main = "src/index.ts"
3 | compatibility_date = "2023-01-25"
4 | keep_vars = true
5 | node_compat = true
6 |
7 | routes = [
8 | { pattern = "metadata.lenster.xyz", custom_domain = true }
9 | ]
10 |
11 | [env.production.vars]
12 | BUNDLR_PRIVATE_KEY = ""
13 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/SearchProfiles.graphql:
--------------------------------------------------------------------------------
1 | query SearchProfiles($request: SearchQueryRequest!) {
2 | search(request: $request) {
3 | ... on ProfileSearchResult {
4 | items {
5 | ...ProfileFields
6 | }
7 | pageInfo {
8 | next
9 | }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/apps/web/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | const base = require('ui/tailwind-preset');
3 |
4 | module.exports = {
5 | ...base,
6 | content: ['./src/**/*.{ts,tsx}', '../../packages/ui/src/*.{ts,tsx}'],
7 | plugins: [require('@tailwindcss/aspect-ratio'), require('@tailwindcss/forms')]
8 | };
9 |
--------------------------------------------------------------------------------
/packages/data/storage.ts:
--------------------------------------------------------------------------------
1 | // Localstorage keys
2 | export const Localstorage = {
3 | LensterStore: 'lenster.store',
4 | PreferencesStore: 'preferences.store',
5 | TransactionStore: 'transaction.store',
6 | TimelineStore: 'timeline.store',
7 | MessageStore: 'message.store',
8 | LocaleStore: 'locale.store'
9 | };
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/MutualFollowersList.graphql:
--------------------------------------------------------------------------------
1 | query MutualFollowersList($request: MutualFollowersProfilesQueryRequest!) {
2 | mutualFollowersProfiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isFollowedByMe
6 | }
7 | pageInfo {
8 | next
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/lib/getSnapshotProposalId.ts:
--------------------------------------------------------------------------------
1 | const getSnapshotProposalId = (url: string): string | null => {
2 | const regex = /^https:\/\/snapshot\.org\/#\/[\da-z]+\.eth\/proposal\/(0x[\dA-Fa-f]{64})$/;
3 | const match = url.match(regex);
4 |
5 | return match ? match[1] : null;
6 | };
7 |
8 | export default getSnapshotProposalId;
9 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/metadata/wrangler.toml:
--------------------------------------------------------------------------------
1 | name = "metadata"
2 | main = "src/index.ts"
3 | compatibility_date = "2023-01-25"
4 | keep_vars = true
5 | node_compat = true
6 |
7 | routes = [
8 | { pattern = "metadata.lenster.xyz", custom_domain = true }
9 | ]
10 |
11 | [env.production.vars]
12 | BUNDLR_PRIVATE_KEY = ""
13 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/LensterStats.graphql:
--------------------------------------------------------------------------------
1 | query LensterStats($request: GlobalProtocolStatsRequest) {
2 | globalProtocolStats(request: $request) {
3 | totalProfiles
4 | totalPosts
5 | totalBurntProfiles
6 | totalMirrors
7 | totalComments
8 | totalCollects
9 | totalFollows
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/prerender/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true,
6 | "paths": {
7 | "@components*": ["src/components*"],
8 | "@lib*": ["src/lib*"]
9 | }
10 | },
11 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
12 | }
13 |
--------------------------------------------------------------------------------
/apps/web/packages/data/storage.ts:
--------------------------------------------------------------------------------
1 | // Localstorage keys
2 | export const Localstorage = {
3 | LensterStore: 'lenster.store',
4 | PreferencesStore: 'preferences.store',
5 | TransactionStore: 'transaction.store',
6 | TimelineStore: 'timeline.store',
7 | MessageStore: 'message.store',
8 | LocaleStore: 'locale.store'
9 | };
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/MutualFollowersList.graphql:
--------------------------------------------------------------------------------
1 | query MutualFollowersList($request: MutualFollowersProfilesQueryRequest!) {
2 | mutualFollowersProfiles(request: $request) {
3 | items {
4 | ...ProfileFields
5 | isFollowedByMe
6 | }
7 | pageInfo {
8 | next
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getSnapshotProposalId.ts:
--------------------------------------------------------------------------------
1 | const getSnapshotProposalId = (url: string): string | null => {
2 | const regex = /^https:\/\/snapshot\.org\/#\/[\da-z]+\.eth\/proposal\/(0x[\dA-Fa-f]{64})$/;
3 | const match = url.match(regex);
4 |
5 | return match ? match[1] : null;
6 | };
7 |
8 | export default getSnapshotProposalId;
9 |
--------------------------------------------------------------------------------
/release-uat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | git config user.name github-actions[bot]
6 | git config user.email github-actions[bot]@users.noreply.github.com
7 |
8 | git checkout uat
9 |
10 | git merge --no-edit --no-ff main
11 | git push origin uat
12 |
13 | git checkout main
14 | git rebase uat
15 | git push origin main
16 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/LensterStats.graphql:
--------------------------------------------------------------------------------
1 | query LensterStats($request: GlobalProtocolStatsRequest) {
2 | globalProtocolStats(request: $request) {
3 | totalProfiles
4 | totalPosts
5 | totalBurntProfiles
6 | totalMirrors
7 | totalComments
8 | totalCollects
9 | totalFollows
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/apps/web/src/components/utils/hooks/useIsMounted.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 |
3 | const useIsMounted = () => {
4 | const [mounted, setMounted] = useState(false);
5 |
6 | useEffect(() => {
7 | setMounted(true);
8 | }, []);
9 |
10 | return { mounted };
11 | };
12 |
13 | export default useIsMounted;
14 |
--------------------------------------------------------------------------------
/packages/lib/stopEventPropagation.ts:
--------------------------------------------------------------------------------
1 | import type { SyntheticEvent } from 'react';
2 |
3 | /**
4 | * Stops the propagation of a SyntheticEvent.
5 | *
6 | * @param event The SyntheticEvent to stop propagation for.
7 | * @returns void.
8 | */
9 | export const stopEventPropagation = (event: SyntheticEvent) => event.stopPropagation();
10 |
--------------------------------------------------------------------------------
/release-dev.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | git config user.name github-actions[bot]
6 | git config user.email github-actions[bot]@users.noreply.github.com
7 |
8 | git checkout develop
9 |
10 | git merge --no-edit --no-ff main
11 | git push origin develop
12 |
13 | git checkout main
14 | git rebase develop
15 | git push origin main
16 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/stopEventPropagation.ts:
--------------------------------------------------------------------------------
1 | import type { SyntheticEvent } from 'react';
2 |
3 | /**
4 | * Stops the propagation of a SyntheticEvent.
5 | *
6 | * @param event The SyntheticEvent to stop propagation for.
7 | * @returns void.
8 | */
9 | export const stopEventPropagation = (event: SyntheticEvent) => event.stopPropagation();
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createSearchFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createSearchFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['query', 'type']]);
7 | };
8 |
9 | export default createSearchFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Following.graphql:
--------------------------------------------------------------------------------
1 | query Following($request: FollowingRequest!) {
2 | following(request: $request) {
3 | items {
4 | profile {
5 | ...ProfileFields
6 | isFollowedByMe
7 | }
8 | totalAmountOfTimesFollowing
9 | }
10 | pageInfo {
11 | next
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Likes.graphql:
--------------------------------------------------------------------------------
1 | query Likes($request: WhoReactedPublicationRequest!) {
2 | whoReactedPublication(request: $request) {
3 | items {
4 | reactionId
5 | profile {
6 | ...ProfileFields
7 | isFollowedByMe
8 | }
9 | }
10 | pageInfo {
11 | next
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createFollowersFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFollowersFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId']]);
7 | };
8 |
9 | export default createFollowersFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createFollowingFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFollowingFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['address']]);
7 | };
8 |
9 | export default createFollowingFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createNftsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createNftsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['ownerAddress', 'chainIds']]);
7 | };
8 |
9 | export default createNftsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/retryLink.ts:
--------------------------------------------------------------------------------
1 | import { RetryLink } from '@apollo/client/link/retry';
2 |
3 | // RetryLink is a link that retries requests based on the status code returned.
4 | const retryLink = new RetryLink({
5 | delay: { initial: 100 },
6 | attempts: { max: 2, retryIf: (error) => Boolean(error) }
7 | });
8 |
9 | export default retryLink;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createFollowingFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFollowingFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['address']]);
7 | };
8 |
9 | export default createFollowingFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createSearchFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createSearchFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['query', 'type']]);
7 | };
8 |
9 | export default createSearchFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Following.graphql:
--------------------------------------------------------------------------------
1 | query Following($request: FollowingRequest!) {
2 | following(request: $request) {
3 | items {
4 | profile {
5 | ...ProfileFields
6 | isFollowedByMe
7 | }
8 | totalAmountOfTimesFollowing
9 | }
10 | pageInfo {
11 | next
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Likes.graphql:
--------------------------------------------------------------------------------
1 | query Likes($request: WhoReactedPublicationRequest!) {
2 | whoReactedPublication(request: $request) {
3 | items {
4 | reactionId
5 | profile {
6 | ...ProfileFields
7 | isFollowedByMe
8 | }
9 | }
10 | pageInfo {
11 | next
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/blockchain/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 100,
3 | "trailingComma": "es5",
4 | "semi": true,
5 | "singleQuote": true,
6 | "tabWidth": 2,
7 | "overrides": [
8 | {
9 | "files": "*.sol",
10 | "options": {
11 | "semi": true,
12 | "printWidth": 100,
13 | "tabWidth": 4
14 | }
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createFeedFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFeedFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId', 'feedEventItemTypes']]);
7 | };
8 |
9 | export default createFeedFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/snapshot/apollo/retryLink.ts:
--------------------------------------------------------------------------------
1 | import { RetryLink } from '@apollo/client/link/retry';
2 |
3 | // RetryLink is a link that retries requests based on the status code returned.
4 | const retryLink = new RetryLink({
5 | delay: { initial: 100 },
6 | attempts: { max: 2, retryIf: (error) => Boolean(error) }
7 | });
8 |
9 | export default retryLink;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createFollowersFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFollowersFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId']]);
7 | };
8 |
9 | export default createFollowersFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createNftsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createNftsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['ownerAddress', 'chainIds']]);
7 | };
8 |
9 | export default createNftsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/retryLink.ts:
--------------------------------------------------------------------------------
1 | import { RetryLink } from '@apollo/client/link/retry';
2 |
3 | // RetryLink is a link that retries requests based on the status code returned.
4 | const retryLink = new RetryLink({
5 | delay: { initial: 100 },
6 | attempts: { max: 2, retryIf: (error) => Boolean(error) }
7 | });
8 |
9 | export default retryLink;
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/EnabledCurrencyModulesWithProfile.graphql:
--------------------------------------------------------------------------------
1 | query EnabledCurrencyModulesWithProfile($request: SingleProfileQueryRequest!) {
2 | enabledModuleCurrencies {
3 | name
4 | symbol
5 | decimals
6 | address
7 | }
8 | profile(request: $request) {
9 | followModule {
10 | __typename
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/snapshot/apollo/webClient.ts:
--------------------------------------------------------------------------------
1 | import { ApolloClient, from } from '@apollo/client';
2 |
3 | import cache from './cache';
4 | import httpLink from './httpLink';
5 | import retryLink from './retryLink';
6 |
7 | const webClient = new ApolloClient({
8 | link: from([retryLink, httpLink]),
9 | cache: cache
10 | });
11 |
12 | export default webClient;
13 |
--------------------------------------------------------------------------------
/packages/snapshot/codegen.yml:
--------------------------------------------------------------------------------
1 | schema: https://hub.snapshot.org/graphql
2 | documents: ['./Snapshot.graphql']
3 |
4 | hooks:
5 | afterAllFileWrite:
6 | - prettier --write
7 |
8 | generates:
9 | generated.ts:
10 | plugins:
11 | - typescript
12 | - typescript-operations
13 | - fragment-matcher
14 | - typescript-react-apollo
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createFeedFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFeedFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId', 'feedEventItemTypes']]);
7 | };
8 |
9 | export default createFeedFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/apollo/retryLink.ts:
--------------------------------------------------------------------------------
1 | import { RetryLink } from '@apollo/client/link/retry';
2 |
3 | // RetryLink is a link that retries requests based on the status code returned.
4 | const retryLink = new RetryLink({
5 | delay: { initial: 100 },
6 | attempts: { max: 2, retryIf: (error) => Boolean(error) }
7 | });
8 |
9 | export default retryLink;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/apollo/webClient.ts:
--------------------------------------------------------------------------------
1 | import { ApolloClient, from } from '@apollo/client';
2 |
3 | import cache from './cache';
4 | import httpLink from './httpLink';
5 | import retryLink from './retryLink';
6 |
7 | const webClient = new ApolloClient({
8 | link: from([retryLink, httpLink]),
9 | cache: cache
10 | });
11 |
12 | export default webClient;
13 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/codegen.yml:
--------------------------------------------------------------------------------
1 | schema: https://hub.snapshot.org/graphql
2 | documents: ['./Snapshot.graphql']
3 |
4 | hooks:
5 | afterAllFileWrite:
6 | - prettier --write
7 |
8 | generates:
9 | generated.ts:
10 | plugins:
11 | - typescript
12 | - typescript-operations
13 | - fragment-matcher
14 | - typescript-react-apollo
15 |
--------------------------------------------------------------------------------
/apps/web/src/store/auth.ts:
--------------------------------------------------------------------------------
1 | import { create } from 'zustand';
2 |
3 | interface AuthState {
4 | showAuthModal: boolean;
5 | setShowAuthModal: (showAuthModal: boolean) => void;
6 | }
7 |
8 | export const useAuthStore = create((set) => ({
9 | showAuthModal: false,
10 | setShowAuthModal: (showAuthModal) => set(() => ({ showAuthModal }))
11 | }));
12 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createFeedHighlightsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFeedHighlightsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId']]);
7 | };
8 |
9 | export default createFeedHighlightsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Collectors.graphql:
--------------------------------------------------------------------------------
1 | query Collectors($request: WhoCollectedPublicationRequest!) {
2 | whoCollectedPublication(request: $request) {
3 | items {
4 | address
5 | defaultProfile {
6 | ...ProfileFields
7 | isFollowedByMe
8 | }
9 | }
10 | pageInfo {
11 | next
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Collectors.graphql:
--------------------------------------------------------------------------------
1 | query Collectors($request: WhoCollectedPublicationRequest!) {
2 | whoCollectedPublication(request: $request) {
3 | items {
4 | address
5 | defaultProfile {
6 | ...ProfileFields
7 | isFollowedByMe
8 | }
9 | }
10 | pageInfo {
11 | next
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/EnabledCurrencyModulesWithProfile.graphql:
--------------------------------------------------------------------------------
1 | query EnabledCurrencyModulesWithProfile($request: SingleProfileQueryRequest!) {
2 | enabledModuleCurrencies {
3 | name
4 | symbol
5 | decimals
6 | address
7 | }
8 | profile(request: $request) {
9 | followModule {
10 | __typename
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createFeedHighlightsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createFeedHighlightsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId']]);
7 | };
8 |
9 | export default createFeedHighlightsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/src/lib/onError.ts:
--------------------------------------------------------------------------------
1 | import Errors from 'data/errors';
2 | import toast from 'react-hot-toast';
3 |
4 | /**
5 | * Displays error message to user
6 | *
7 | * @param error the error object
8 | */
9 | const onError = (error: any) => {
10 | toast.error(error?.data?.message ?? error?.message ?? Errors.SomethingWentWrong);
11 | };
12 |
13 | export default onError;
14 |
--------------------------------------------------------------------------------
/apps/web/public/.well-known/security.txt:
--------------------------------------------------------------------------------
1 | Contact: https://github.com/lensterxyz/lenster/security/advisories/new
2 | Expires: 2022-12-31T18:29:00.000Z
3 | Acknowledgments: https://github.com/lensterxyz/lenster/security/advisories?state=published
4 | Preferred-Languages: en
5 | Canonical: https://lenster.xyz/.well-known/security.txt
6 | Policy: https://github.com/lensterxyz/lenster/security/policy
7 |
--------------------------------------------------------------------------------
/apps/web/public/assets/type-italic.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/data/lineaster-members.ts:
--------------------------------------------------------------------------------
1 | export const lineasterMembers = [
2 | '0x03', // alain
3 | '0x17', // igor
4 | '0x09', // seb
5 | '0x0a', // matthieu
6 | '0x19', // emanuele
7 | '0x1a', // marco
8 | '0x82', // chinzilla
9 | '0x87', // nakedwinnie
10 | '0x7a', // rooshee
11 | '0x33', // lovekosmas
12 | '0x8e', // chaindoe
13 | '0x75' // hiroprotagonist
14 | ];
15 |
--------------------------------------------------------------------------------
/tests/constants.ts:
--------------------------------------------------------------------------------
1 | export const isNightly = process.env.NIGHTLY === 'true';
2 | export const WEB_BASE_URL = isNightly ? 'https://lineaster.dev.linea.build' : 'http://localhost:4783';
3 | export const PRERENDER_BASE_URL = isNightly ? 'https://prerender.lenster.xyz' : 'http://localhost:4784';
4 | export const METADATA_BASE_URL = isNightly ? 'https://metadata.lenster.xyz' : 'http://localhost:8083';
5 |
--------------------------------------------------------------------------------
/k6/run-load-test.sh:
--------------------------------------------------------------------------------
1 | docker-compose up -d influxdb grafana
2 | echo "--------------------------------------------------------------------------------------"
3 | echo "Load testing with Grafana dashboard http://localhost:3000/d/k6/k6-load-testing-results"
4 | echo "--------------------------------------------------------------------------------------"
5 | docker-compose run --rm k6 run /scripts/test.js
6 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createWhoReactedPublicationFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createWhoReactedPublicationFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['publicationId']]);
7 | };
8 |
9 | export default createWhoReactedPublicationFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/NftFeed.graphql:
--------------------------------------------------------------------------------
1 | query NftFeed($request: NFTsRequest!) {
2 | nfts(request: $request) {
3 | items {
4 | name
5 | collectionName
6 | contractAddress
7 | tokenId
8 | chainId
9 | originalContent {
10 | uri
11 | animatedUrl
12 | }
13 | }
14 | pageInfo {
15 | next
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.github/workflows/load-test.yml:
--------------------------------------------------------------------------------
1 | name: Load testing
2 | on:
3 | workflow_dispatch:
4 |
5 | jobs:
6 | load-test:
7 | name: Load testing
8 | runs-on: ubuntu-latest
9 | steps:
10 | - name: Checkout
11 | uses: actions/checkout@v3
12 | - name: Run k6 local test
13 | uses: grafana/k6-action@v0.3.0
14 | with:
15 | filename: k6/scripts/test.js
16 |
--------------------------------------------------------------------------------
/apps/web/packages/data/lineaster-members.ts:
--------------------------------------------------------------------------------
1 | export const lineasterMembers = [
2 | '0x03', // alain
3 | '0x17', // igor
4 | '0x09', // seb
5 | '0x0a', // matthieu
6 | '0x19', // emanuele
7 | '0x1a', // marco
8 | '0x82', // chinzilla
9 | '0x87', // nakedwinnie
10 | '0x7a', // rooshee
11 | '0x33', // lovekosmas
12 | '0x8e', // chaindoe
13 | '0x75' // hiroprotagonist
14 | ];
15 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Shimmer/TrendingTagShimmer.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | const TrendingTagShimmer: FC = () => {
4 | return (
5 |
9 | );
10 | };
11 |
12 | export default TrendingTagShimmer;
13 |
--------------------------------------------------------------------------------
/apps/web/src/lib/mixpanel.ts:
--------------------------------------------------------------------------------
1 | import { MIXPANEL_ENABLED } from 'data/constants';
2 | import type { Dict } from 'mixpanel-browser';
3 | import mixpanel from 'mixpanel-browser';
4 |
5 | /**
6 | * Mixpanel analytics
7 | */
8 | export const Mixpanel = {
9 | track: (name: string, props?: Dict) => {
10 | if (MIXPANEL_ENABLED) {
11 | mixpanel.track(name, props);
12 | }
13 | }
14 | };
15 |
--------------------------------------------------------------------------------
/packages/data/lens-endpoints.ts:
--------------------------------------------------------------------------------
1 | export enum LensEndpoint {
2 | Mainnet = 'https://api.lens.dev',
3 | Testnet = 'https://api-zkevm-goerli.lens.dev',
4 | Sandbox = 'https://api-sandbox-mumbai.lens.dev',
5 | Staging = 'https://staging-api-social-mumbai.lens.crtlkey.com',
6 | StagingSandbox = 'https://staging-api-social-mumbai.sandbox.crtlkey.com'
7 | }
8 |
9 | export default LensEndpoint;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createExplorePublicationsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createExplorePublicationsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['sortCriteria', 'metadata']]);
7 | };
8 |
9 | export default createExplorePublicationsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createWhoCollectedPublicationFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createWhoCollectedPublicationFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['publicationId']]);
7 | };
8 |
9 | export default createWhoCollectedPublicationFieldPolicy;
10 |
--------------------------------------------------------------------------------
/script/clean-branches:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #/ Usage: script/clean-branches
4 | #/ Delete all branches except main and testnet.
5 |
6 | echo "Deleting all branches except 'main', 'testnet', 'staging', 'sandbox' and 'staging-sandbox' 🗑"
7 | git branch | grep -v "main" | grep -v "testnet" | grep -v "staging" | grep -v "sandbox" | grep -v "staging-sandbox" | xargs git branch -D
8 | echo "Branches deleted 🎉"
9 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createWhoReactedPublicationFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createWhoReactedPublicationFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['publicationId']]);
7 | };
8 |
9 | export default createWhoReactedPublicationFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/NftFeed.graphql:
--------------------------------------------------------------------------------
1 | query NftFeed($request: NFTsRequest!) {
2 | nfts(request: $request) {
3 | items {
4 | name
5 | collectionName
6 | contractAddress
7 | tokenId
8 | chainId
9 | originalContent {
10 | uri
11 | animatedUrl
12 | }
13 | }
14 | pageInfo {
15 | next
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createProfilesFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createProfilesFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileIds', 'ownedBy', 'handles', 'whoMirroredPublicationId']]);
7 | };
8 |
9 | export default createProfilesFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/CommentFeed.graphql:
--------------------------------------------------------------------------------
1 | query CommentFeed(
2 | $request: PublicationsQueryRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | publications(request: $request) {
7 | items {
8 | ... on Comment {
9 | ...CommentFields
10 | }
11 | }
12 | pageInfo {
13 | next
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/HasTxHashBeenIndexed.graphql:
--------------------------------------------------------------------------------
1 | query HasTxHashBeenIndexed($request: HasTxHashBeenIndexedRequest!) {
2 | hasTxHashBeenIndexed(request: $request) {
3 | ... on TransactionIndexedResult {
4 | metadataStatus {
5 | status
6 | }
7 | txHash
8 | indexed
9 | }
10 | ... on TransactionError {
11 | reason
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/web/packages/data/lens-endpoints.ts:
--------------------------------------------------------------------------------
1 | export enum LensEndpoint {
2 | Mainnet = 'https://api.lens.dev',
3 | Testnet = 'https://api-zkevm-goerli.lens.dev',
4 | Sandbox = 'https://api-sandbox-mumbai.lens.dev',
5 | Staging = 'https://staging-api-social-mumbai.lens.crtlkey.com',
6 | StagingSandbox = 'https://staging-api-social-mumbai.sandbox.crtlkey.com'
7 | }
8 |
9 | export default LensEndpoint;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createExplorePublicationsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createExplorePublicationsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['sortCriteria', 'metadata']]);
7 | };
8 |
9 | export default createExplorePublicationsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createProfilesFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createProfilesFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileIds', 'ownedBy', 'handles', 'whoMirroredPublicationId']]);
7 | };
8 |
9 | export default createProfilesFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createWhoCollectedPublicationFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createWhoCollectedPublicationFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['publicationId']]);
7 | };
8 |
9 | export default createWhoCollectedPublicationFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/CommentFeed.graphql:
--------------------------------------------------------------------------------
1 | query CommentFeed(
2 | $request: PublicationsQueryRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | publications(request: $request) {
7 | items {
8 | ... on Comment {
9 | ...CommentFields
10 | }
11 | }
12 | pageInfo {
13 | next
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createNotificationsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createNotificationsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId', 'notificationTypes', 'highSignalFilter']]);
7 | };
8 |
9 | export default createNotificationsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lens/apollo/webClient.ts:
--------------------------------------------------------------------------------
1 | import { ApolloClient, from } from '@apollo/client';
2 |
3 | import authLink from './authLink';
4 | import cache from './cache';
5 | import httpLink from './httpLink';
6 | import retryLink from './retryLink';
7 |
8 | const webClient = new ApolloClient({
9 | link: from([authLink, retryLink, httpLink]),
10 | cache: cache
11 | });
12 |
13 | export default webClient;
14 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/ApprovedModuleAllowanceAmount.graphql:
--------------------------------------------------------------------------------
1 | query ApprovedModuleAllowanceAmount($request: ApprovedModuleAllowanceAmountRequest!) {
2 | approvedModuleAllowanceAmount(request: $request) {
3 | currency
4 | module
5 | allowance
6 | contractAddress
7 | }
8 | enabledModuleCurrencies {
9 | name
10 | symbol
11 | decimals
12 | address
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/UserProfiles.graphql:
--------------------------------------------------------------------------------
1 | query UserProfiles($ownedBy: [EthereumAddress!]) {
2 | profiles(request: { ownedBy: $ownedBy }) {
3 | items {
4 | ...ProfileFields
5 | interests
6 | isDefault
7 | dispatcher {
8 | address
9 | canUseRelay
10 | }
11 | }
12 | }
13 | userSigNonces {
14 | lensHubOnChainSigNonce
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.github/workflows/releaser-dev.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Dev releaser
3 |
4 | on:
5 | workflow_dispatch:
6 |
7 | jobs:
8 | release:
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - uses: actions/checkout@v2
13 | with:
14 | fetch-depth: 0
15 | token: ${{ secrets.DEV_RELEASER_GH_TOKEN }}
16 |
17 | - name: Run Dev release script
18 | run: ./release-dev.sh
19 |
--------------------------------------------------------------------------------
/.github/workflows/releaser-uat.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | name: UAT releaser
3 |
4 | on:
5 | workflow_dispatch:
6 |
7 | jobs:
8 | release:
9 | runs-on: ubuntu-latest
10 |
11 | steps:
12 | - uses: actions/checkout@v2
13 | with:
14 | fetch-depth: 0
15 | token: ${{ secrets.DEV_RELEASER_GH_TOKEN }}
16 |
17 | - name: Run Dev release script
18 | run: ./release-uat.sh
19 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createNotificationsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createNotificationsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['profileId', 'notificationTypes', 'highSignalFilter']]);
7 | };
8 |
9 | export default createNotificationsFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/HasTxHashBeenIndexed.graphql:
--------------------------------------------------------------------------------
1 | query HasTxHashBeenIndexed($request: HasTxHashBeenIndexedRequest!) {
2 | hasTxHashBeenIndexed(request: $request) {
3 | ... on TransactionIndexedResult {
4 | metadataStatus {
5 | status
6 | }
7 | txHash
8 | indexed
9 | }
10 | ... on TransactionError {
11 | reason
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Slug.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | interface SlugProps {
4 | slug: string;
5 | prefix?: string;
6 | className?: string;
7 | }
8 |
9 | const Slug: FC = ({ slug, prefix, className = '' }) => {
10 | return (
11 |
12 | {prefix}
13 | {slug}
14 |
15 | );
16 | };
17 |
18 | export default Slug;
19 |
--------------------------------------------------------------------------------
/.deepsource.toml:
--------------------------------------------------------------------------------
1 | version = 1
2 |
3 | exclude_patterns = [
4 | "node_modules",
5 | ".next",
6 | ".github",
7 | ".husky",
8 | ".vscode",
9 | "apps/web/src/generated/types.ts",
10 | "pnpm-lock.yaml"
11 | ]
12 |
13 | [[analyzers]]
14 | name = "javascript"
15 | enabled = true
16 |
17 | [analyzers.meta]
18 | plugins = ["react"]
19 |
20 | [[transformers]]
21 | name = "prettier"
22 | enabled = true
23 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/webClient.ts:
--------------------------------------------------------------------------------
1 | import { ApolloClient, from } from '@apollo/client';
2 |
3 | import authLink from './authLink';
4 | import cache from './cache';
5 | import httpLink from './httpLink';
6 | import retryLink from './retryLink';
7 |
8 | const webClient = new ApolloClient({
9 | link: from([authLink, retryLink, httpLink]),
10 | cache: cache
11 | });
12 |
13 | export default webClient;
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/ApprovedModuleAllowanceAmount.graphql:
--------------------------------------------------------------------------------
1 | query ApprovedModuleAllowanceAmount($request: ApprovedModuleAllowanceAmountRequest!) {
2 | approvedModuleAllowanceAmount(request: $request) {
3 | currency
4 | module
5 | allowance
6 | contractAddress
7 | }
8 | enabledModuleCurrencies {
9 | name
10 | symbol
11 | decimals
12 | address
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/UserProfiles.graphql:
--------------------------------------------------------------------------------
1 | query UserProfiles($ownedBy: [EthereumAddress!]) {
2 | profiles(request: { ownedBy: $ownedBy }) {
3 | items {
4 | ...ProfileFields
5 | interests
6 | isDefault
7 | dispatcher {
8 | address
9 | canUseRelay
10 | }
11 | }
12 | }
13 | userSigNonces {
14 | lensHubOnChainSigNonce
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/apps/web/src/lib/isValidEthAddress.ts:
--------------------------------------------------------------------------------
1 | import { utils } from 'ethers';
2 |
3 | /**
4 | * Checks if the given string is a valid Ethereum address.
5 | *
6 | * @param address The address to validate.
7 | * @returns True if the address is valid, false otherwise.
8 | */
9 | const isValidEthAddress = (address: string) => {
10 | return utils.isAddress(address);
11 | };
12 |
13 | export default isValidEthAddress;
14 |
--------------------------------------------------------------------------------
/apps/web/src/lib/splitSignature.ts:
--------------------------------------------------------------------------------
1 | import { utils } from 'ethers';
2 |
3 | /**
4 | * Split an Ethereum signature into its constituent parts.
5 | *
6 | * @param signature The signature to split.
7 | * @returns The signature's `r`, `s`, and `v` components.
8 | */
9 | const splitSignature = (signature: string) => {
10 | return utils.splitSignature(signature);
11 | };
12 |
13 | export default splitSignature;
14 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/Followers.graphql:
--------------------------------------------------------------------------------
1 | query Followers($request: FollowersRequest!) {
2 | followers(request: $request) {
3 | items {
4 | wallet {
5 | address
6 | defaultProfile {
7 | ...ProfileFields
8 | isFollowedByMe
9 | }
10 | }
11 | totalAmountOfTimesFollowed
12 | }
13 | pageInfo {
14 | next
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/lib/hasGm.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns true if the specified text contains the "gm" tag, ignoring case and word boundaries.
3 | *
4 | * @param inputText The text to check.
5 | * @returns True if the text contains the "gm" tag, false otherwise.
6 | */
7 | const hasGm = (inputText: string): boolean => {
8 | const regex = /\bgm\b/i;
9 | return regex.test(inputText);
10 | };
11 |
12 | export default hasGm;
13 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/Followers.graphql:
--------------------------------------------------------------------------------
1 | query Followers($request: FollowersRequest!) {
2 | followers(request: $request) {
3 | items {
4 | wallet {
5 | address
6 | defaultProfile {
7 | ...ProfileFields
8 | isFollowedByMe
9 | }
10 | }
11 | totalAmountOfTimesFollowed
12 | }
13 | pageInfo {
14 | next
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/hasGm.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns true if the specified text contains the "gm" tag, ignoring case and word boundaries.
3 | *
4 | * @param inputText The text to check.
5 | * @returns True if the text contains the "gm" tag, false otherwise.
6 | */
7 | const hasGm = (inputText: string): boolean => {
8 | const regex = /\bgm\b/i;
9 | return regex.test(inputText);
10 | };
11 |
12 | export default hasGm;
13 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createMutualFollowersProfilesFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createMutualFollowersProfilesFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['viewingProfileId', 'yourProfileId', 'limit']]);
7 | };
8 |
9 | export default createMutualFollowersProfilesFieldPolicy;
10 |
--------------------------------------------------------------------------------
/packages/lib/getURLs.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns an array of URLs found in the specified text.
3 | *
4 | * @param text The text to get URLs from.
5 | * @returns An array of URLs.
6 | */
7 | const getURLs = (text: string): string[] => {
8 | if (!text) {
9 | return [];
10 | }
11 |
12 | const urlRegex = /(((https?:\/\/)|(www\.))\S+)/g;
13 | return text.match(urlRegex) || [];
14 | };
15 |
16 | export default getURLs;
17 |
--------------------------------------------------------------------------------
/tests/scripts/apps/web/contact.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import { APP_NAME } from 'data/constants';
3 | import { WEB_BASE_URL } from 'test/constants';
4 |
5 | test.beforeEach(async ({ page }) => {
6 | await page.goto(`${WEB_BASE_URL}/contact`);
7 | });
8 |
9 | test('should have page title', async ({ page }) => {
10 | await expect(page).toHaveTitle(`Contact • ${APP_NAME}`);
11 | });
12 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Shimmer/NftsShimmer.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | import NftShimmer from './NftShimmer';
4 |
5 | const NftsShimmer: FC = () => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 | );
14 | };
15 |
16 | export default NftsShimmer;
17 |
--------------------------------------------------------------------------------
/blockchain/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": { "node": true },
3 | "parser": "@typescript-eslint/parser",
4 | "plugins": ["@typescript-eslint"],
5 | "parserOptions": {
6 | "ecmaVersion": 2020,
7 | "sourceType": "module"
8 | },
9 | "extends": [
10 | "eslint:recommended",
11 | "plugin:@typescript-eslint/recommended",
12 | "prettier",
13 | "plugin:prettier/recommended"
14 | ],
15 | "rules": {}
16 | }
17 |
--------------------------------------------------------------------------------
/tests/scripts/apps/web/privacy.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import { APP_NAME } from 'data/constants';
3 | import { WEB_BASE_URL } from 'test/constants';
4 |
5 | test.beforeEach(async ({ page }) => {
6 | await page.goto(`${WEB_BASE_URL}/privacy`);
7 | });
8 |
9 | test('should have page title', async ({ page }) => {
10 | await expect(page).toHaveTitle(`Privacy Policy • ${APP_NAME}`);
11 | });
12 |
--------------------------------------------------------------------------------
/tests/scripts/apps/web/terms.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import { APP_NAME } from 'data/constants';
3 | import { WEB_BASE_URL } from 'test/constants';
4 |
5 | test.beforeEach(async ({ page }) => {
6 | await page.goto(`${WEB_BASE_URL}/terms`);
7 | });
8 |
9 | test('should have page title', async ({ page }) => {
10 | await expect(page).toHaveTitle(`Terms & Conditions • ${APP_NAME}`);
11 | });
12 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createMutualFollowersProfilesFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createMutualFollowersProfilesFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination(['request', ['viewingProfileId', 'yourProfileId', 'limit']]);
7 | };
8 |
9 | export default createMutualFollowersProfilesFieldPolicy;
10 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getURLs.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns an array of URLs found in the specified text.
3 | *
4 | * @param text The text to get URLs from.
5 | * @returns An array of URLs.
6 | */
7 | const getURLs = (text: string): string[] => {
8 | if (!text) {
9 | return [];
10 | }
11 |
12 | const urlRegex = /(((https?:\/\/)|(www\.))\S+)/g;
13 | return text.match(urlRegex) || [];
14 | };
15 |
16 | export default getURLs;
17 |
--------------------------------------------------------------------------------
/packages/lens/codegen.yml:
--------------------------------------------------------------------------------
1 | schema: https://api-mumbai.lens.dev
2 | documents:
3 | ['./documents/queries/*.graphql', './documents/mutations/*.graphql', './documents/fragments/*.graphql']
4 |
5 | hooks:
6 | afterAllFileWrite:
7 | - prettier --write
8 |
9 | generates:
10 | generated.ts:
11 | plugins:
12 | - typescript
13 | - typescript-operations
14 | - fragment-matcher
15 | - typescript-react-apollo
16 |
--------------------------------------------------------------------------------
/apps/web/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "tsconfig/nextjs.json",
3 | "compilerOptions": {
4 | "baseUrl": ".",
5 | "noEmit": true,
6 | "paths": {
7 | "@components*": ["src/components*"],
8 | "@lib*": ["src/lib*"],
9 | "@gql*": ["src/graphql*"],
10 | "@generated*": ["src/generated*"]
11 | }
12 | },
13 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
14 | "exclude": ["packages/*"]
15 | }
16 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/NftGalleries.graphql:
--------------------------------------------------------------------------------
1 | query NftGalleries($request: NftGalleriesRequest!) {
2 | nftGalleries(request: $request) {
3 | id
4 | name
5 | profileId
6 | items {
7 | name
8 | description
9 | collectionName
10 | contractAddress
11 | tokenId
12 | chainId
13 | originalContent {
14 | uri
15 | animatedUrl
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/codegen.yml:
--------------------------------------------------------------------------------
1 | schema: https://api-mumbai.lens.dev
2 | documents:
3 | ['./documents/queries/*.graphql', './documents/mutations/*.graphql', './documents/fragments/*.graphql']
4 |
5 | hooks:
6 | afterAllFileWrite:
7 | - prettier --write
8 |
9 | generates:
10 | generated.ts:
11 | plugins:
12 | - typescript
13 | - typescript-operations
14 | - fragment-matcher
15 | - typescript-react-apollo
16 |
--------------------------------------------------------------------------------
/packages/lens/apollo/lib/keyFields.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns the key fields of a publication.
3 | *
4 | * @param publication The publication to get the key fields from.
5 | * @returns The key fields of the publication.
6 | */
7 | export const publicationKeyFields = (publication: any): string => {
8 | return `${publication.__typename}:${JSON.stringify({
9 | id: publication.id,
10 | createdAt: publication.createdAt
11 | })}`;
12 | };
13 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/NftGalleries.graphql:
--------------------------------------------------------------------------------
1 | query NftGalleries($request: NftGalleriesRequest!) {
2 | nftGalleries(request: $request) {
3 | id
4 | name
5 | profileId
6 | items {
7 | name
8 | description
9 | collectionName
10 | contractAddress
11 | tokenId
12 | chainId
13 | originalContent {
14 | uri
15 | animatedUrl
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/image-cropper/types.d.ts:
--------------------------------------------------------------------------------
1 | export interface Size {
2 | width: number;
3 | height: number;
4 | }
5 |
6 | export interface MediaSize {
7 | width: number;
8 | height: number;
9 | naturalWidth: number;
10 | naturalHeight: number;
11 | }
12 |
13 | export interface Point {
14 | x: number;
15 | y: number;
16 | }
17 |
18 | export interface Area {
19 | width: number;
20 | height: number;
21 | x: number;
22 | y: number;
23 | }
24 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/lib/keyFields.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns the key fields of a publication.
3 | *
4 | * @param publication The publication to get the key fields from.
5 | * @returns The key fields of the publication.
6 | */
7 | export const publicationKeyFields = (publication: any): string => {
8 | return `${publication.__typename}:${JSON.stringify({
9 | id: publication.id,
10 | createdAt: publication.createdAt
11 | })}`;
12 | };
13 |
--------------------------------------------------------------------------------
/apps/web/packages/image-cropper/types.d.ts:
--------------------------------------------------------------------------------
1 | export interface Size {
2 | width: number;
3 | height: number;
4 | }
5 |
6 | export interface MediaSize {
7 | width: number;
8 | height: number;
9 | naturalWidth: number;
10 | naturalHeight: number;
11 | }
12 |
13 | export interface Point {
14 | x: number;
15 | y: number;
16 | }
17 |
18 | export interface Area {
19 | width: number;
20 | height: number;
21 | x: number;
22 | y: number;
23 | }
24 |
--------------------------------------------------------------------------------
/packages/data/index.ts:
--------------------------------------------------------------------------------
1 | export * from './aave-members';
2 | export * from './apps';
3 | export * from './constants';
4 | export * from './contracts';
5 | export * from './errors';
6 | export * from './feature-flags';
7 | export * from './gardeners';
8 | export * from './hashflags';
9 | export * from './lineaster-members';
10 | export * from './staffs';
11 | export * from './storage';
12 | export * from './utils/getEnvConfig';
13 | export * from './verified';
14 |
--------------------------------------------------------------------------------
/packages/lib/getStampFyiURL.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns the cdn.stamp.fyi URL for the specified Ethereum address.
3 | *
4 | * @param address The Ethereum address to get the URL for.
5 | * @returns The cdn.stamp.fyi URL.
6 | */
7 | const getStampFyiURL = (address: string): string => {
8 | const lowerCaseAddress = address.toLowerCase();
9 | return `https://cdn.stamp.fyi/avatar/eth:${lowerCaseAddress}?s=300`;
10 | };
11 |
12 | export default getStampFyiURL;
13 |
--------------------------------------------------------------------------------
/packages/data/hashflags.ts:
--------------------------------------------------------------------------------
1 | export const hashflags: Record = {
2 | lenster: 'lenster',
3 | lenstube: 'lenstube',
4 | bitcoin: 'bitcoin',
5 | btc: 'bitcoin',
6 | ethereum: 'ethereum',
7 | eth: 'ethereum',
8 | lens: 'lens',
9 | bts: 'bts',
10 | btsarmy: 'btsarmy',
11 | blm: 'blm',
12 | blacklivesmatter: 'blm',
13 | bhm: 'blm',
14 | pride: 'pride',
15 | lgbt: 'pride',
16 | voted: 'voted',
17 | hashtag: 'hashtag'
18 | };
19 |
--------------------------------------------------------------------------------
/packages/lib/humanize.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns the specified number as a string with commas added to separate groups of three digits.
3 | *
4 | * @param number The number to humanize.
5 | * @returns The humanized number as a string.
6 | */
7 | const humanize = (number: number): string => {
8 | if (typeof number !== 'number' || isNaN(number)) {
9 | return '';
10 | }
11 |
12 | return number.toLocaleString();
13 | };
14 |
15 | export default humanize;
16 |
--------------------------------------------------------------------------------
/apps/web/packages/data/index.ts:
--------------------------------------------------------------------------------
1 | export * from './aave-members';
2 | export * from './apps';
3 | export * from './constants';
4 | export * from './contracts';
5 | export * from './errors';
6 | export * from './feature-flags';
7 | export * from './gardeners';
8 | export * from './hashflags';
9 | export * from './lineaster-members';
10 | export * from './staffs';
11 | export * from './storage';
12 | export * from './utils/getEnvConfig';
13 | export * from './verified';
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getStampFyiURL.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns the cdn.stamp.fyi URL for the specified Ethereum address.
3 | *
4 | * @param address The Ethereum address to get the URL for.
5 | * @returns The cdn.stamp.fyi URL.
6 | */
7 | const getStampFyiURL = (address: string): string => {
8 | const lowerCaseAddress = address.toLowerCase();
9 | return `https://cdn.stamp.fyi/avatar/eth:${lowerCaseAddress}?s=300`;
10 | };
11 |
12 | export default getStampFyiURL;
13 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/humanize.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns the specified number as a string with commas added to separate groups of three digits.
3 | *
4 | * @param number The number to humanize.
5 | * @returns The humanized number as a string.
6 | */
7 | const humanize = (number: number): string => {
8 | if (typeof number !== 'number' || isNaN(number)) {
9 | return '';
10 | }
11 |
12 | return number.toLocaleString();
13 | };
14 |
15 | export default humanize;
16 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Shimmer/PublicationContentShimmer.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | const PublicationContentShimmer: FC = () => {
4 | return (
5 |
11 | );
12 | };
13 |
14 | export default PublicationContentShimmer;
15 |
--------------------------------------------------------------------------------
/tests/scripts/packages/lib/isStaff.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import isStaff from 'lib/isStaff';
3 |
4 | test.describe('isStaff', () => {
5 | test('should return true if the ID is included in the staff list', () => {
6 | expect(isStaff('0x03')).toBeTruthy();
7 | });
8 |
9 | test('should return false if the ID is not included in the staff list', () => {
10 | expect(isStaff('unknownID')).toBeFalsy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/apps/web/packages/data/hashflags.ts:
--------------------------------------------------------------------------------
1 | export const hashflags: Record = {
2 | lenster: 'lenster',
3 | lenstube: 'lenstube',
4 | bitcoin: 'bitcoin',
5 | btc: 'bitcoin',
6 | ethereum: 'ethereum',
7 | eth: 'ethereum',
8 | lens: 'lens',
9 | bts: 'bts',
10 | btsarmy: 'btsarmy',
11 | blm: 'blm',
12 | blacklivesmatter: 'blm',
13 | bhm: 'blm',
14 | pride: 'pride',
15 | lgbt: 'pride',
16 | voted: 'voted',
17 | hashtag: 'hashtag'
18 | };
19 |
--------------------------------------------------------------------------------
/apps/web/src/enums.ts:
--------------------------------------------------------------------------------
1 | export enum OptmisticPublicationType {
2 | NewPost = 'NEW_POST',
3 | NewComment = 'NEW_COMMENT'
4 | }
5 |
6 | export enum NotificationType {
7 | All = 'ALL',
8 | Mentions = 'MENTIONS',
9 | Comments = 'COMMENTS',
10 | Likes = 'LIKES',
11 | Collects = 'COLLECTS'
12 | }
13 |
14 | export enum ProfileFeedType {
15 | Feed = 'FEED',
16 | Replies = 'REPLIES',
17 | Media = 'MEDIA',
18 | Collects = 'COLLECTS',
19 | Nft = 'NFT'
20 | }
21 |
--------------------------------------------------------------------------------
/packages/abis/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "abis",
3 | "version": "0.0.0",
4 | "main": "index.ts",
5 | "private": true,
6 | "license": "GPL-3.0",
7 | "scripts": {
8 | "typecheck": "tsc --pretty --noEmit",
9 | "lint": "eslint . --ext .ts",
10 | "lint:fix": "eslint . --fix --ext .ts"
11 | },
12 | "devDependencies": {
13 | "eslint-config-weblint": "workspace:*",
14 | "tsconfig": "workspace:*",
15 | "typescript": "^5.0.4"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/SuperFollow.graphql:
--------------------------------------------------------------------------------
1 | query SuperFollow($request: SingleProfileQueryRequest!) {
2 | profile(request: $request) {
3 | id
4 | followModule {
5 | ... on FeeFollowModuleSettings {
6 | amount {
7 | asset {
8 | name
9 | symbol
10 | decimals
11 | address
12 | }
13 | value
14 | }
15 | recipient
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/apps/web/packages/abis/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "abis",
3 | "version": "0.0.0",
4 | "main": "index.ts",
5 | "private": true,
6 | "license": "GPL-3.0",
7 | "scripts": {
8 | "typecheck": "tsc --pretty --noEmit",
9 | "lint": "eslint . --ext .ts",
10 | "lint:fix": "eslint . --fix --ext .ts"
11 | },
12 | "devDependencies": {
13 | "eslint-config-weblint": "workspace:*",
14 | "tsconfig": "workspace:*",
15 | "typescript": "^5.0.4"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/SuperFollow.graphql:
--------------------------------------------------------------------------------
1 | query SuperFollow($request: SingleProfileQueryRequest!) {
2 | profile(request: $request) {
3 | id
4 | followModule {
5 | ... on FeeFollowModuleSettings {
6 | amount {
7 | asset {
8 | name
9 | symbol
10 | decimals
11 | address
12 | }
13 | value
14 | }
15 | recipient
16 | }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Loader.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 | import { Spinner } from 'ui';
3 |
4 | interface LoaderProps {
5 | message?: string;
6 | }
7 |
8 | const Loader: FC = ({ message }) => {
9 | return (
10 |
11 |
12 | {message ?
{message}
: null}
13 |
14 | );
15 | };
16 |
17 | export default Loader;
18 |
--------------------------------------------------------------------------------
/apps/web/src/store/profile-feed.ts:
--------------------------------------------------------------------------------
1 | import { create } from 'zustand';
2 |
3 | interface ProfileFeedState {
4 | mediaFeedFilters: Record;
5 | setMediaFeedFilters: (feedEventFilters: Record) => void;
6 | }
7 |
8 | export const useProfileFeedStore = create((set) => ({
9 | mediaFeedFilters: { images: true, video: true, audio: true },
10 | setMediaFeedFilters: (mediaFeedFilters) => set(() => ({ mediaFeedFilters }))
11 | }));
12 |
--------------------------------------------------------------------------------
/packages/lib/getAppName.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Convert the input string by capitalizing the first letter and replacing dashes with spaces.
3 | *
4 | * @param str The string to convert
5 | * @returns The string with the first letter capitalized and dashes replaced with spaces
6 | */
7 | const getAppName = (str: string): string => {
8 | const initCase = str.charAt(0).toUpperCase() + str.slice(1);
9 | return initCase.replace(/-/g, ' ');
10 | };
11 |
12 | export default getAppName;
13 |
--------------------------------------------------------------------------------
/apps/web/src/lib/conversationMatchesProfile.ts:
--------------------------------------------------------------------------------
1 | import { XMTP_PREFIX } from 'data/constants';
2 |
3 | /**
4 | * Returns a regex that matches a conversation ID for the given profile ID.
5 | *
6 | * @param profileId The profile ID to match.
7 | * @returns A regular expression object that matches the conversation ID.
8 | */
9 | const conversationMatchesProfile = (profileId: string) => new RegExp(`${XMTP_PREFIX}/.*${profileId}`);
10 |
11 | export default conversationMatchesProfile;
12 |
--------------------------------------------------------------------------------
/packages/data/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "data",
3 | "version": "0.0.0",
4 | "main": "index.ts",
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "typecheck": "tsc --pretty --noEmit",
8 | "lint": "eslint . --ext .ts",
9 | "lint:fix": "eslint . --fix --ext .ts"
10 | },
11 | "devDependencies": {
12 | "@types/node": "^18.15.11",
13 | "eslint-config-weblint": "workspace:*",
14 | "tsconfig": "workspace:*",
15 | "typescript": "^5.0.4"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/lib/getTokenImage.ts:
--------------------------------------------------------------------------------
1 | import { STATIC_IMAGES_URL } from 'data/constants';
2 |
3 | /**
4 | * Returns the URL for the token image with the specified symbol.
5 | *
6 | * @param symbol The token symbol.
7 | * @returns The token image URL.
8 | */
9 | const getTokenImage = (symbol: string): string => {
10 | const symbolLowerCase = symbol?.toLowerCase() ?? '';
11 | return `${STATIC_IMAGES_URL}/tokens/${symbolLowerCase}.svg`;
12 | };
13 |
14 | export default getTokenImage;
15 |
--------------------------------------------------------------------------------
/packages/lib/imageProxy.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns a URL for the specified image that is compatible with imgproxy.
3 | *
4 | * @param url The original URL of the image.
5 | * @param name The transformation name (optional).
6 | * @returns A URL for the image that is compatible with imgproxy.
7 | */
8 | const imageProxy = (url: string, name?: string): string => {
9 | if (!url) {
10 | return '';
11 | }
12 |
13 | return `${url}`;
14 | };
15 |
16 | export default imageProxy;
17 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getAppName.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Convert the input string by capitalizing the first letter and replacing dashes with spaces.
3 | *
4 | * @param str The string to convert
5 | * @returns The string with the first letter capitalized and dashes replaced with spaces
6 | */
7 | const getAppName = (str: string): string => {
8 | const initCase = str.charAt(0).toUpperCase() + str.slice(1);
9 | return initCase.replace(/-/g, ' ');
10 | };
11 |
12 | export default getAppName;
13 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/IFramely/Player.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 | import type { OG } from 'src/types';
3 |
4 | interface PlayerProps {
5 | og: OG;
6 | }
7 |
8 | const Player: FC = ({ og }) => {
9 | return (
10 |
13 | );
14 | };
15 |
16 | export default Player;
17 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Shimmer/NftPickerShimmer.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import NftShimmer from './NftShimmer';
4 |
5 | const NftPickerShimmer = () => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | );
16 | };
17 |
18 | export default NftPickerShimmer;
19 |
--------------------------------------------------------------------------------
/blockchain/hardhat.config.ts:
--------------------------------------------------------------------------------
1 | import { HardhatUserConfig } from 'hardhat/config';
2 | import '@nomicfoundation/hardhat-toolbox';
3 | import dotenv from 'dotenv';
4 |
5 | dotenv.config({ path: './.env' });
6 |
7 | const config: HardhatUserConfig = {
8 | solidity: '0.8.18',
9 | networks: {
10 | hardhat: {},
11 | linea: {
12 | url: process.env.LINEA_RPC_URL,
13 | accounts: [process.env.PRIVATE_KEY ?? ''],
14 | },
15 | },
16 | };
17 |
18 | export default config;
19 |
--------------------------------------------------------------------------------
/apps/web/packages/data/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "data",
3 | "version": "0.0.0",
4 | "main": "index.ts",
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "typecheck": "tsc --pretty --noEmit",
8 | "lint": "eslint . --ext .ts",
9 | "lint:fix": "eslint . --fix --ext .ts"
10 | },
11 | "devDependencies": {
12 | "@types/node": "^18.15.11",
13 | "eslint-config-weblint": "workspace:*",
14 | "tsconfig": "workspace:*",
15 | "typescript": "^5.0.4"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getTokenImage.ts:
--------------------------------------------------------------------------------
1 | import { STATIC_IMAGES_URL } from 'data/constants';
2 |
3 | /**
4 | * Returns the URL for the token image with the specified symbol.
5 | *
6 | * @param symbol The token symbol.
7 | * @returns The token image URL.
8 | */
9 | const getTokenImage = (symbol: string): string => {
10 | const symbolLowerCase = symbol?.toLowerCase() ?? '';
11 | return `${STATIC_IMAGES_URL}/tokens/${symbolLowerCase}.svg`;
12 | };
13 |
14 | export default getTokenImage;
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/imageProxy.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Returns a URL for the specified image that is compatible with imgproxy.
3 | *
4 | * @param url The original URL of the image.
5 | * @param name The transformation name (optional).
6 | * @returns A URL for the image that is compatible with imgproxy.
7 | */
8 | const imageProxy = (url: string, name?: string): string => {
9 | if (!url) {
10 | return '';
11 | }
12 |
13 | return `${url}`;
14 | };
15 |
16 | export default imageProxy;
17 |
--------------------------------------------------------------------------------
/packages/lib/isVerified.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data/constants';
2 | import { mainnetVerified, testnetVerified } from 'data/verified';
3 |
4 | /**
5 | * Checks whether a profile is verified or not.
6 | *
7 | * @param id The profile id to check.
8 | * @returns True if the profile is verified, false otherwise.
9 | */
10 | const isVerified = (id: string): boolean =>
11 | IS_MAINNET ? mainnetVerified.includes(id) : testnetVerified.includes(id);
12 |
13 | export default isVerified;
14 |
--------------------------------------------------------------------------------
/packages/snapshot/Snapshot.graphql:
--------------------------------------------------------------------------------
1 | query Snapshot($id: String, $where: VoteWhere) {
2 | proposal(id: $id) {
3 | id
4 | author
5 | state
6 | title
7 | choices
8 | scores
9 | scores_total
10 | snapshot
11 | symbol
12 | network
13 | type
14 | space {
15 | id
16 | name
17 | }
18 | strategies {
19 | network
20 | name
21 | params
22 | }
23 | }
24 | votes(where: $where) {
25 | choice
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tests/scripts/packages/lib/isVerified.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import isVerified from 'lib/isVerified';
3 |
4 | test.describe('isVerified', () => {
5 | test('should return true if the ID is included in the verified list', () => {
6 | expect(isVerified('0x03')).toBeTruthy();
7 | });
8 |
9 | test('should return false if the ID is not included in the verified list', () => {
10 | expect(isVerified('unknownID')).toBeFalsy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/apps/web/packages/snapshot/Snapshot.graphql:
--------------------------------------------------------------------------------
1 | query Snapshot($id: String, $where: VoteWhere) {
2 | proposal(id: $id) {
3 | id
4 | author
5 | state
6 | title
7 | choices
8 | scores
9 | scores_total
10 | snapshot
11 | symbol
12 | network
13 | type
14 | space {
15 | id
16 | name
17 | }
18 | strategies {
19 | network
20 | name
21 | params
22 | }
23 | }
24 | votes(where: $where) {
25 | choice
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Shimmer/PublicationsShimmer.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 | import { Card } from 'ui';
3 |
4 | import PublicationShimmer from './PublicationShimmer';
5 |
6 | const PublicationsShimmer: FC = () => {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 | );
14 | };
15 |
16 | export default PublicationsShimmer;
17 |
--------------------------------------------------------------------------------
/packages/bundlr/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2021",
4 | "lib": ["es2021", "DOM"],
5 | "module": "es2022",
6 | "moduleResolution": "NodeNext",
7 | "resolveJsonModule": true,
8 | "allowJs": true,
9 | "checkJs": false,
10 | "noEmit": true,
11 | "isolatedModules": true,
12 | "allowSyntheticDefaultImports": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "strict": true,
15 | "skipLibCheck": true
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/lens/documents/fragments/SimpleConditionFields.graphql:
--------------------------------------------------------------------------------
1 | fragment SimpleConditionFields on AccessConditionOutput {
2 | nft {
3 | contractAddress
4 | chainID
5 | contractType
6 | tokenIds
7 | }
8 | eoa {
9 | address
10 | }
11 | token {
12 | contractAddress
13 | amount
14 | chainID
15 | condition
16 | decimals
17 | }
18 | follow {
19 | profileId
20 | }
21 | collect {
22 | publicationId
23 | thisPublication
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/tests/scripts/packages/lib/isGardener.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import isGardener from 'lib/isGardener';
3 |
4 | test.describe('isGardener', () => {
5 | test.skip('should return true if the ID is included in the gardener list', () => {
6 | expect(isGardener('0x03')).toBeTruthy();
7 | });
8 |
9 | test('should return false if the ID is not included in the gardener list', () => {
10 | expect(isGardener('unknownID')).toBeFalsy();
11 | });
12 | });
13 |
--------------------------------------------------------------------------------
/apps/prerender/src/components/Shared/DefaultTags.tsx:
--------------------------------------------------------------------------------
1 | import { APP_NAME, DEFAULT_OG, DESCRIPTION } from 'data/constants';
2 | import type { FC } from 'react';
3 | import { BASE_URL } from 'src/constants';
4 |
5 | import Tags from './Tags';
6 |
7 | const DefaultTags: FC = () => {
8 | return (
9 | <>
10 |
11 | {APP_NAME}
12 | >
13 | );
14 | };
15 |
16 | export default DefaultTags;
17 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/fragments/SimpleConditionFields.graphql:
--------------------------------------------------------------------------------
1 | fragment SimpleConditionFields on AccessConditionOutput {
2 | nft {
3 | contractAddress
4 | chainID
5 | contractType
6 | tokenIds
7 | }
8 | eoa {
9 | address
10 | }
11 | token {
12 | contractAddress
13 | amount
14 | chainID
15 | condition
16 | decimals
17 | }
18 | follow {
19 | profileId
20 | }
21 | collect {
22 | publicationId
23 | thisPublication
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/isVerified.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data/constants';
2 | import { mainnetVerified, testnetVerified } from 'data/verified';
3 |
4 | /**
5 | * Checks whether a profile is verified or not.
6 | *
7 | * @param id The profile id to check.
8 | * @returns True if the profile is verified, false otherwise.
9 | */
10 | const isVerified = (id: string): boolean =>
11 | IS_MAINNET ? mainnetVerified.includes(id) : testnetVerified.includes(id);
12 |
13 | export default isVerified;
14 |
--------------------------------------------------------------------------------
/apps/web/src/components/utils/hooks/useModMode.tsx:
--------------------------------------------------------------------------------
1 | import isGardener from 'lib/isGardener';
2 | import { useAppPersistStore, useAppStore } from 'src/store/app';
3 |
4 | const useModMode = () => {
5 | const currentProfile = useAppStore((state) => state.currentProfile);
6 | const modMode = useAppPersistStore((state) => state.modMode);
7 | const allowed = currentProfile ? isGardener(currentProfile?.id) && modMode : false;
8 |
9 | return { allowed };
10 | };
11 |
12 | export default useModMode;
13 |
--------------------------------------------------------------------------------
/apps/web/src/components/utils/hooks/useStaffMode.tsx:
--------------------------------------------------------------------------------
1 | import isStaff from 'lib/isStaff';
2 | import { useAppPersistStore, useAppStore } from 'src/store/app';
3 |
4 | const useStaffMode = () => {
5 | const currentProfile = useAppStore((state) => state.currentProfile);
6 | const staffMode = useAppPersistStore((state) => state.staffMode);
7 | const allowed = currentProfile ? isStaff(currentProfile?.id) && staffMode : false;
8 |
9 | return { allowed };
10 | };
11 |
12 | export default useStaffMode;
13 |
--------------------------------------------------------------------------------
/packages/lib/isStaff.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data/constants';
2 | import { mainnetStaffs, testnetStaffs } from 'data/staffs';
3 |
4 | /**
5 | * Checks if a given profile ID belongs to a staff member.
6 | *
7 | * @param id The profile ID to check.
8 | * @returns True if the profile ID belongs to a staff member, `false` otherwise.
9 | */
10 | const isStaff = (id: string): boolean =>
11 | IS_MAINNET ? mainnetStaffs.includes(id) : testnetStaffs.includes(id);
12 |
13 | export default isStaff;
14 |
--------------------------------------------------------------------------------
/packages/lib/truncateByWords.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Truncate a string by words and add ellipsis.
3 | * @param string string to truncate
4 | * @param count number of words to truncate to
5 | * @returns truncated string
6 | */
7 | const truncateByWords = (string: string, count: number): string => {
8 | const strArr = string.split(' ');
9 | if (strArr.length > count) {
10 | return `${strArr.slice(0, count).join(' ')}…`;
11 | }
12 | return string;
13 | };
14 |
15 | export default truncateByWords;
16 |
--------------------------------------------------------------------------------
/apps/web/packages/bundlr/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2021",
4 | "lib": ["es2021", "DOM"],
5 | "module": "es2022",
6 | "moduleResolution": "NodeNext",
7 | "resolveJsonModule": true,
8 | "allowJs": true,
9 | "checkJs": false,
10 | "noEmit": true,
11 | "isolatedModules": true,
12 | "allowSyntheticDefaultImports": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "strict": true,
15 | "skipLibCheck": true
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/truncateByWords.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Truncate a string by words and add ellipsis.
3 | * @param string string to truncate
4 | * @param count number of words to truncate to
5 | * @returns truncated string
6 | */
7 | const truncateByWords = (string: string, count: number): string => {
8 | const strArr = string.split(' ');
9 | if (strArr.length > count) {
10 | return `${strArr.slice(0, count).join(' ')}…`;
11 | }
12 | return string;
13 | };
14 |
15 | export default truncateByWords;
16 |
--------------------------------------------------------------------------------
/apps/web/public/assets/type-bold.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/MutualFollowers.graphql:
--------------------------------------------------------------------------------
1 | query MutualFollowers($request: MutualFollowersProfilesQueryRequest!) {
2 | mutualFollowersProfiles(request: $request) {
3 | items {
4 | handle
5 | name
6 | picture {
7 | ... on MediaSet {
8 | original {
9 | url
10 | }
11 | }
12 | ... on NftImage {
13 | uri
14 | }
15 | }
16 | }
17 | pageInfo {
18 | totalCount
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/isStaff.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data/constants';
2 | import { mainnetStaffs, testnetStaffs } from 'data/staffs';
3 |
4 | /**
5 | * Checks if a given profile ID belongs to a staff member.
6 | *
7 | * @param id The profile ID to check.
8 | * @returns True if the profile ID belongs to a staff member, `false` otherwise.
9 | */
10 | const isStaff = (id: string): boolean =>
11 | IS_MAINNET ? mainnetStaffs.includes(id) : testnetStaffs.includes(id);
12 |
13 | export default isStaff;
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/MutualFollowers.graphql:
--------------------------------------------------------------------------------
1 | query MutualFollowers($request: MutualFollowersProfilesQueryRequest!) {
2 | mutualFollowersProfiles(request: $request) {
3 | items {
4 | handle
5 | name
6 | picture {
7 | ... on MediaSet {
8 | original {
9 | url
10 | }
11 | }
12 | ... on NftImage {
13 | uri
14 | }
15 | }
16 | }
17 | pageInfo {
18 | totalCount
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/lens/apollo/cache/createPublicationsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createPublicationsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination([
7 | [
8 | 'request',
9 | ['profileId', 'collectedBy', 'commentsOf', 'publicationTypes', 'metadata', 'commentsRankingFilter']
10 | ],
11 | '$profileId'
12 | ]);
13 | };
14 |
15 | export default createPublicationsFieldPolicy;
16 |
--------------------------------------------------------------------------------
/packages/lens/documents/fragments/ProfileFields.graphql:
--------------------------------------------------------------------------------
1 | fragment ProfileFields on Profile {
2 | id
3 | name
4 | handle
5 | bio
6 | ownedBy
7 | isFollowedByMe
8 | stats {
9 | totalFollowers
10 | totalFollowing
11 | }
12 | attributes {
13 | key
14 | value
15 | }
16 | picture {
17 | ... on MediaSet {
18 | original {
19 | url
20 | }
21 | }
22 | ... on NftImage {
23 | uri
24 | }
25 | }
26 | followModule {
27 | __typename
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/packages/ui/src/PageLoading.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | import { Spinner } from '../src/Spinner';
4 |
5 | interface PageLoadingProps {
6 | message?: string;
7 | }
8 |
9 | export const PageLoading: FC = ({ message }) => {
10 | return (
11 |
17 | );
18 | };
19 |
--------------------------------------------------------------------------------
/tests/scripts/packages/lib/trimify.spec.ts:
--------------------------------------------------------------------------------
1 | import { expect, test } from '@playwright/test';
2 | import trimify from 'lib/trimify';
3 |
4 | test.describe('trimify', () => {
5 | test('should remove multiple line breaks and spaces correctly', () => {
6 | const str = 'Hello.\n\nHow are you?\n\n \nFine, thanks! ';
7 | expect(trimify(str)).toBe('Hello.\n\nHow are you?\n\nFine, thanks!');
8 | });
9 |
10 | test('should work with empty strings', () => {
11 | expect(trimify('')).toBe('');
12 | });
13 | });
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/apollo/cache/createPublicationsFieldPolicy.ts:
--------------------------------------------------------------------------------
1 | import type { FieldPolicy } from '@apollo/client';
2 |
3 | import { cursorBasedPagination } from '../lib';
4 |
5 | const createPublicationsFieldPolicy = (): FieldPolicy => {
6 | return cursorBasedPagination([
7 | [
8 | 'request',
9 | ['profileId', 'collectedBy', 'commentsOf', 'publicationTypes', 'metadata', 'commentsRankingFilter']
10 | ],
11 | '$profileId'
12 | ]);
13 | };
14 |
15 | export default createPublicationsFieldPolicy;
16 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/fragments/ProfileFields.graphql:
--------------------------------------------------------------------------------
1 | fragment ProfileFields on Profile {
2 | id
3 | name
4 | handle
5 | bio
6 | ownedBy
7 | isFollowedByMe
8 | stats {
9 | totalFollowers
10 | totalFollowing
11 | }
12 | attributes {
13 | key
14 | value
15 | }
16 | picture {
17 | ... on MediaSet {
18 | original {
19 | url
20 | }
21 | }
22 | ... on NftImage {
23 | uri
24 | }
25 | }
26 | followModule {
27 | __typename
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/apps/web/packages/ui/src/PageLoading.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | import { Spinner } from '../src/Spinner';
4 |
5 | interface PageLoadingProps {
6 | message?: string;
7 | }
8 |
9 | export const PageLoading: FC = ({ message }) => {
10 | return (
11 |
17 | );
18 | };
19 |
--------------------------------------------------------------------------------
/apps/web/src/components/StaffTools/Sidebar.tsx:
--------------------------------------------------------------------------------
1 | import Sidebar from '@components/Shared/Sidebar';
2 | import { ChartPieIcon } from '@heroicons/react/outline';
3 | import type { FC } from 'react';
4 |
5 | const StaffToolsSidebar: FC = () => {
6 | return (
7 | ,
12 | url: '/stafftools'
13 | }
14 | ]}
15 | />
16 | );
17 | };
18 |
19 | export default StaffToolsSidebar;
20 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/ProfileFeed.graphql:
--------------------------------------------------------------------------------
1 | query ProfileFeed(
2 | $request: PublicationsQueryRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | publications(request: $request) {
7 | items {
8 | ... on Post {
9 | ...PostFields
10 | }
11 | ... on Comment {
12 | ...CommentFields
13 | }
14 | ... on Mirror {
15 | ...MirrorFields
16 | }
17 | }
18 | pageInfo {
19 | next
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/lib/getIsDispatcherEnabled.tsx:
--------------------------------------------------------------------------------
1 | import { OLD_LENS_RELAYER_ADDRESS } from 'data';
2 | import type { Profile } from 'lens';
3 |
4 | const getIsDispatcherEnabled = (profile: Profile | null): boolean => {
5 | if (!profile?.dispatcher?.canUseRelay) {
6 | return false;
7 | }
8 |
9 | const address = profile.dispatcher.address?.toLocaleLowerCase();
10 | const oldRelayer = OLD_LENS_RELAYER_ADDRESS.toLowerCase();
11 |
12 | return address !== oldRelayer;
13 | };
14 |
15 | export default getIsDispatcherEnabled;
16 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getIsDispatcherEnabled.tsx:
--------------------------------------------------------------------------------
1 | import { OLD_LENS_RELAYER_ADDRESS } from 'data';
2 | import type { Profile } from 'lens';
3 |
4 | const getIsDispatcherEnabled = (profile: Profile | null): boolean => {
5 | if (!profile?.dispatcher?.canUseRelay) {
6 | return false;
7 | }
8 |
9 | const address = profile.dispatcher.address?.toLocaleLowerCase();
10 | const oldRelayer = OLD_LENS_RELAYER_ADDRESS.toLowerCase();
11 |
12 | return address !== oldRelayer;
13 | };
14 |
15 | export default getIsDispatcherEnabled;
16 |
--------------------------------------------------------------------------------
/apps/web/public/assets/type-code.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apps/web/src/components/utils/hooks/useSimpleDebounce.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 |
3 | function useSimpleDebounce(value: T, delay?: number): T {
4 | const [debouncedValue, setDebouncedValue] = useState(value);
5 |
6 | useEffect(() => {
7 | const timer = setTimeout(() => setDebouncedValue(value), delay || 500);
8 |
9 | return () => {
10 | clearTimeout(timer);
11 | };
12 | }, [value, delay]);
13 |
14 | return debouncedValue;
15 | }
16 |
17 | export default useSimpleDebounce;
18 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/FeedHighlights.graphql:
--------------------------------------------------------------------------------
1 | query FeedHighlights(
2 | $request: FeedHighlightsRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | feedHighlights(request: $request) {
7 | items {
8 | ... on Post {
9 | ...PostFields
10 | }
11 | ... on Comment {
12 | ...CommentFields
13 | }
14 | ... on Mirror {
15 | ...MirrorFields
16 | }
17 | }
18 | pageInfo {
19 | next
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/ProfileFeed.graphql:
--------------------------------------------------------------------------------
1 | query ProfileFeed(
2 | $request: PublicationsQueryRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | publications(request: $request) {
7 | items {
8 | ... on Post {
9 | ...PostFields
10 | }
11 | ... on Comment {
12 | ...CommentFields
13 | }
14 | ... on Mirror {
15 | ...MirrorFields
16 | }
17 | }
18 | pageInfo {
19 | next
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Badges/Beta.tsx:
--------------------------------------------------------------------------------
1 | import { StarIcon } from '@heroicons/react/solid';
2 | import { Trans } from '@lingui/macro';
3 | import type { FC } from 'react';
4 |
5 | const Beta: FC = () => {
6 | return (
7 |
8 |
9 |
10 | Beta
11 |
12 |
13 | );
14 | };
15 |
16 | export default Beta;
17 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Badges/New.tsx:
--------------------------------------------------------------------------------
1 | import { SparklesIcon } from '@heroicons/react/solid';
2 | import { Trans } from '@lingui/macro';
3 | import type { FC } from 'react';
4 |
5 | const New: FC = () => {
6 | return (
7 |
8 |
9 |
10 | New
11 |
12 |
13 | );
14 | };
15 |
16 | export default New;
17 |
--------------------------------------------------------------------------------
/apps/web/src/lib/resetAuthData.ts:
--------------------------------------------------------------------------------
1 | import { Localstorage } from 'data/storage';
2 |
3 | /**
4 | * Resets the auth data
5 | */
6 | const resetAuthData = () => {
7 | localStorage.removeItem('accessToken');
8 | localStorage.removeItem('refreshToken');
9 | localStorage.removeItem(Localstorage.LensterStore);
10 | localStorage.removeItem(Localstorage.TransactionStore);
11 | localStorage.removeItem(Localstorage.TimelineStore);
12 | localStorage.removeItem(Localstorage.MessageStore);
13 | };
14 |
15 | export default resetAuthData;
16 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/ExploreFeed.graphql:
--------------------------------------------------------------------------------
1 | query ExploreFeed(
2 | $request: ExplorePublicationRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | explorePublications(request: $request) {
7 | items {
8 | ... on Post {
9 | ...PostFields
10 | }
11 | ... on Comment {
12 | ...CommentFields
13 | }
14 | ... on Mirror {
15 | ...MirrorFields
16 | }
17 | }
18 | pageInfo {
19 | next
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/SearchPublications.graphql:
--------------------------------------------------------------------------------
1 | query SearchPublications(
2 | $request: SearchQueryRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | search(request: $request) {
7 | ... on PublicationSearchResult {
8 | items {
9 | ... on Post {
10 | ...PostFields
11 | }
12 | ... on Comment {
13 | ...CommentFields
14 | }
15 | }
16 | pageInfo {
17 | next
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/tsconfig/nextjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Next.js",
4 | "extends": "./base.json",
5 | "compilerOptions": {
6 | "target": "ES6",
7 | "lib": ["dom", "dom.iterable", "esnext"],
8 | "allowJs": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "noEmit": true,
11 | "module": "esnext",
12 | "resolveJsonModule": true,
13 | "jsx": "preserve",
14 | "incremental": true
15 | },
16 | "exclude": ["node_modules", ".next", ".turbo"]
17 | }
18 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/FeedHighlights.graphql:
--------------------------------------------------------------------------------
1 | query FeedHighlights(
2 | $request: FeedHighlightsRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | feedHighlights(request: $request) {
7 | items {
8 | ... on Post {
9 | ...PostFields
10 | }
11 | ... on Comment {
12 | ...CommentFields
13 | }
14 | ... on Mirror {
15 | ...MirrorFields
16 | }
17 | }
18 | pageInfo {
19 | next
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/src/lib/getIsAuthTokensAvailable.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Checks if the access token and refresh token are available in local storage
3 | *
4 | * @returns True if the access token and refresh token are available, `false` otherwise
5 | */
6 | const getIsAuthTokensAvailable = () => {
7 | const accessToken = localStorage.getItem('accessToken');
8 | const refreshToken = localStorage.getItem('refreshToken');
9 | return accessToken !== 'undefined' && refreshToken !== 'undefined';
10 | };
11 |
12 | export default getIsAuthTokensAvailable;
13 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/ExploreFeed.graphql:
--------------------------------------------------------------------------------
1 | query ExploreFeed(
2 | $request: ExplorePublicationRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | explorePublications(request: $request) {
7 | items {
8 | ... on Post {
9 | ...PostFields
10 | }
11 | ... on Comment {
12 | ...CommentFields
13 | }
14 | ... on Mirror {
15 | ...MirrorFields
16 | }
17 | }
18 | pageInfo {
19 | next
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/SearchPublications.graphql:
--------------------------------------------------------------------------------
1 | query SearchPublications(
2 | $request: SearchQueryRequest!
3 | $reactionRequest: ReactionFieldResolverRequest
4 | $profileId: ProfileId
5 | ) {
6 | search(request: $request) {
7 | ... on PublicationSearchResult {
8 | items {
9 | ... on Post {
10 | ...PostFields
11 | }
12 | ... on Comment {
13 | ...CommentFields
14 | }
15 | }
16 | pageInfo {
17 | next
18 | }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/apps/web/packages/tsconfig/nextjs.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Next.js",
4 | "extends": "./base.json",
5 | "compilerOptions": {
6 | "target": "ES6",
7 | "lib": ["dom", "dom.iterable", "esnext"],
8 | "allowJs": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "noEmit": true,
11 | "module": "esnext",
12 | "resolveJsonModule": true,
13 | "jsx": "preserve",
14 | "incremental": true
15 | },
16 | "exclude": ["node_modules", ".next", ".turbo"]
17 | }
18 |
--------------------------------------------------------------------------------
/apps/web/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: Googlebot
2 | Allow: /*
3 | Disallow: /_next/*
4 | Disallow: /settings/*
5 | Disallow: /messages/*
6 |
7 | User-agent: Yandex
8 | Allow: /*
9 | Disallow: /_next/*
10 | Disallow: /settings/*
11 | Disallow: /messages/*
12 |
13 | User-agent: bingbot
14 | Allow: /*
15 | Disallow: /_next/*
16 | Disallow: /settings/*
17 | Disallow: /messages/*
18 |
19 | User-agent: *
20 | Allow: /*
21 | Disallow: /_next/*
22 | Disallow: /settings/*
23 | Disallow: /messages/*
24 |
25 | Sitemap: https://lenster.xyz/sitemap.xml
26 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Shimmer/NftShimmer.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 | import { Card } from 'ui';
3 |
4 | const NftShimmer: FC = () => {
5 | return (
6 |
7 |
8 |
12 |
13 | );
14 | };
15 |
16 | export default NftShimmer;
17 |
--------------------------------------------------------------------------------
/apps/prerender/next.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('next').NextConfig} */
2 | module.exports = {
3 | reactStrictMode: false,
4 | trailingSlash: false,
5 | transpilePackages: ['data'],
6 | async headers() {
7 | return [
8 | {
9 | source: '/:path*',
10 | headers: [
11 | { key: 'Access-Control-Allow-Origin', value: '*' },
12 | { key: 'Access-Control-Max-Age', value: '1728000' },
13 | { key: 'Access-Control-Allow-Headers', value: 'Content-Type' }
14 | ]
15 | }
16 | ];
17 | }
18 | };
19 |
--------------------------------------------------------------------------------
/packages/lib/isGardener.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data/constants';
2 | import { mainnetGardeners, testnetGardeners } from 'data/gardeners';
3 |
4 | /**
5 | * Determines whether a given profile ID belongs to a Gardener on the current network.
6 | *
7 | * @param id The profile ID to check.
8 | * @returns True if the given profile ID belongs to a Gardener, false otherwise.
9 | */
10 | const isGardener = (id: string): boolean =>
11 | IS_MAINNET ? mainnetGardeners.includes(id) : testnetGardeners.includes(id);
12 |
13 | export default isGardener;
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/isGardener.ts:
--------------------------------------------------------------------------------
1 | import { IS_MAINNET } from 'data/constants';
2 | import { mainnetGardeners, testnetGardeners } from 'data/gardeners';
3 |
4 | /**
5 | * Determines whether a given profile ID belongs to a Gardener on the current network.
6 | *
7 | * @param id The profile ID to check.
8 | * @returns True if the given profile ID belongs to a Gardener, false otherwise.
9 | */
10 | const isGardener = (id: string): boolean =>
11 | IS_MAINNET ? mainnetGardeners.includes(id) : testnetGardeners.includes(id);
12 |
13 | export default isGardener;
14 |
--------------------------------------------------------------------------------
/apps/web/src/components/Profile/Message.tsx:
--------------------------------------------------------------------------------
1 | import { MailIcon } from '@heroicons/react/outline';
2 | import type { FC } from 'react';
3 | import { Button } from 'ui';
4 |
5 | interface MessageProps {
6 | onClick: () => void;
7 | }
8 |
9 | const Message: FC = ({ onClick }) => {
10 | return (
11 | }
14 | outline
15 | onClick={onClick}
16 | aria-label="Message"
17 | />
18 | );
19 | };
20 |
21 | export default Message;
22 |
--------------------------------------------------------------------------------
/packages/lib/hasPrideLogo.ts:
--------------------------------------------------------------------------------
1 | import type { Profile } from 'lens';
2 |
3 | import getProfileAttribute from './getProfileAttribute';
4 |
5 | /**
6 | * Returns true if the specified profile has the "hasPrideLogo" attribute set to true.
7 | *
8 | * @param profile The profile object.
9 | * @returns True if the profile has the "hasPrideLogo" attribute set to true, false otherwise.
10 | */
11 | const hasPrideLogo = (profile: Profile): boolean =>
12 | getProfileAttribute(profile?.attributes, 'hasPrideLogo') === 'true';
13 |
14 | export default hasPrideLogo;
15 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## What does this PR do?
2 |
3 | ## Related ticket
4 |
5 | Fixes [LENS-XXX](https://consensyssoftware.atlassian.net/browse/LENS-XXX)
6 |
7 | ## Type of change
8 |
9 | - [ ] Bug fix (non-breaking change, which fixes an issue)
10 | - [ ] New feature (non-breaking change, which adds functionality)
11 | - [ ] Enhancement (non-breaking small changes to existing functionality)
12 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13 | - [ ] This change requires a documentation update
14 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/hasPrideLogo.ts:
--------------------------------------------------------------------------------
1 | import type { Profile } from 'lens';
2 |
3 | import getProfileAttribute from './getProfileAttribute';
4 |
5 | /**
6 | * Returns true if the specified profile has the "hasPrideLogo" attribute set to true.
7 | *
8 | * @param profile The profile object.
9 | * @returns True if the profile has the "hasPrideLogo" attribute set to true, false otherwise.
10 | */
11 | const hasPrideLogo = (profile: Profile): boolean =>
12 | getProfileAttribute(profile?.attributes, 'hasPrideLogo') === 'true';
13 |
14 | export default hasPrideLogo;
15 |
--------------------------------------------------------------------------------
/apps/web/public/opensearch.xml:
--------------------------------------------------------------------------------
1 |
2 | Lenster
3 | Lenster Search
4 |
5 | https://lenster.xyz/favicon-32x32.png
6 | UTF-8
7 | https://lenster.xyz
8 |
9 |
--------------------------------------------------------------------------------
/apps/web/src/store/transaction.ts:
--------------------------------------------------------------------------------
1 | import { Localstorage } from 'data/storage';
2 | import { create } from 'zustand';
3 | import { persist } from 'zustand/middleware';
4 |
5 | interface TransactionPersistState {
6 | txnQueue: any[];
7 | setTxnQueue: (txnQueue: any[]) => void;
8 | }
9 |
10 | export const useTransactionPersistStore = create(
11 | persist(
12 | (set) => ({
13 | txnQueue: [],
14 | setTxnQueue: (txnQueue) => set(() => ({ txnQueue }))
15 | }),
16 | { name: Localstorage.TransactionStore }
17 | )
18 | );
19 |
--------------------------------------------------------------------------------
/tests/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tests",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "test:dev": "playwright test",
8 | "test:nightly": "playwright test scripts/apps"
9 | },
10 | "dependencies": {
11 | "data": "workspace:*",
12 | "lens": "workspace:*",
13 | "lib": "workspace:*"
14 | },
15 | "devDependencies": {
16 | "@playwright/test": "1.32.3",
17 | "@types/node": "^18.15.11",
18 | "eslint-config-weblint": "workspace:*",
19 | "tsconfig": "workspace:*"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateUnfollowTypedData.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateUnfollowTypedData($request: UnfollowRequest!) {
2 | createUnfollowTypedData(request: $request) {
3 | id
4 | expiresAt
5 | typedData {
6 | domain {
7 | name
8 | chainId
9 | version
10 | verifyingContract
11 | }
12 | types {
13 | BurnWithSig {
14 | name
15 | type
16 | }
17 | }
18 | value {
19 | nonce
20 | deadline
21 | tokenId
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/CollectModule.graphql:
--------------------------------------------------------------------------------
1 | query CollectModule($request: PublicationQueryRequest!) {
2 | publication(request: $request) {
3 | ... on Post {
4 | collectNftAddress
5 | collectModule {
6 | ...CollectModuleFields
7 | }
8 | }
9 | ... on Comment {
10 | collectNftAddress
11 | collectModule {
12 | ...CollectModuleFields
13 | }
14 | }
15 | ... on Mirror {
16 | collectNftAddress
17 | collectModule {
18 | ...CollectModuleFields
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/mutations/CreateUnfollowTypedData.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateUnfollowTypedData($request: UnfollowRequest!) {
2 | createUnfollowTypedData(request: $request) {
3 | id
4 | expiresAt
5 | typedData {
6 | domain {
7 | name
8 | chainId
9 | version
10 | verifyingContract
11 | }
12 | types {
13 | BurnWithSig {
14 | name
15 | type
16 | }
17 | }
18 | value {
19 | nonce
20 | deadline
21 | tokenId
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/CollectModule.graphql:
--------------------------------------------------------------------------------
1 | query CollectModule($request: PublicationQueryRequest!) {
2 | publication(request: $request) {
3 | ... on Post {
4 | collectNftAddress
5 | collectModule {
6 | ...CollectModuleFields
7 | }
8 | }
9 | ... on Comment {
10 | collectNftAddress
11 | collectModule {
12 | ...CollectModuleFields
13 | }
14 | }
15 | ... on Mirror {
16 | collectNftAddress
17 | collectModule {
18 | ...CollectModuleFields
19 | }
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/src/components/utils/hooks/useDebounce.tsx:
--------------------------------------------------------------------------------
1 | import type { DependencyList, EffectCallback } from 'react';
2 | import { useEffect } from 'react';
3 |
4 | export const useDebounce = (effect: EffectCallback, delay: number, deps?: DependencyList): void => {
5 | useEffect(() => {
6 | const handler = setTimeout(() => effect(), delay);
7 |
8 | return () => clearTimeout(handler);
9 | // using || operator because
10 | // if its optional then it can be undefined.
11 | // eslint-disable-next-line react-hooks/exhaustive-deps
12 | }, [...(deps || []), delay]);
13 | };
14 |
--------------------------------------------------------------------------------
/packages/lib/getTags.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Extracts up to five unique hashtags from the specified input text.
3 | *
4 | * @param inputText The text to extract tags from.
5 | * @returns An array of up to five unique hashtags without the '#' symbol or surrounding whitespace.
6 | */
7 | const getTags = (inputText: string): string[] => {
8 | const regex = /(?:^|\s)#([\dA-Za-z]+)/gm;
9 | const matches = inputText.match(regex)?.map((tag) => tag.trim().slice(1)) ?? [];
10 | const uniqueTags = [...new Set(matches)];
11 | return uniqueTags.slice(0, 5);
12 | };
13 |
14 | export default getTags;
15 |
--------------------------------------------------------------------------------
/apps/web/packages/lib/getTags.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Extracts up to five unique hashtags from the specified input text.
3 | *
4 | * @param inputText The text to extract tags from.
5 | * @returns An array of up to five unique hashtags without the '#' symbol or surrounding whitespace.
6 | */
7 | const getTags = (inputText: string): string[] => {
8 | const regex = /(?:^|\s)#([\dA-Za-z]+)/gm;
9 | const matches = inputText.match(regex)?.map((tag) => tag.trim().slice(1)) ?? [];
10 | const uniqueTags = [...new Set(matches)];
11 | return uniqueTags.slice(0, 5);
12 | };
13 |
14 | export default getTags;
15 |
--------------------------------------------------------------------------------
/apps/web/src/lib/chunkArray.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * Splits an array into smaller arrays of a specified chunk size.
3 | *
4 | * @param arr The array to chunk.
5 | * @param chunkSize The size of each chunk.
6 | * @returns An array of chunks.
7 | * @template T The type of elements in the array.
8 | */
9 | const chunkArray = (arr: T[], chunkSize: number): T[][] => {
10 | const out: T[][] = [];
11 | for (let i = 0; i < arr.length; i += chunkSize) {
12 | const chunk = arr.slice(i, i + chunkSize);
13 | out.push(chunk);
14 | }
15 |
16 | return out;
17 | };
18 |
19 | export default chunkArray;
20 |
--------------------------------------------------------------------------------
/packages/workers/metadata/README.md:
--------------------------------------------------------------------------------
1 | # Metadata worker
2 |
3 | Metadata Worker: Posting JSON Metadata to Arweave via Bundlr
4 |
5 | This document describes how to create a Cloudflare Worker that posts JSON metadata of a publication and profile to Arweave via Bundlr.
6 |
7 | All metadata will be uploaded to **node2** in Bundlr, it means if metadata size is below 100KB it can be uploaded for free.
8 |
9 | ## Prerequisites
10 |
11 | - A EVM address's private key
12 | - Add the following environment variables to your `.dev.vars` file:
13 | - `BUNDLR_PRIVATE_KEY` - the private key of the EVM address
14 |
--------------------------------------------------------------------------------
/packages/workers/prerender/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@workers/prerender",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "worker:deploy": "wrangler publish",
8 | "typecheck": "tsc --pretty --noEmit",
9 | "lint": "eslint . --ext .ts",
10 | "lint:fix": "eslint . --fix --ext .ts"
11 | },
12 | "devDependencies": {
13 | "@cloudflare/workers-types": "^4.20230404.0",
14 | "eslint-config-weblint": "workspace:*",
15 | "tsconfig": "workspace:*",
16 | "typescript": "^5.0.4",
17 | "wrangler": "^2.15.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/turbo.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://turbo.build/schema.json",
3 | "pipeline": {
4 | "build": {
5 | "dependsOn": ["^build"],
6 | "outputs": ["dist/**", ".next/**"]
7 | },
8 | "lint": { "outputs": [] },
9 | "lint:fix": { "outputs": [] },
10 | "typecheck": { "outputs": [] },
11 | "codegen": { "outputs": [] },
12 | "extract": { "outputs": [] },
13 | "worker:deploy": { "outputs": [] },
14 | "dev": { "cache": false },
15 | "start": { "cache": false },
16 | "test:dev": { "cache": false },
17 | "test:nightly": { "cache": false }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/apps/web/src/components/Publication/HiddenPublication.tsx:
--------------------------------------------------------------------------------
1 | import { Trans } from '@lingui/macro';
2 | import type { FC } from 'react';
3 | import { Card } from 'ui';
4 |
5 | interface HiddenPublicationProps {
6 | type?: string;
7 | }
8 |
9 | const HiddenPublication: FC = ({ type = 'Publication' }) => {
10 | return (
11 |
12 |
13 | {type} was hidden by the author
14 |
15 |
16 | );
17 | };
18 |
19 | export default HiddenPublication;
20 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/Loading.tsx:
--------------------------------------------------------------------------------
1 | import type { FC } from 'react';
2 |
3 | import MetaTags from '../Common/MetaTags';
4 |
5 | const Loading: FC = () => {
6 | return (
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | );
15 | };
16 |
17 | export default Loading;
18 |
--------------------------------------------------------------------------------
/packages/bundlr/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bundlr",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "typecheck": "tsc --pretty --noEmit",
8 | "lint": "eslint . --ext .ts",
9 | "lint:fix": "eslint . --fix --ext .ts"
10 | },
11 | "dependencies": {
12 | "arbundles": "^0.8.0",
13 | "base64url": "^3.0.1",
14 | "ethers": "5.7.2",
15 | "secp256k1": "^5.0.0"
16 | },
17 | "devDependencies": {
18 | "@types/secp256k1": "^4.0.3",
19 | "eslint-config-weblint": "workspace:*",
20 | "typescript": "^5.0.4"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/metadata/README.md:
--------------------------------------------------------------------------------
1 | # Metadata worker
2 |
3 | Metadata Worker: Posting JSON Metadata to Arweave via Bundlr
4 |
5 | This document describes how to create a Cloudflare Worker that posts JSON metadata of a publication and profile to Arweave via Bundlr.
6 |
7 | All metadata will be uploaded to **node2** in Bundlr, it means if metadata size is below 100KB it can be uploaded for free.
8 |
9 | ## Prerequisites
10 |
11 | - A EVM address's private key
12 | - Add the following environment variables to your `.dev.vars` file:
13 | - `BUNDLR_PRIVATE_KEY` - the private key of the EVM address
14 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/prerender/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@workers/prerender",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "worker:deploy": "wrangler publish",
8 | "typecheck": "tsc --pretty --noEmit",
9 | "lint": "eslint . --ext .ts",
10 | "lint:fix": "eslint . --fix --ext .ts"
11 | },
12 | "devDependencies": {
13 | "@cloudflare/workers-types": "^4.20230404.0",
14 | "eslint-config-weblint": "workspace:*",
15 | "tsconfig": "workspace:*",
16 | "typescript": "^5.0.4",
17 | "wrangler": "^2.15.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/apps/web/packages/bundlr/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bundlr",
3 | "version": "0.0.0",
4 | "private": true,
5 | "license": "GPL-3.0",
6 | "scripts": {
7 | "typecheck": "tsc --pretty --noEmit",
8 | "lint": "eslint . --ext .ts",
9 | "lint:fix": "eslint . --fix --ext .ts"
10 | },
11 | "dependencies": {
12 | "arbundles": "^0.8.0",
13 | "base64url": "^3.0.1",
14 | "ethers": "5.7.2",
15 | "secp256k1": "^5.0.0"
16 | },
17 | "devDependencies": {
18 | "@types/secp256k1": "^4.0.3",
19 | "eslint-config-weblint": "workspace:*",
20 | "typescript": "^5.0.4"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/ui/src/EmptyState.tsx:
--------------------------------------------------------------------------------
1 | import type { FC, ReactNode } from 'react';
2 |
3 | import { Card } from './Card';
4 |
5 | interface EmptyStateProps {
6 | message: ReactNode;
7 | icon: ReactNode;
8 | hideCard?: boolean;
9 | }
10 |
11 | export const EmptyState: FC = ({ message, icon, hideCard = false }) => {
12 | return (
13 |
14 |
15 |
{icon}
16 |
{message}
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/apps/web/packages/ui/src/EmptyState.tsx:
--------------------------------------------------------------------------------
1 | import type { FC, ReactNode } from 'react';
2 |
3 | import { Card } from './Card';
4 |
5 | interface EmptyStateProps {
6 | message: ReactNode;
7 | icon: ReactNode;
8 | hideCard?: boolean;
9 | }
10 |
11 | export const EmptyState: FC = ({ message, icon, hideCard = false }) => {
12 | return (
13 |
14 |
15 |
{icon}
16 |
{message}
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/packages/workers/prerender/README.md:
--------------------------------------------------------------------------------
1 | # Prerender worker
2 |
3 | Prerender Worker for SEO Tags with Cloudflare
4 |
5 | This document describes how to create a Cloudflare Worker that prerenders your web application for search engine bots by checking the `User-Agent` header. This worker will be proxied via Workers Routes in Cloudflare.
6 |
7 | Please note that this worker will not work locally.
8 |
9 | This worker check the `User-Agent` header and if it contains bot check regex, it will prerender the page and return the HTML that contains SEO tags. Otherwise, it will return the original response of the web application.
10 |
--------------------------------------------------------------------------------
/packages/workers/prerender/src/index.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | async fetch(request: Request) {
3 | return await handleRequest(request);
4 | }
5 | };
6 |
7 | async function handleRequest(request: Request) {
8 | const userAgent = request.headers.get('User-Agent') || '';
9 | const re = /bot|telegram|baidu|bing|yandex|iframely|whatsapp|facebook/i;
10 |
11 | if (re.test(userAgent)) {
12 | const url = new URL(request.url);
13 | const path = url.pathname;
14 | const res = await fetch(`https://prerender.lenster.xyz/${path}`);
15 |
16 | return res;
17 | }
18 |
19 | return fetch(request);
20 | }
21 |
--------------------------------------------------------------------------------
/apps/web/src/components/Shared/CommentWarning.tsx:
--------------------------------------------------------------------------------
1 | import { ChatAlt2Icon } from '@heroicons/react/outline';
2 | import { Trans } from '@lingui/macro';
3 | import type { FC } from 'react';
4 | import { Card } from 'ui';
5 |
6 | const CommentWarning: FC = () => {
7 | return (
8 |
9 |
10 |
11 | You can't reply to this post
12 |
13 |
14 | );
15 | };
16 |
17 | export default CommentWarning;
18 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/prerender/README.md:
--------------------------------------------------------------------------------
1 | # Prerender worker
2 |
3 | Prerender Worker for SEO Tags with Cloudflare
4 |
5 | This document describes how to create a Cloudflare Worker that prerenders your web application for search engine bots by checking the `User-Agent` header. This worker will be proxied via Workers Routes in Cloudflare.
6 |
7 | Please note that this worker will not work locally.
8 |
9 | This worker check the `User-Agent` header and if it contains bot check regex, it will prerender the page and return the HTML that contains SEO tags. Otherwise, it will return the original response of the web application.
10 |
--------------------------------------------------------------------------------
/apps/web/packages/workers/prerender/src/index.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | async fetch(request: Request) {
3 | return await handleRequest(request);
4 | }
5 | };
6 |
7 | async function handleRequest(request: Request) {
8 | const userAgent = request.headers.get('User-Agent') || '';
9 | const re = /bot|telegram|baidu|bing|yandex|iframely|whatsapp|facebook/i;
10 |
11 | if (re.test(userAgent)) {
12 | const url = new URL(request.url);
13 | const path = url.pathname;
14 | const res = await fetch(`https://prerender.lenster.xyz/${path}`);
15 |
16 | return res;
17 | }
18 |
19 | return fetch(request);
20 | }
21 |
--------------------------------------------------------------------------------
/packages/tsconfig/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Default",
4 | "compilerOptions": {
5 | "composite": false,
6 | "declaration": true,
7 | "declarationMap": true,
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "inlineSources": false,
11 | "isolatedModules": true,
12 | "moduleResolution": "node",
13 | "noUnusedLocals": false,
14 | "noUnusedParameters": false,
15 | "preserveWatchOutput": true,
16 | "skipLibCheck": true,
17 | "strict": true
18 | },
19 | "exclude": ["node_modules"]
20 | }
21 |
--------------------------------------------------------------------------------
/apps/web/packages/tsconfig/base.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/tsconfig",
3 | "display": "Default",
4 | "compilerOptions": {
5 | "composite": false,
6 | "declaration": true,
7 | "declarationMap": true,
8 | "esModuleInterop": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "inlineSources": false,
11 | "isolatedModules": true,
12 | "moduleResolution": "node",
13 | "noUnusedLocals": false,
14 | "noUnusedParameters": false,
15 | "preserveWatchOutput": true,
16 | "skipLibCheck": true,
17 | "strict": true
18 | },
19 | "exclude": ["node_modules"]
20 | }
21 |
--------------------------------------------------------------------------------
/packages/lens/documents/mutations/CreateBurnProfileTypedData.graphql:
--------------------------------------------------------------------------------
1 | mutation CreateBurnProfileTypedData($options: TypedDataOptions, $request: BurnProfileRequest!) {
2 | createBurnProfileTypedData(options: $options, request: $request) {
3 | id
4 | expiresAt
5 | typedData {
6 | domain {
7 | name
8 | chainId
9 | version
10 | verifyingContract
11 | }
12 | types {
13 | BurnWithSig {
14 | name
15 | type
16 | }
17 | }
18 | value {
19 | nonce
20 | deadline
21 | tokenId
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/packages/lens/documents/queries/CanDecryptStatus.graphql:
--------------------------------------------------------------------------------
1 | query CanDecryptStatus($request: PublicationQueryRequest!, $profileId: ProfileId) {
2 | publication(request: $request) {
3 | ... on Post {
4 | id
5 | canDecrypt(profileId: $profileId) {
6 | result
7 | reasons
8 | }
9 | }
10 | ... on Comment {
11 | id
12 | canDecrypt(profileId: $profileId) {
13 | result
14 | reasons
15 | }
16 | }
17 | ... on Mirror {
18 | id
19 | canDecrypt(profileId: $profileId) {
20 | result
21 | reasons
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/packages/lens/documents/queries/CanDecryptStatus.graphql:
--------------------------------------------------------------------------------
1 | query CanDecryptStatus($request: PublicationQueryRequest!, $profileId: ProfileId) {
2 | publication(request: $request) {
3 | ... on Post {
4 | id
5 | canDecrypt(profileId: $profileId) {
6 | result
7 | reasons
8 | }
9 | }
10 | ... on Comment {
11 | id
12 | canDecrypt(profileId: $profileId) {
13 | result
14 | reasons
15 | }
16 | }
17 | ... on Mirror {
18 | id
19 | canDecrypt(profileId: $profileId) {
20 | result
21 | reasons
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/apps/web/src/components/Publication/Type/Commented.tsx:
--------------------------------------------------------------------------------
1 | import type { Comment } from 'lens';
2 | import type { FC } from 'react';
3 |
4 | import ThreadBody from '../ThreadBody';
5 |
6 | interface CommentedProps {
7 | publication: Comment;
8 | }
9 |
10 | const Commented: FC = ({ publication }) => {
11 | const commentOn: Comment | any = publication?.commentOn;
12 | const mainPost = commentOn?.mainPost;
13 |
14 | return (
15 | <>
16 | {mainPost ? : null}
17 |
18 | >
19 | );
20 | };
21 |
22 | export default Commented;
23 |
--------------------------------------------------------------------------------
/apps/web/src/lib/getToastOptions.ts:
--------------------------------------------------------------------------------
1 | const getToastOptions = (theme?: string) => ({
2 | style: {
3 | background: theme === 'dark' ? '#18181B' : '',
4 | color: theme === 'dark' ? '#fff' : ''
5 | },
6 | success: {
7 | className: 'border border-green-500',
8 | iconTheme: {
9 | primary: '#10B981',
10 | secondary: 'white'
11 | }
12 | },
13 | error: {
14 | className: 'border border-red-500',
15 | iconTheme: {
16 | primary: '#EF4444',
17 | secondary: 'white'
18 | }
19 | },
20 | loading: { className: 'border border-gray-300' }
21 | });
22 |
23 | export default getToastOptions;
24 |
--------------------------------------------------------------------------------