├── .npmrc ├── src ├── lib │ ├── eth-sdk │ │ ├── esm │ │ │ ├── types │ │ │ │ ├── common.js │ │ │ │ ├── polygon │ │ │ │ │ ├── index.js │ │ │ │ │ ├── LensHub.js │ │ │ │ │ └── index.d.ts │ │ │ │ ├── factories │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── polygon │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── LensHub__factory.d.ts │ │ │ │ │ │ └── LensHub__factory.js │ │ │ │ │ └── index.js │ │ │ │ ├── index.js │ │ │ │ ├── index.d.ts │ │ │ │ └── common.d.ts │ │ │ ├── index.d.ts │ │ │ └── index.js │ │ ├── index.d.ts │ │ ├── index.mjs │ │ ├── types.d.ts │ │ ├── index.cjs │ │ ├── cjs │ │ │ ├── types │ │ │ │ ├── factories │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── polygon │ │ │ │ │ │ ├── index.d.ts │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── LensHub__factory.d.ts │ │ │ │ │ └── index.js │ │ │ │ ├── polygon │ │ │ │ │ ├── index.d.ts │ │ │ │ │ ├── index.js │ │ │ │ │ └── LensHub.js │ │ │ │ ├── common.js │ │ │ │ ├── index.d.ts │ │ │ │ ├── common.d.ts │ │ │ │ └── index.js │ │ │ ├── index.d.ts │ │ │ └── index.js │ │ ├── package.json │ │ ├── config.ts │ │ ├── README.md │ │ └── abis │ │ │ └── polygon │ │ │ └── lensHub.json │ ├── constants.ts │ ├── graphql │ │ ├── fragments │ │ │ ├── erc20Fields.gql │ │ │ ├── mediaFields.gql │ │ │ ├── walletFields.gql │ │ │ ├── publicationStatsFIeld.gql │ │ │ ├── mirrorFields.gql │ │ │ ├── commentMirrorOfFields.gql │ │ │ ├── mediaOutputFields.gql │ │ │ ├── commentFields.gql │ │ │ ├── mirrorBaseFIelds.gql │ │ │ ├── commentBaseFields.gql │ │ │ ├── postFields.gql │ │ │ ├── collectModuleFields.gql │ │ │ └── profileFIelds.gql │ │ ├── queries │ │ │ ├── recommendedProfiles.gql │ │ │ ├── challengeRequest.gql │ │ │ ├── defaultProfile.gql │ │ │ ├── profile.gql │ │ │ └── timelime.gql │ │ ├── mutations │ │ │ ├── refreshToken.gql │ │ │ └── authenticate.gql │ │ └── kitQLClient.ts │ ├── stores │ │ ├── userProfile.ts │ │ └── wallet.ts │ ├── components │ │ ├── NotImplemented.svelte │ │ ├── Footer.svelte │ │ ├── Navigation.svelte │ │ ├── Feed.svelte │ │ ├── Post.svelte │ │ ├── RecommendedProfiles.svelte │ │ └── SignIn.svelte │ └── utils.ts ├── routes │ ├── posts │ │ └── [id].svelte │ ├── __layout-profile.svelte │ ├── __layout.svelte │ ├── index.svelte │ └── u │ │ └── [handle]@profile.svelte ├── app.d.ts ├── app.css └── app.html ├── static ├── favicon.png └── img │ ├── lens.png │ └── default_avatar.jpg ├── .gitignore ├── .prettierrc ├── .eslintignore ├── .prettierignore ├── tailwind.config.cjs ├── tsconfig.json ├── postcss.config.cjs ├── codegen.yaml ├── .eslintrc.cjs ├── svelte.config.js ├── README.md └── package.json /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/common.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm' 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/index.mjs: -------------------------------------------------------------------------------- 1 | export * from './esm' 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/polygon/index.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/types.d.ts: -------------------------------------------------------------------------------- 1 | export * from './esm/types' 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/polygon/LensHub.js: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/index.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('./cjs') 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/factories/index.d.ts: -------------------------------------------------------------------------------- 1 | export * as polygon from "./polygon"; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/factories/index.d.ts: -------------------------------------------------------------------------------- 1 | export * as polygon from "./polygon"; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/polygon/index.d.ts: -------------------------------------------------------------------------------- 1 | export type { LensHub } from "./LensHub"; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/polygon/index.d.ts: -------------------------------------------------------------------------------- 1 | export type { LensHub } from "./LensHub"; 2 | -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/what-the-func/lens-starter/HEAD/static/favicon.png -------------------------------------------------------------------------------- /static/img/lens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/what-the-func/lens-starter/HEAD/static/img/lens.png -------------------------------------------------------------------------------- /src/lib/constants.ts: -------------------------------------------------------------------------------- 1 | export const APIURL = 'https://api.lens.dev' 2 | export const STORAGE_KEY = 'LH_STORAGE_KEY' -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/factories/polygon/index.d.ts: -------------------------------------------------------------------------------- 1 | export { LensHub__factory } from "./LensHub__factory"; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/factories/polygon/index.d.ts: -------------------------------------------------------------------------------- 1 | export { LensHub__factory } from "./LensHub__factory"; 2 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/common.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /static/img/default_avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/what-the-func/lens-starter/HEAD/static/img/default_avatar.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | _kitql -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/polygon/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/polygon/LensHub.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/erc20Fields.gql: -------------------------------------------------------------------------------- 1 | fragment Erc20Fields on Erc20 { 2 | name 3 | symbol 4 | decimals 5 | address 6 | } -------------------------------------------------------------------------------- /src/lib/graphql/fragments/mediaFields.gql: -------------------------------------------------------------------------------- 1 | fragment MediaFields on Media { 2 | url 3 | width 4 | height 5 | mimeType 6 | } 7 | -------------------------------------------------------------------------------- /src/lib/graphql/queries/recommendedProfiles.gql: -------------------------------------------------------------------------------- 1 | query recommendedProfiles { 2 | recommendedProfiles { 3 | ...ProfileFields 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": false, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "semi": false 7 | } 8 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/index.js: -------------------------------------------------------------------------------- 1 | export * as factories from "./factories"; 2 | export { LensHub__factory } from "./factories/polygon/LensHub__factory"; 3 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/walletFields.gql: -------------------------------------------------------------------------------- 1 | fragment WalletFields on Wallet { 2 | address 3 | defaultProfile { 4 | ...ProfileFields 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": ".dethcrypto/eth-sdk-client", 3 | "main": "index.cjs", 4 | "module": "index.mjs", 5 | "types": "index.d.ts" 6 | } 7 | -------------------------------------------------------------------------------- /src/lib/graphql/queries/challengeRequest.gql: -------------------------------------------------------------------------------- 1 | query challengeRequest ($request: ChallengeRequest!) { 2 | challenge(request: $request) { 3 | text 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/factories/index.js: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export * as polygon from "./polygon"; 5 | -------------------------------------------------------------------------------- /src/lib/graphql/mutations/refreshToken.gql: -------------------------------------------------------------------------------- 1 | mutation refreshToken($request: RefreshRequest!) { 2 | refresh(request: $request) { 3 | accessToken 4 | refreshToken 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/lib/graphql/queries/defaultProfile.gql: -------------------------------------------------------------------------------- 1 | query defaultProfile($request: DefaultProfileRequest!) { 2 | defaultProfile(request: $request) { 3 | ...ProfileFields 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/lib/graphql/queries/profile.gql: -------------------------------------------------------------------------------- 1 | query profile ($request: ProfileQueryRequest!) { 2 | profiles(request: $request) { 3 | items { 4 | ... ProfileFields 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/publicationStatsFIeld.gql: -------------------------------------------------------------------------------- 1 | fragment PublicationStatsFields on PublicationStats { 2 | totalAmountOfMirrors 3 | totalAmountOfCollects 4 | totalAmountOfComments 5 | } 6 | -------------------------------------------------------------------------------- /src/lib/graphql/mutations/authenticate.gql: -------------------------------------------------------------------------------- 1 | mutation authenticate($request: SignedAuthChallenge!) { 2 | authenticate(request: $request) { 3 | accessToken 4 | refreshToken 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/routes/posts/[id].svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 | 7 |
8 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/factories/polygon/index.js: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | export { LensHub__factory } from "./LensHub__factory"; 5 | -------------------------------------------------------------------------------- /src/lib/stores/userProfile.ts: -------------------------------------------------------------------------------- 1 | import type { Profile } from '$lib/graphql/types' 2 | import { writable } from 'svelte/store' 3 | 4 | const userProfile = writable(null) 5 | 6 | export default userProfile 7 | -------------------------------------------------------------------------------- /src/lib/components/NotImplemented.svelte: -------------------------------------------------------------------------------- 1 |
2 |
3 | 🤖 4 | Not implemented yet. 5 |
6 |
-------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/mirrorFields.gql: -------------------------------------------------------------------------------- 1 | fragment MirrorFields on Mirror { 2 | ...MirrorBaseFields 3 | mirrorOf { 4 | ... on Post { 5 | ...PostFields 6 | } 7 | ... on Comment { 8 | ...CommentFields 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | content: ['./src/**/*.{html,js,svelte,ts}'], 3 | 4 | theme: { 5 | extend: {} 6 | }, 7 | 8 | plugins: [require('@tailwindcss/typography'), require('daisyui')] 9 | } 10 | 11 | module.exports = config 12 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import type * as polygon from "./polygon"; 2 | export type { polygon }; 3 | export * as factories from "./factories"; 4 | export type { LensHub } from "./polygon/LensHub"; 5 | export { LensHub__factory } from "./factories/polygon/LensHub__factory"; 6 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import type * as polygon from "./polygon"; 2 | export type { polygon }; 3 | export * as factories from "./factories"; 4 | export type { LensHub } from "./polygon/LensHub"; 5 | export { LensHub__factory } from "./factories/polygon/LensHub__factory"; 6 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/commentMirrorOfFields.gql: -------------------------------------------------------------------------------- 1 | fragment CommentMirrorOfFields on Comment { 2 | ...CommentBaseFields 3 | mainPost { 4 | ... on Post { 5 | ...PostFields 6 | } 7 | ... on Mirror { 8 | ...MirrorBaseFields 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | // See https://kit.svelte.dev/docs/types#app 4 | // for information about these interfaces 5 | declare namespace App { 6 | // interface Locals {} 7 | // interface Platform {} 8 | // interface Session {} 9 | // interface Stuff {} 10 | } 11 | -------------------------------------------------------------------------------- /src/app.css: -------------------------------------------------------------------------------- 1 | /* Write your global styles here, in PostCSS syntax */ 2 | @tailwind base; 3 | @tailwind components; 4 | @tailwind utilities; 5 | 6 | .text-magic { 7 | @apply text-transparent font-semibold bg-clip-text bg-gradient-to-r from-secondary to-primary; 8 | } 9 | 10 | .shimmer { 11 | @apply animate-pulse; 12 | @apply bg-gray-300; 13 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": true, 6 | "esModuleInterop": true, 7 | "forceConsistentCasingInFileNames": true, 8 | "resolveJsonModule": true, 9 | "skipLibCheck": true, 10 | "sourceMap": true, 11 | "strict": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@dethcrypto/eth-sdk' 2 | 3 | export default defineConfig({ 4 | contracts: { 5 | polygon: { 6 | lensHub: '0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d' 7 | } 8 | }, 9 | rpc: { 10 | polygon: 'https://matic-mainnet.chainstacklabs.com' 11 | }, 12 | outputPath: './src/lib/eth-sdk' 13 | }) 14 | -------------------------------------------------------------------------------- /src/lib/graphql/kitQLClient.ts: -------------------------------------------------------------------------------- 1 | import { KitQLClient } from '@kitql/client' 2 | 3 | export type AppHeaders = { 4 | 'x-access-token'?: `Bearer ${string}` 5 | } 6 | 7 | export const kitQLClient = new KitQLClient({ 8 | url: 'https://api.lens.dev', 9 | headersContentType: 'application/json', 10 | logType: ['client', 'server', 'operationAndvariables'], 11 | }) -------------------------------------------------------------------------------- /postcss.config.cjs: -------------------------------------------------------------------------------- 1 | const tailwindcss = require('tailwindcss') 2 | const autoprefixer = require('autoprefixer') 3 | 4 | const config = { 5 | plugins: [ 6 | //Some plugins, like tailwindcss/nesting, need to run before Tailwind, 7 | tailwindcss(), 8 | //But others, like autoprefixer, need to run after, 9 | autoprefixer 10 | ] 11 | } 12 | 13 | module.exports = config 14 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | Lens Starter 9 | 10 | 11 |
%sveltekit.body%
12 | 13 | 14 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/README.md: -------------------------------------------------------------------------------- 1 | This package was automatically generated by eth-sdk. Don't edit its source code, it will be rewritten when you run 2 | eth-sdk next time. 3 | 4 | --- 5 | 6 | `index.cjs`, `index.d.ts`, `index.mjs`, `types.d.ts` and `package.json` here are static files copied from 7 | `eth-sdk/static` to the generated package. 8 | 9 | You can find your generated files in `./esm` and `./cjs` directories. 10 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/mediaOutputFields.gql: -------------------------------------------------------------------------------- 1 | fragment MetadataOutputFields on MetadataOutput { 2 | name 3 | description 4 | content 5 | media { 6 | original { 7 | ...MediaFields 8 | } 9 | small { 10 | ...MediaFields 11 | } 12 | medium { 13 | ...MediaFields 14 | } 15 | } 16 | attributes { 17 | displayType 18 | traitType 19 | value 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/index.d.ts: -------------------------------------------------------------------------------- 1 | import { providers, Signer } from 'ethers'; 2 | import * as types from './types'; 3 | export declare function getContract(address: string, abi: object, defaultSignerOrProvider: Signer | providers.Provider): any; 4 | export declare type PolygonSdk = ReturnType; 5 | export declare function getPolygonSdk(defaultSignerOrProvider: Signer | providers.Provider): { 6 | lensHub: types.polygon.LensHub; 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/index.d.ts: -------------------------------------------------------------------------------- 1 | import { providers, Signer } from 'ethers'; 2 | import * as types from './types'; 3 | export declare function getContract(address: string, abi: object, defaultSignerOrProvider: Signer | providers.Provider): any; 4 | export declare type PolygonSdk = ReturnType; 5 | export declare function getPolygonSdk(defaultSignerOrProvider: Signer | providers.Provider): { 6 | lensHub: types.polygon.LensHub; 7 | }; 8 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/factories/polygon/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.LensHub__factory = void 0; 4 | /* Autogenerated file. Do not edit manually. */ 5 | /* tslint:disable */ 6 | /* eslint-disable */ 7 | var LensHub__factory_1 = require("./LensHub__factory"); 8 | Object.defineProperty(exports, "LensHub__factory", { enumerable: true, get: function () { return LensHub__factory_1.LensHub__factory; } }); 9 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/commentFields.gql: -------------------------------------------------------------------------------- 1 | fragment CommentFields on Comment { 2 | ...CommentBaseFields 3 | mainPost { 4 | ... on Post { 5 | ...PostFields 6 | } 7 | ... on Mirror { 8 | ...MirrorBaseFields 9 | mirrorOf { 10 | ... on Post { 11 | ...PostFields 12 | } 13 | ... on Comment { 14 | ...CommentMirrorOfFields 15 | } 16 | } 17 | } 18 | } 19 | __typename 20 | } 21 | -------------------------------------------------------------------------------- /src/lib/graphql/queries/timelime.gql: -------------------------------------------------------------------------------- 1 | query timeline($request: TimelineRequest!) { 2 | timeline(request: $request) { 3 | items { 4 | __typename 5 | ... on Post { 6 | ...PostFields 7 | } 8 | ... on Comment { 9 | ...CommentFields 10 | } 11 | ... on Mirror { 12 | ...MirrorFields 13 | } 14 | } 15 | pageInfo { 16 | prev 17 | next 18 | totalCount 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/mirrorBaseFIelds.gql: -------------------------------------------------------------------------------- 1 | fragment MirrorBaseFields on Mirror { 2 | id 3 | profile { 4 | ...ProfileFields 5 | } 6 | stats { 7 | ...PublicationStatsFields 8 | } 9 | metadata { 10 | ...MetadataOutputFields 11 | } 12 | createdAt 13 | collectModule { 14 | ...CollectModuleFields 15 | } 16 | referenceModule { 17 | ... on FollowOnlyReferenceModuleSettings { 18 | type 19 | } 20 | } 21 | appId 22 | __typename 23 | } 24 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/index.js: -------------------------------------------------------------------------------- 1 | import { Contract } from 'ethers'; 2 | import polygon_lensHub_abi from '../abis/polygon/lensHub.json'; 3 | export function getContract(address, abi, defaultSignerOrProvider) { 4 | return new Contract(address, abi, defaultSignerOrProvider); 5 | } 6 | export function getPolygonSdk(defaultSignerOrProvider) { 7 | return { 8 | "lensHub": getContract('0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d', polygon_lensHub_abi, defaultSignerOrProvider), 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/commentBaseFields.gql: -------------------------------------------------------------------------------- 1 | fragment CommentBaseFields on Comment { 2 | id 3 | profile { 4 | ...ProfileFields 5 | } 6 | stats { 7 | ...PublicationStatsFields 8 | } 9 | metadata { 10 | ...MetadataOutputFields 11 | } 12 | createdAt 13 | collectModule { 14 | ...CollectModuleFields 15 | } 16 | referenceModule { 17 | ... on FollowOnlyReferenceModuleSettings { 18 | type 19 | } 20 | } 21 | appId 22 | collectedBy { 23 | ...WalletFields 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/postFields.gql: -------------------------------------------------------------------------------- 1 | fragment PostFields on Post { 2 | id 3 | profile { 4 | ...ProfileFields 5 | } 6 | stats { 7 | ...PublicationStatsFields 8 | } 9 | metadata { 10 | ...MetadataOutputFields 11 | } 12 | createdAt 13 | collectModule { 14 | ...CollectModuleFields 15 | } 16 | referenceModule { 17 | ... on FollowOnlyReferenceModuleSettings { 18 | type 19 | } 20 | } 21 | appId 22 | collectedBy { 23 | ...WalletFields 24 | } 25 | __typename 26 | } 27 | -------------------------------------------------------------------------------- /src/routes/__layout-profile.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 10 | 11 | 12 |
13 |
14 | 15 |
16 |
17 | 18 | 19 |
20 |
21 | -------------------------------------------------------------------------------- /codegen.yaml: -------------------------------------------------------------------------------- 1 | schema: 2 | - 'https://api.lens.dev/graphql' 3 | documents: 4 | - '**/*.gql' 5 | generates: 6 | ./src/lib/graphql/_kitql/graphqlTypes.ts: 7 | plugins: 8 | - typescript 9 | - typescript-operations 10 | - typed-document-node 11 | - typescript-document-nodes 12 | config: 13 | dedupeFragments: true 14 | ./src/lib/graphql/_kitql/graphqlStores.ts: 15 | plugins: 16 | - '@kitql/graphql-codegen' 17 | config: 18 | importBaseTypesFrom: $lib/graphql/_kitql/graphqlTypes 19 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parser: '@typescript-eslint/parser', 4 | extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], 5 | plugins: ['svelte3', '@typescript-eslint'], 6 | ignorePatterns: ['*.cjs'], 7 | overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], 8 | settings: { 9 | 'svelte3/typescript': () => require('typescript') 10 | }, 11 | parserOptions: { 12 | sourceType: 'module', 13 | ecmaVersion: 2020 14 | }, 15 | env: { 16 | browser: true, 17 | es2017: true, 18 | node: true 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/routes/__layout.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 |
8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 | 16 |
17 |
18 |
19 | 20 | 21 |
22 |
23 | -------------------------------------------------------------------------------- /src/lib/stores/wallet.ts: -------------------------------------------------------------------------------- 1 | import { initWeb3W } from 'web3w' 2 | import { WalletConnectModuleLoader } from 'web3w-walletconnect-loader' 3 | 4 | const walletStores = initWeb3W({ 5 | chainConfigs: {}, 6 | transactions: { 7 | autoDelete: false, 8 | finality: 12 9 | }, 10 | flow: { 11 | autoUnlock: true 12 | }, 13 | builtin: { 14 | autoProbe: true 15 | }, 16 | options: [ 17 | 'builtin', 18 | new WalletConnectModuleLoader({ 19 | chainId: '137', 20 | nodeUrl: 'https://matic-mainnet.chainstacklabs.com' 21 | }) 22 | ] 23 | }) 24 | 25 | export const { wallet, transactions, builtin, chain, balance, flow, fallback } = walletStores 26 | -------------------------------------------------------------------------------- /src/routes/index.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#if $userProfile} 8 |
9 | 10 |
11 |
12 | 13 |
14 | {:else} 15 |
16 |
17 |
18 | 🤖 19 | Please log in to view your feed. 20 |
21 |
22 |
23 | {/if} 24 | -------------------------------------------------------------------------------- /src/lib/components/Footer.svelte: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __importDefault = (this && this.__importDefault) || function (mod) { 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; 4 | }; 5 | Object.defineProperty(exports, "__esModule", { value: true }); 6 | exports.getPolygonSdk = exports.getContract = void 0; 7 | const ethers_1 = require("ethers"); 8 | const lensHub_json_1 = __importDefault(require("../abis/polygon/lensHub.json")); 9 | function getContract(address, abi, defaultSignerOrProvider) { 10 | return new ethers_1.Contract(address, abi, defaultSignerOrProvider); 11 | } 12 | exports.getContract = getContract; 13 | function getPolygonSdk(defaultSignerOrProvider) { 14 | return { 15 | "lensHub": getContract('0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d', lensHub_json_1.default, defaultSignerOrProvider), 16 | }; 17 | } 18 | exports.getPolygonSdk = getPolygonSdk; 19 | -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto' 2 | import preprocess from 'svelte-preprocess' 3 | import watchAndRun from '@kitql/vite-plugin-watch-and-run' 4 | 5 | /** @type {import('@sveltejs/kit').Config} */ 6 | const config = { 7 | // Consult https://github.com/sveltejs/svelte-preprocess 8 | // for more information about preprocessors 9 | preprocess: [ 10 | preprocess({ 11 | postcss: true 12 | }) 13 | ], 14 | 15 | kit: { 16 | adapter: adapter(), 17 | vite: { 18 | plugins: [ 19 | watchAndRun([ 20 | { 21 | watch: '**/*.(gql|graphql)', 22 | run: 'npm run generate' // to trigger the script "gen" of your package.json 23 | // delay: 500, Optional parameter to delay the run command. 24 | } 25 | ]) 26 | ] 27 | } 28 | } 29 | } 30 | 31 | export default config 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lens Protocol Front End Starter 2 | 3 | This is an example of how to build a front-end application on top of [Lens Protocol](https://docs.lens.xyz/docs). 4 | 5 | You can view all of the APIs [here](https://docs.lens.xyz/docs/introduction) and contract methods [here](https://docs.lens.xyz/docs/functions) 6 | 7 | ## Stack 8 | 9 | - Typescript 10 | - Svelte/Svelte Kit 11 | - Tailwind 12 | - DaisyUI 13 | 14 | ## Developing 15 | 16 | ```bash 17 | pnpm install 18 | ``` 19 | 20 | ```bash 21 | pnpm run dev 22 | 23 | # or start the server and open the app in a new browser tab 24 | pnpm run dev -- --open 25 | ``` 26 | 27 | ## Building 28 | 29 | To create a production version of your app: 30 | 31 | ```bash 32 | pnpm run build 33 | ``` 34 | 35 | You can preview the production build with `pnpm run preview`. 36 | 37 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 38 | -------------------------------------------------------------------------------- /src/lib/components/Navigation.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
9 | 24 | 25 |
26 | 27 |
28 |
29 |
30 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/collectModuleFields.gql: -------------------------------------------------------------------------------- 1 | fragment CollectModuleFields on CollectModule { 2 | __typename 3 | ... on FreeCollectModuleSettings { 4 | type 5 | } 6 | ... on FeeCollectModuleSettings { 7 | type 8 | amount { 9 | asset { 10 | ...Erc20Fields 11 | } 12 | value 13 | } 14 | recipient 15 | referralFee 16 | } 17 | ... on LimitedFeeCollectModuleSettings { 18 | type 19 | collectLimit 20 | amount { 21 | asset { 22 | ...Erc20Fields 23 | } 24 | value 25 | } 26 | recipient 27 | referralFee 28 | } 29 | ... on LimitedTimedFeeCollectModuleSettings { 30 | type 31 | collectLimit 32 | amount { 33 | asset { 34 | ...Erc20Fields 35 | } 36 | value 37 | } 38 | recipient 39 | referralFee 40 | endTimestamp 41 | } 42 | ... on RevertCollectModuleSettings { 43 | type 44 | } 45 | ... on TimedFeeCollectModuleSettings { 46 | type 47 | amount { 48 | asset { 49 | ...Erc20Fields 50 | } 51 | value 52 | } 53 | recipient 54 | referralFee 55 | endTimestamp 56 | } 57 | } -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/common.d.ts: -------------------------------------------------------------------------------- 1 | import type { Listener } from "@ethersproject/providers"; 2 | import type { Event, EventFilter } from "ethers"; 3 | export interface TypedEvent = any, TArgsObject = any> extends Event { 4 | args: TArgsArray & TArgsObject; 5 | } 6 | export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter { 7 | } 8 | export interface TypedListener { 9 | (...listenerArg: [...__TypechainArgsArray, TEvent]): void; 10 | } 11 | declare type __TypechainArgsArray = T extends TypedEvent ? U : never; 12 | export interface OnEvent { 13 | (eventFilter: TypedEventFilter, listener: TypedListener): TRes; 14 | (eventName: string, listener: Listener): TRes; 15 | } 16 | export declare type MinEthersFactory = { 17 | deploy(...a: ARGS[]): Promise; 18 | }; 19 | export declare type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; 20 | export declare type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; 21 | export {}; 22 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/common.d.ts: -------------------------------------------------------------------------------- 1 | import type { Listener } from "@ethersproject/providers"; 2 | import type { Event, EventFilter } from "ethers"; 3 | export interface TypedEvent = any, TArgsObject = any> extends Event { 4 | args: TArgsArray & TArgsObject; 5 | } 6 | export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter { 7 | } 8 | export interface TypedListener { 9 | (...listenerArg: [...__TypechainArgsArray, TEvent]): void; 10 | } 11 | declare type __TypechainArgsArray = T extends TypedEvent ? U : never; 12 | export interface OnEvent { 13 | (eventFilter: TypedEventFilter, listener: TypedListener): TRes; 14 | (eventName: string, listener: Listener): TRes; 15 | } 16 | export declare type MinEthersFactory = { 17 | deploy(...a: ARGS[]): Promise; 18 | }; 19 | export declare type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; 20 | export declare type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; 21 | export {}; 22 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/factories/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 14 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 15 | }) : function(o, v) { 16 | o["default"] = v; 17 | }); 18 | var __importStar = (this && this.__importStar) || function (mod) { 19 | if (mod && mod.__esModule) return mod; 20 | var result = {}; 21 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 22 | __setModuleDefault(result, mod); 23 | return result; 24 | }; 25 | Object.defineProperty(exports, "__esModule", { value: true }); 26 | exports.polygon = void 0; 27 | /* Autogenerated file. Do not edit manually. */ 28 | /* tslint:disable */ 29 | /* eslint-disable */ 30 | exports.polygon = __importStar(require("./polygon")); 31 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 14 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 15 | }) : function(o, v) { 16 | o["default"] = v; 17 | }); 18 | var __importStar = (this && this.__importStar) || function (mod) { 19 | if (mod && mod.__esModule) return mod; 20 | var result = {}; 21 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 22 | __setModuleDefault(result, mod); 23 | return result; 24 | }; 25 | Object.defineProperty(exports, "__esModule", { value: true }); 26 | exports.LensHub__factory = exports.factories = void 0; 27 | exports.factories = __importStar(require("./factories")); 28 | var LensHub__factory_1 = require("./factories/polygon/LensHub__factory"); 29 | Object.defineProperty(exports, "LensHub__factory", { enumerable: true, get: function () { return LensHub__factory_1.LensHub__factory; } }); 30 | -------------------------------------------------------------------------------- /src/lib/graphql/fragments/profileFIelds.gql: -------------------------------------------------------------------------------- 1 | fragment ProfileFields on Profile { 2 | id 3 | name 4 | bio 5 | attributes { 6 | displayType 7 | traitType 8 | key 9 | value 10 | } 11 | metadata 12 | isDefault 13 | handle 14 | picture { 15 | ... on NftImage { 16 | contractAddress 17 | tokenId 18 | uri 19 | verified 20 | } 21 | ... on MediaSet { 22 | original { 23 | ...MediaFields 24 | } 25 | small { 26 | ...MediaFields 27 | } 28 | medium { 29 | ...MediaFields 30 | } 31 | } 32 | __typename 33 | } 34 | coverPicture { 35 | ... on NftImage { 36 | contractAddress 37 | tokenId 38 | uri 39 | verified 40 | } 41 | ... on MediaSet { 42 | original { 43 | ...MediaFields 44 | } 45 | small { 46 | ...MediaFields 47 | } 48 | medium { 49 | ...MediaFields 50 | } 51 | } 52 | __typename 53 | } 54 | ownedBy 55 | dispatcher { 56 | address 57 | } 58 | stats { 59 | totalFollowers 60 | totalFollowing 61 | totalPosts 62 | totalComments 63 | totalMirrors 64 | totalPublications 65 | totalCollects 66 | } 67 | followModule { 68 | ... on FeeFollowModuleSettings { 69 | type 70 | amount { 71 | asset { 72 | name 73 | symbol 74 | decimals 75 | address 76 | } 77 | value 78 | } 79 | recipient 80 | } 81 | ... on ProfileFollowModuleSettings { 82 | type 83 | } 84 | ... on RevertFollowModuleSettings { 85 | type 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { STORAGE_KEY } from './constants' 2 | import { kitQLClient } from './graphql/kitQLClient' 3 | import type { Maybe, ProfileMedia } from '$lib/graphql/_kitql/graphqlTypes' 4 | import { KQL_RefreshToken } from './graphql/_kitql/graphqlStores' 5 | 6 | export function parseJwt(token: string) { 7 | const base64Url = token.split('.')[1] 8 | const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/') 9 | const jsonPayload = decodeURIComponent( 10 | atob(base64) 11 | .split('') 12 | .map(function (c) { 13 | return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) 14 | }) 15 | .join('') 16 | ) 17 | 18 | return JSON.parse(jsonPayload) 19 | } 20 | 21 | export const logout = () => { 22 | localStorage.removeItem(STORAGE_KEY) 23 | } 24 | 25 | export const upgradeGQLClient = () => { 26 | const { accessToken } = JSON.parse(localStorage.getItem(STORAGE_KEY)) 27 | const headers = kitQLClient.getHeaders() 28 | kitQLClient.setHeaders({ 29 | ...headers, 30 | 'x-access-token': `Bearer ${accessToken}` 31 | }) 32 | } 33 | 34 | export const getPictureUrl = (picture: Maybe | undefined) => { 35 | if (!picture) { 36 | return null 37 | } 38 | 39 | if (picture.__typename === 'MediaSet') { 40 | return picture.original.url 41 | } 42 | 43 | if (picture.__typename === 'NftImage') { 44 | return picture.uri 45 | } 46 | } 47 | 48 | export const refreshToken = async () => { 49 | try { 50 | const storage = JSON.parse(localStorage.getItem(STORAGE_KEY)) 51 | const { exp, refreshToken } = storage 52 | if (parseInt((Date.now() / 1000).toString()) > exp) { 53 | const result = await KQL_RefreshToken.mutate({ 54 | variables: { 55 | request: { 56 | refreshToken 57 | } 58 | } 59 | }) 60 | 61 | const parsed = parseJwt(result.data?.refresh.accessToken) 62 | localStorage.setItem( 63 | STORAGE_KEY, 64 | JSON.stringify({ 65 | ...storage, 66 | accessToken: result.data?.refresh.accessToken, 67 | refreshToken: result.data?.refresh.refreshToken, 68 | exp: parsed.exp 69 | }) 70 | ) 71 | } 72 | } catch (e) { 73 | console.error(e) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lens-starter", 3 | "version": "0.0.1", 4 | "scripts": { 5 | "dev": "svelte-kit dev", 6 | "build": "svelte-kit build", 7 | "package": "svelte-kit package", 8 | "preview": "svelte-kit preview", 9 | "prepare": "svelte-kit sync && npm run generate", 10 | "check": "svelte-check --tsconfig ./tsconfig.json", 11 | "check:watch": "svelte-check --tsconfig ./tsconfig.json --watch", 12 | "lint": "prettier --check --plugin-search-dir=. . && eslint .", 13 | "format": "prettier --write --plugin-search-dir=. .", 14 | "generate": "graphql-codegen" 15 | }, 16 | "devDependencies": { 17 | "@graphql-codegen/cli": "^2.6.2", 18 | "@sveltejs/adapter-auto": "next", 19 | "@sveltejs/kit": "next", 20 | "@tailwindcss/typography": "^0.5.2", 21 | "@typescript-eslint/eslint-plugin": "^5.27.0", 22 | "@typescript-eslint/parser": "^5.27.0", 23 | "autoprefixer": "^10.4.7", 24 | "eslint": "^8.17.0", 25 | "eslint-config-prettier": "^8.5.0", 26 | "eslint-plugin-svelte3": "^4.0.0", 27 | "postcss": "^8.4.14", 28 | "postcss-load-config": "^3.1.4", 29 | "prettier": "^2.6.2", 30 | "prettier-plugin-svelte": "^2.7.0", 31 | "svelte": "^3.48.0", 32 | "svelte-check": "^2.7.2", 33 | "svelte-preprocess": "^4.10.7", 34 | "tailwindcss": "^3.0.24", 35 | "ts-node": "^10.8.1", 36 | "tslib": "^2.4.0", 37 | "typescript": "~4.6.4" 38 | }, 39 | "type": "module", 40 | "dependencies": { 41 | "@dethcrypto/eth-sdk": "^0.3.2", 42 | "@ethersproject/abi": "^5.6.3", 43 | "@ethersproject/abstract-provider": "^5.6.1", 44 | "@ethersproject/bignumber": "^5.6.2", 45 | "@ethersproject/bytes": "^5.6.1", 46 | "@ethersproject/contracts": "^5.6.2", 47 | "@ethersproject/providers": "^5.6.8", 48 | "@graphql-typed-document-node/core": "^3.1.1", 49 | "@kitql/client": "^0.5.7", 50 | "@kitql/graphql-codegen": "^0.5.2", 51 | "@kitql/vite-plugin-watch-and-run": "^0.3.4", 52 | "@types/node": "^17.0.39", 53 | "daisyui": "^2.15.2", 54 | "ethers": "^5.6.8", 55 | "graphql": "^16.5.0", 56 | "graphql-tag": "^2.12.6", 57 | "linkify-html": "^3.0.5", 58 | "linkifyjs": "^3.0.5", 59 | "web3w": "^0.3.2-beta.22", 60 | "web3w-walletconnect-loader": "^0.3.2" 61 | } 62 | } -------------------------------------------------------------------------------- /src/lib/components/Feed.svelte: -------------------------------------------------------------------------------- 1 | 27 | 28 |
29 |

📰 What's New?

30 |
31 |
32 | {#if feed} 33 |
34 | {#each feed as pub} 35 |
36 | {#if pub.__typename === 'Comment'} 37 | 38 |
39 | 46 | 52 | 53 |
54 | {/if} 55 | 56 |
57 | {/each} 58 |
59 | {:else} 60 |
61 | {#each [0, 1, 2, 3, 4] as i} 62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 | {/each} 72 |
73 | {/if} 74 |
75 | -------------------------------------------------------------------------------- /src/routes/u/[handle]@profile.svelte: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | 25 | {#if profile} 26 |
30 |
31 |
32 |
33 |
34 |
35 | {profile.handle} 42 |
43 |
44 |
45 |
{profile.name}
46 |
47 |
48 | @{profile.handle} 49 |
50 |
51 |
52 |
53 | 57 | 61 |
62 |
63 |
64 |
65 |
66 | 67 |
68 |
69 |
70 | {/if} 71 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/cjs/types/factories/polygon/LensHub__factory.d.ts: -------------------------------------------------------------------------------- 1 | import { Signer } from "ethers"; 2 | import type { Provider } from "@ethersproject/providers"; 3 | import type { LensHub, LensHubInterface } from "../../polygon/LensHub"; 4 | export declare class LensHub__factory { 5 | static readonly abi: ({ 6 | inputs: { 7 | internalType: string; 8 | name: string; 9 | type: string; 10 | }[]; 11 | stateMutability: string; 12 | type: string; 13 | name?: undefined; 14 | anonymous?: undefined; 15 | outputs?: undefined; 16 | } | { 17 | inputs: any[]; 18 | name: string; 19 | type: string; 20 | stateMutability?: undefined; 21 | anonymous?: undefined; 22 | outputs?: undefined; 23 | } | { 24 | anonymous: boolean; 25 | inputs: { 26 | indexed: boolean; 27 | internalType: string; 28 | name: string; 29 | type: string; 30 | }[]; 31 | name: string; 32 | type: string; 33 | stateMutability?: undefined; 34 | outputs?: undefined; 35 | } | { 36 | inputs: { 37 | internalType: string; 38 | name: string; 39 | type: string; 40 | }[]; 41 | name: string; 42 | outputs: { 43 | internalType: string; 44 | name: string; 45 | type: string; 46 | }[]; 47 | stateMutability: string; 48 | type: string; 49 | anonymous?: undefined; 50 | } | { 51 | inputs: ({ 52 | internalType: string; 53 | name: string; 54 | type: string; 55 | components?: undefined; 56 | } | { 57 | components: { 58 | internalType: string; 59 | name: string; 60 | type: string; 61 | }[]; 62 | internalType: string; 63 | name: string; 64 | type: string; 65 | })[]; 66 | name: string; 67 | outputs: any[]; 68 | stateMutability: string; 69 | type: string; 70 | anonymous?: undefined; 71 | } | { 72 | inputs: { 73 | components: ({ 74 | internalType: string; 75 | name: string; 76 | type: string; 77 | components?: undefined; 78 | } | { 79 | components: { 80 | internalType: string; 81 | name: string; 82 | type: string; 83 | }[]; 84 | internalType: string; 85 | name: string; 86 | type: string; 87 | })[]; 88 | internalType: string; 89 | name: string; 90 | type: string; 91 | }[]; 92 | name: string; 93 | outputs: { 94 | internalType: string; 95 | name: string; 96 | type: string; 97 | }[]; 98 | stateMutability: string; 99 | type: string; 100 | anonymous?: undefined; 101 | } | { 102 | inputs: { 103 | internalType: string; 104 | name: string; 105 | type: string; 106 | }[]; 107 | name: string; 108 | outputs: { 109 | components: { 110 | internalType: string; 111 | name: string; 112 | type: string; 113 | }[]; 114 | internalType: string; 115 | name: string; 116 | type: string; 117 | }[]; 118 | stateMutability: string; 119 | type: string; 120 | anonymous?: undefined; 121 | })[]; 122 | static createInterface(): LensHubInterface; 123 | static connect(address: string, signerOrProvider: Signer | Provider): LensHub; 124 | } 125 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/factories/polygon/LensHub__factory.d.ts: -------------------------------------------------------------------------------- 1 | import { Signer } from "ethers"; 2 | import type { Provider } from "@ethersproject/providers"; 3 | import type { LensHub, LensHubInterface } from "../../polygon/LensHub"; 4 | export declare class LensHub__factory { 5 | static readonly abi: ({ 6 | inputs: { 7 | internalType: string; 8 | name: string; 9 | type: string; 10 | }[]; 11 | stateMutability: string; 12 | type: string; 13 | name?: undefined; 14 | anonymous?: undefined; 15 | outputs?: undefined; 16 | } | { 17 | inputs: any[]; 18 | name: string; 19 | type: string; 20 | stateMutability?: undefined; 21 | anonymous?: undefined; 22 | outputs?: undefined; 23 | } | { 24 | anonymous: boolean; 25 | inputs: { 26 | indexed: boolean; 27 | internalType: string; 28 | name: string; 29 | type: string; 30 | }[]; 31 | name: string; 32 | type: string; 33 | stateMutability?: undefined; 34 | outputs?: undefined; 35 | } | { 36 | inputs: { 37 | internalType: string; 38 | name: string; 39 | type: string; 40 | }[]; 41 | name: string; 42 | outputs: { 43 | internalType: string; 44 | name: string; 45 | type: string; 46 | }[]; 47 | stateMutability: string; 48 | type: string; 49 | anonymous?: undefined; 50 | } | { 51 | inputs: ({ 52 | internalType: string; 53 | name: string; 54 | type: string; 55 | components?: undefined; 56 | } | { 57 | components: { 58 | internalType: string; 59 | name: string; 60 | type: string; 61 | }[]; 62 | internalType: string; 63 | name: string; 64 | type: string; 65 | })[]; 66 | name: string; 67 | outputs: any[]; 68 | stateMutability: string; 69 | type: string; 70 | anonymous?: undefined; 71 | } | { 72 | inputs: { 73 | components: ({ 74 | internalType: string; 75 | name: string; 76 | type: string; 77 | components?: undefined; 78 | } | { 79 | components: { 80 | internalType: string; 81 | name: string; 82 | type: string; 83 | }[]; 84 | internalType: string; 85 | name: string; 86 | type: string; 87 | })[]; 88 | internalType: string; 89 | name: string; 90 | type: string; 91 | }[]; 92 | name: string; 93 | outputs: { 94 | internalType: string; 95 | name: string; 96 | type: string; 97 | }[]; 98 | stateMutability: string; 99 | type: string; 100 | anonymous?: undefined; 101 | } | { 102 | inputs: { 103 | internalType: string; 104 | name: string; 105 | type: string; 106 | }[]; 107 | name: string; 108 | outputs: { 109 | components: { 110 | internalType: string; 111 | name: string; 112 | type: string; 113 | }[]; 114 | internalType: string; 115 | name: string; 116 | type: string; 117 | }[]; 118 | stateMutability: string; 119 | type: string; 120 | anonymous?: undefined; 121 | })[]; 122 | static createInterface(): LensHubInterface; 123 | static connect(address: string, signerOrProvider: Signer | Provider): LensHub; 124 | } 125 | -------------------------------------------------------------------------------- /src/lib/components/Post.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |
12 | 13 | {pub.profile.handle} 17 | 18 |
19 | 20 |
21 |
22 | 28 |
29 |

30 | {@html linkifyHtml(pub.metadata.content, { className: 'text-magic font-semibold' })} 31 |

32 | 33 |
34 | 61 | 85 | 109 |
110 |
111 |
112 | -------------------------------------------------------------------------------- /src/lib/components/RecommendedProfiles.svelte: -------------------------------------------------------------------------------- 1 | 24 | 25 |
26 |

✨ Who to follow

27 |
28 |
29 |
30 | 31 | 32 | {#if profiles} 33 | {#each profiles as profile} 34 | 35 | 68 | 69 | 87 | 88 | {/each} 89 | {/if} 90 | {#if !profiles && !errors} 91 | {#each [0, 1, 2, 3, 4] as i} 92 | 93 | 104 | 107 | 108 | {/each} 109 | {/if} 110 | {#if errors} 111 |
112 |
113 | 119 | 125 | 126 | Failed to fetch recommended profiles. 127 |
128 |
129 | {/if} 130 | 131 |
36 | 67 | 70 | 86 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
105 |
106 |
132 |
133 |
134 | -------------------------------------------------------------------------------- /src/lib/components/SignIn.svelte: -------------------------------------------------------------------------------- 1 | 107 | 108 | {#if $userProfile !== null} 109 | 159 | {:else} 160 | 167 | {/if} 168 | -------------------------------------------------------------------------------- /src/lib/eth-sdk/abis/polygon/lensHub.json: -------------------------------------------------------------------------------- 1 | [{"inputs":[{"internalType":"address","name":"followNFTImpl","type":"address"},{"internalType":"address","name":"collectNFTImpl","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerNotCollectNFT","type":"error"},{"inputs":[],"name":"CallerNotFollowNFT","type":"error"},{"inputs":[],"name":"CannotInitImplementation","type":"error"},{"inputs":[],"name":"EmergencyAdminCannotUnpause","type":"error"},{"inputs":[],"name":"InitParamsInvalid","type":"error"},{"inputs":[],"name":"Initialized","type":"error"},{"inputs":[],"name":"NotGovernance","type":"error"},{"inputs":[],"name":"NotGovernanceOrEmergencyAdmin","type":"error"},{"inputs":[],"name":"NotOwnerOrApproved","type":"error"},{"inputs":[],"name":"NotProfileOwner","type":"error"},{"inputs":[],"name":"NotProfileOwnerOrDispatcher","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"ProfileCreatorNotWhitelisted","type":"error"},{"inputs":[],"name":"ProfileImageURILengthInvalid","type":"error"},{"inputs":[],"name":"PublicationDoesNotExist","type":"error"},{"inputs":[],"name":"PublishingPaused","type":"error"},{"inputs":[],"name":"SignatureExpired","type":"error"},{"inputs":[],"name":"SignatureInvalid","type":"error"},{"inputs":[],"name":"ZeroSpender","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"name":"burnWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"collect","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"collector","type":"address"},{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.CollectWithSigData","name":"vars","type":"tuple"}],"name":"collectWithSig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"}],"internalType":"struct DataTypes.CommentData","name":"vars","type":"tuple"}],"name":"comment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.CommentWithSigData","name":"vars","type":"tuple"}],"name":"commentWithSig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"handle","type":"string"},{"internalType":"string","name":"imageURI","type":"string"},{"internalType":"address","name":"followModule","type":"address"},{"internalType":"bytes","name":"followModuleInitData","type":"bytes"},{"internalType":"string","name":"followNFTURI","type":"string"}],"internalType":"struct DataTypes.CreateProfileData","name":"vars","type":"tuple"}],"name":"createProfile","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"defaultProfile","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"},{"internalType":"uint256","name":"collectNFTId","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"emitCollectNFTTransferEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"followNFTId","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"emitFollowNFTTransferEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"profileIds","type":"uint256[]"},{"internalType":"bytes[]","name":"datas","type":"bytes[]"}],"name":"follow","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"follower","type":"address"},{"internalType":"uint256[]","name":"profileIds","type":"uint256[]"},{"internalType":"bytes[]","name":"datas","type":"bytes[]"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.FollowWithSigData","name":"vars","type":"tuple"}],"name":"followWithSig","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getCollectModule","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getCollectNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollectNFTImpl","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getContentURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getDispatcher","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getFollowModule","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getFollowNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFollowNFTImpl","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getFollowNFTURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getHandle","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getProfile","outputs":[{"components":[{"internalType":"uint256","name":"pubCount","type":"uint256"},{"internalType":"address","name":"followModule","type":"address"},{"internalType":"address","name":"followNFT","type":"address"},{"internalType":"string","name":"handle","type":"string"},{"internalType":"string","name":"imageURI","type":"string"},{"internalType":"string","name":"followNFTURI","type":"string"}],"internalType":"struct DataTypes.ProfileStruct","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"handle","type":"string"}],"name":"getProfileIdByHandle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getPub","outputs":[{"components":[{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"address","name":"collectNFT","type":"address"}],"internalType":"struct DataTypes.PublicationStruct","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"getPubCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getPubPointer","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getPubType","outputs":[{"internalType":"enum DataTypes.PubType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"pubId","type":"uint256"}],"name":"getReferenceModule","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getState","outputs":[{"internalType":"enum DataTypes.ProtocolState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"newGovernance","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collectModule","type":"address"}],"name":"isCollectModuleWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"followModule","type":"address"}],"name":"isFollowModuleWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"profileCreator","type":"address"}],"name":"isProfileCreatorWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referenceModule","type":"address"}],"name":"isReferenceModuleWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintTimestampOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"}],"internalType":"struct DataTypes.MirrorData","name":"vars","type":"tuple"}],"name":"mirror","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"uint256","name":"profileIdPointed","type":"uint256"},{"internalType":"uint256","name":"pubIdPointed","type":"uint256"},{"internalType":"bytes","name":"referenceModuleData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.MirrorWithSigData","name":"vars","type":"tuple"}],"name":"mirrorWithSig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"name":"permitForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"}],"internalType":"struct DataTypes.PostData","name":"vars","type":"tuple"}],"name":"post","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"contentURI","type":"string"},{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bytes","name":"collectModuleInitData","type":"bytes"},{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bytes","name":"referenceModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.PostWithSigData","name":"vars","type":"tuple"}],"name":"postWithSig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"}],"name":"setDefaultProfile","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"profileId","type":"uint256"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.SetDefaultProfileWithSigData","name":"vars","type":"tuple"}],"name":"setDefaultProfileWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"address","name":"dispatcher","type":"address"}],"name":"setDispatcher","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"address","name":"dispatcher","type":"address"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.SetDispatcherWithSigData","name":"vars","type":"tuple"}],"name":"setDispatcherWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newEmergencyAdmin","type":"address"}],"name":"setEmergencyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"address","name":"followModule","type":"address"},{"internalType":"bytes","name":"followModuleInitData","type":"bytes"}],"name":"setFollowModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"address","name":"followModule","type":"address"},{"internalType":"bytes","name":"followModuleInitData","type":"bytes"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.SetFollowModuleWithSigData","name":"vars","type":"tuple"}],"name":"setFollowModuleWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"followNFTURI","type":"string"}],"name":"setFollowNFTURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"followNFTURI","type":"string"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.SetFollowNFTURIWithSigData","name":"vars","type":"tuple"}],"name":"setFollowNFTURIWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newGovernance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"imageURI","type":"string"}],"name":"setProfileImageURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"profileId","type":"uint256"},{"internalType":"string","name":"imageURI","type":"string"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"internalType":"struct DataTypes.EIP712Signature","name":"sig","type":"tuple"}],"internalType":"struct DataTypes.SetProfileImageURIWithSigData","name":"vars","type":"tuple"}],"name":"setProfileImageURIWithSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum DataTypes.ProtocolState","name":"newState","type":"uint8"}],"name":"setState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sigNonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenDataOf","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint96","name":"mintTimestamp","type":"uint96"}],"internalType":"struct IERC721Time.TokenData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collectModule","type":"address"},{"internalType":"bool","name":"whitelist","type":"bool"}],"name":"whitelistCollectModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"followModule","type":"address"},{"internalType":"bool","name":"whitelist","type":"bool"}],"name":"whitelistFollowModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"profileCreator","type":"address"},{"internalType":"bool","name":"whitelist","type":"bool"}],"name":"whitelistProfileCreator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referenceModule","type":"address"},{"internalType":"bool","name":"whitelist","type":"bool"}],"name":"whitelistReferenceModule","outputs":[],"stateMutability":"nonpayable","type":"function"}] -------------------------------------------------------------------------------- /src/lib/eth-sdk/esm/types/factories/polygon/LensHub__factory.js: -------------------------------------------------------------------------------- 1 | /* Autogenerated file. Do not edit manually. */ 2 | /* tslint:disable */ 3 | /* eslint-disable */ 4 | import { Contract, utils } from "ethers"; 5 | const _abi = [ 6 | { 7 | inputs: [ 8 | { 9 | internalType: "address", 10 | name: "followNFTImpl", 11 | type: "address", 12 | }, 13 | { 14 | internalType: "address", 15 | name: "collectNFTImpl", 16 | type: "address", 17 | }, 18 | ], 19 | stateMutability: "nonpayable", 20 | type: "constructor", 21 | }, 22 | { 23 | inputs: [], 24 | name: "CallerNotCollectNFT", 25 | type: "error", 26 | }, 27 | { 28 | inputs: [], 29 | name: "CallerNotFollowNFT", 30 | type: "error", 31 | }, 32 | { 33 | inputs: [], 34 | name: "CannotInitImplementation", 35 | type: "error", 36 | }, 37 | { 38 | inputs: [], 39 | name: "EmergencyAdminCannotUnpause", 40 | type: "error", 41 | }, 42 | { 43 | inputs: [], 44 | name: "InitParamsInvalid", 45 | type: "error", 46 | }, 47 | { 48 | inputs: [], 49 | name: "Initialized", 50 | type: "error", 51 | }, 52 | { 53 | inputs: [], 54 | name: "NotGovernance", 55 | type: "error", 56 | }, 57 | { 58 | inputs: [], 59 | name: "NotGovernanceOrEmergencyAdmin", 60 | type: "error", 61 | }, 62 | { 63 | inputs: [], 64 | name: "NotOwnerOrApproved", 65 | type: "error", 66 | }, 67 | { 68 | inputs: [], 69 | name: "NotProfileOwner", 70 | type: "error", 71 | }, 72 | { 73 | inputs: [], 74 | name: "NotProfileOwnerOrDispatcher", 75 | type: "error", 76 | }, 77 | { 78 | inputs: [], 79 | name: "Paused", 80 | type: "error", 81 | }, 82 | { 83 | inputs: [], 84 | name: "ProfileCreatorNotWhitelisted", 85 | type: "error", 86 | }, 87 | { 88 | inputs: [], 89 | name: "ProfileImageURILengthInvalid", 90 | type: "error", 91 | }, 92 | { 93 | inputs: [], 94 | name: "PublicationDoesNotExist", 95 | type: "error", 96 | }, 97 | { 98 | inputs: [], 99 | name: "PublishingPaused", 100 | type: "error", 101 | }, 102 | { 103 | inputs: [], 104 | name: "SignatureExpired", 105 | type: "error", 106 | }, 107 | { 108 | inputs: [], 109 | name: "SignatureInvalid", 110 | type: "error", 111 | }, 112 | { 113 | inputs: [], 114 | name: "ZeroSpender", 115 | type: "error", 116 | }, 117 | { 118 | anonymous: false, 119 | inputs: [ 120 | { 121 | indexed: true, 122 | internalType: "address", 123 | name: "owner", 124 | type: "address", 125 | }, 126 | { 127 | indexed: true, 128 | internalType: "address", 129 | name: "approved", 130 | type: "address", 131 | }, 132 | { 133 | indexed: true, 134 | internalType: "uint256", 135 | name: "tokenId", 136 | type: "uint256", 137 | }, 138 | ], 139 | name: "Approval", 140 | type: "event", 141 | }, 142 | { 143 | anonymous: false, 144 | inputs: [ 145 | { 146 | indexed: true, 147 | internalType: "address", 148 | name: "owner", 149 | type: "address", 150 | }, 151 | { 152 | indexed: true, 153 | internalType: "address", 154 | name: "operator", 155 | type: "address", 156 | }, 157 | { 158 | indexed: false, 159 | internalType: "bool", 160 | name: "approved", 161 | type: "bool", 162 | }, 163 | ], 164 | name: "ApprovalForAll", 165 | type: "event", 166 | }, 167 | { 168 | anonymous: false, 169 | inputs: [ 170 | { 171 | indexed: true, 172 | internalType: "address", 173 | name: "from", 174 | type: "address", 175 | }, 176 | { 177 | indexed: true, 178 | internalType: "address", 179 | name: "to", 180 | type: "address", 181 | }, 182 | { 183 | indexed: true, 184 | internalType: "uint256", 185 | name: "tokenId", 186 | type: "uint256", 187 | }, 188 | ], 189 | name: "Transfer", 190 | type: "event", 191 | }, 192 | { 193 | inputs: [ 194 | { 195 | internalType: "address", 196 | name: "to", 197 | type: "address", 198 | }, 199 | { 200 | internalType: "uint256", 201 | name: "tokenId", 202 | type: "uint256", 203 | }, 204 | ], 205 | name: "approve", 206 | outputs: [], 207 | stateMutability: "nonpayable", 208 | type: "function", 209 | }, 210 | { 211 | inputs: [ 212 | { 213 | internalType: "address", 214 | name: "owner", 215 | type: "address", 216 | }, 217 | ], 218 | name: "balanceOf", 219 | outputs: [ 220 | { 221 | internalType: "uint256", 222 | name: "", 223 | type: "uint256", 224 | }, 225 | ], 226 | stateMutability: "view", 227 | type: "function", 228 | }, 229 | { 230 | inputs: [ 231 | { 232 | internalType: "uint256", 233 | name: "tokenId", 234 | type: "uint256", 235 | }, 236 | ], 237 | name: "burn", 238 | outputs: [], 239 | stateMutability: "nonpayable", 240 | type: "function", 241 | }, 242 | { 243 | inputs: [ 244 | { 245 | internalType: "uint256", 246 | name: "tokenId", 247 | type: "uint256", 248 | }, 249 | { 250 | components: [ 251 | { 252 | internalType: "uint8", 253 | name: "v", 254 | type: "uint8", 255 | }, 256 | { 257 | internalType: "bytes32", 258 | name: "r", 259 | type: "bytes32", 260 | }, 261 | { 262 | internalType: "bytes32", 263 | name: "s", 264 | type: "bytes32", 265 | }, 266 | { 267 | internalType: "uint256", 268 | name: "deadline", 269 | type: "uint256", 270 | }, 271 | ], 272 | internalType: "struct DataTypes.EIP712Signature", 273 | name: "sig", 274 | type: "tuple", 275 | }, 276 | ], 277 | name: "burnWithSig", 278 | outputs: [], 279 | stateMutability: "nonpayable", 280 | type: "function", 281 | }, 282 | { 283 | inputs: [ 284 | { 285 | internalType: "uint256", 286 | name: "profileId", 287 | type: "uint256", 288 | }, 289 | { 290 | internalType: "uint256", 291 | name: "pubId", 292 | type: "uint256", 293 | }, 294 | { 295 | internalType: "bytes", 296 | name: "data", 297 | type: "bytes", 298 | }, 299 | ], 300 | name: "collect", 301 | outputs: [ 302 | { 303 | internalType: "uint256", 304 | name: "", 305 | type: "uint256", 306 | }, 307 | ], 308 | stateMutability: "nonpayable", 309 | type: "function", 310 | }, 311 | { 312 | inputs: [ 313 | { 314 | components: [ 315 | { 316 | internalType: "address", 317 | name: "collector", 318 | type: "address", 319 | }, 320 | { 321 | internalType: "uint256", 322 | name: "profileId", 323 | type: "uint256", 324 | }, 325 | { 326 | internalType: "uint256", 327 | name: "pubId", 328 | type: "uint256", 329 | }, 330 | { 331 | internalType: "bytes", 332 | name: "data", 333 | type: "bytes", 334 | }, 335 | { 336 | components: [ 337 | { 338 | internalType: "uint8", 339 | name: "v", 340 | type: "uint8", 341 | }, 342 | { 343 | internalType: "bytes32", 344 | name: "r", 345 | type: "bytes32", 346 | }, 347 | { 348 | internalType: "bytes32", 349 | name: "s", 350 | type: "bytes32", 351 | }, 352 | { 353 | internalType: "uint256", 354 | name: "deadline", 355 | type: "uint256", 356 | }, 357 | ], 358 | internalType: "struct DataTypes.EIP712Signature", 359 | name: "sig", 360 | type: "tuple", 361 | }, 362 | ], 363 | internalType: "struct DataTypes.CollectWithSigData", 364 | name: "vars", 365 | type: "tuple", 366 | }, 367 | ], 368 | name: "collectWithSig", 369 | outputs: [ 370 | { 371 | internalType: "uint256", 372 | name: "", 373 | type: "uint256", 374 | }, 375 | ], 376 | stateMutability: "nonpayable", 377 | type: "function", 378 | }, 379 | { 380 | inputs: [ 381 | { 382 | components: [ 383 | { 384 | internalType: "uint256", 385 | name: "profileId", 386 | type: "uint256", 387 | }, 388 | { 389 | internalType: "string", 390 | name: "contentURI", 391 | type: "string", 392 | }, 393 | { 394 | internalType: "uint256", 395 | name: "profileIdPointed", 396 | type: "uint256", 397 | }, 398 | { 399 | internalType: "uint256", 400 | name: "pubIdPointed", 401 | type: "uint256", 402 | }, 403 | { 404 | internalType: "bytes", 405 | name: "referenceModuleData", 406 | type: "bytes", 407 | }, 408 | { 409 | internalType: "address", 410 | name: "collectModule", 411 | type: "address", 412 | }, 413 | { 414 | internalType: "bytes", 415 | name: "collectModuleInitData", 416 | type: "bytes", 417 | }, 418 | { 419 | internalType: "address", 420 | name: "referenceModule", 421 | type: "address", 422 | }, 423 | { 424 | internalType: "bytes", 425 | name: "referenceModuleInitData", 426 | type: "bytes", 427 | }, 428 | ], 429 | internalType: "struct DataTypes.CommentData", 430 | name: "vars", 431 | type: "tuple", 432 | }, 433 | ], 434 | name: "comment", 435 | outputs: [ 436 | { 437 | internalType: "uint256", 438 | name: "", 439 | type: "uint256", 440 | }, 441 | ], 442 | stateMutability: "nonpayable", 443 | type: "function", 444 | }, 445 | { 446 | inputs: [ 447 | { 448 | components: [ 449 | { 450 | internalType: "uint256", 451 | name: "profileId", 452 | type: "uint256", 453 | }, 454 | { 455 | internalType: "string", 456 | name: "contentURI", 457 | type: "string", 458 | }, 459 | { 460 | internalType: "uint256", 461 | name: "profileIdPointed", 462 | type: "uint256", 463 | }, 464 | { 465 | internalType: "uint256", 466 | name: "pubIdPointed", 467 | type: "uint256", 468 | }, 469 | { 470 | internalType: "bytes", 471 | name: "referenceModuleData", 472 | type: "bytes", 473 | }, 474 | { 475 | internalType: "address", 476 | name: "collectModule", 477 | type: "address", 478 | }, 479 | { 480 | internalType: "bytes", 481 | name: "collectModuleInitData", 482 | type: "bytes", 483 | }, 484 | { 485 | internalType: "address", 486 | name: "referenceModule", 487 | type: "address", 488 | }, 489 | { 490 | internalType: "bytes", 491 | name: "referenceModuleInitData", 492 | type: "bytes", 493 | }, 494 | { 495 | components: [ 496 | { 497 | internalType: "uint8", 498 | name: "v", 499 | type: "uint8", 500 | }, 501 | { 502 | internalType: "bytes32", 503 | name: "r", 504 | type: "bytes32", 505 | }, 506 | { 507 | internalType: "bytes32", 508 | name: "s", 509 | type: "bytes32", 510 | }, 511 | { 512 | internalType: "uint256", 513 | name: "deadline", 514 | type: "uint256", 515 | }, 516 | ], 517 | internalType: "struct DataTypes.EIP712Signature", 518 | name: "sig", 519 | type: "tuple", 520 | }, 521 | ], 522 | internalType: "struct DataTypes.CommentWithSigData", 523 | name: "vars", 524 | type: "tuple", 525 | }, 526 | ], 527 | name: "commentWithSig", 528 | outputs: [ 529 | { 530 | internalType: "uint256", 531 | name: "", 532 | type: "uint256", 533 | }, 534 | ], 535 | stateMutability: "nonpayable", 536 | type: "function", 537 | }, 538 | { 539 | inputs: [ 540 | { 541 | components: [ 542 | { 543 | internalType: "address", 544 | name: "to", 545 | type: "address", 546 | }, 547 | { 548 | internalType: "string", 549 | name: "handle", 550 | type: "string", 551 | }, 552 | { 553 | internalType: "string", 554 | name: "imageURI", 555 | type: "string", 556 | }, 557 | { 558 | internalType: "address", 559 | name: "followModule", 560 | type: "address", 561 | }, 562 | { 563 | internalType: "bytes", 564 | name: "followModuleInitData", 565 | type: "bytes", 566 | }, 567 | { 568 | internalType: "string", 569 | name: "followNFTURI", 570 | type: "string", 571 | }, 572 | ], 573 | internalType: "struct DataTypes.CreateProfileData", 574 | name: "vars", 575 | type: "tuple", 576 | }, 577 | ], 578 | name: "createProfile", 579 | outputs: [ 580 | { 581 | internalType: "uint256", 582 | name: "", 583 | type: "uint256", 584 | }, 585 | ], 586 | stateMutability: "nonpayable", 587 | type: "function", 588 | }, 589 | { 590 | inputs: [ 591 | { 592 | internalType: "address", 593 | name: "wallet", 594 | type: "address", 595 | }, 596 | ], 597 | name: "defaultProfile", 598 | outputs: [ 599 | { 600 | internalType: "uint256", 601 | name: "", 602 | type: "uint256", 603 | }, 604 | ], 605 | stateMutability: "view", 606 | type: "function", 607 | }, 608 | { 609 | inputs: [ 610 | { 611 | internalType: "uint256", 612 | name: "profileId", 613 | type: "uint256", 614 | }, 615 | { 616 | internalType: "uint256", 617 | name: "pubId", 618 | type: "uint256", 619 | }, 620 | { 621 | internalType: "uint256", 622 | name: "collectNFTId", 623 | type: "uint256", 624 | }, 625 | { 626 | internalType: "address", 627 | name: "from", 628 | type: "address", 629 | }, 630 | { 631 | internalType: "address", 632 | name: "to", 633 | type: "address", 634 | }, 635 | ], 636 | name: "emitCollectNFTTransferEvent", 637 | outputs: [], 638 | stateMutability: "nonpayable", 639 | type: "function", 640 | }, 641 | { 642 | inputs: [ 643 | { 644 | internalType: "uint256", 645 | name: "profileId", 646 | type: "uint256", 647 | }, 648 | { 649 | internalType: "uint256", 650 | name: "followNFTId", 651 | type: "uint256", 652 | }, 653 | { 654 | internalType: "address", 655 | name: "from", 656 | type: "address", 657 | }, 658 | { 659 | internalType: "address", 660 | name: "to", 661 | type: "address", 662 | }, 663 | ], 664 | name: "emitFollowNFTTransferEvent", 665 | outputs: [], 666 | stateMutability: "nonpayable", 667 | type: "function", 668 | }, 669 | { 670 | inputs: [ 671 | { 672 | internalType: "uint256", 673 | name: "tokenId", 674 | type: "uint256", 675 | }, 676 | ], 677 | name: "exists", 678 | outputs: [ 679 | { 680 | internalType: "bool", 681 | name: "", 682 | type: "bool", 683 | }, 684 | ], 685 | stateMutability: "view", 686 | type: "function", 687 | }, 688 | { 689 | inputs: [ 690 | { 691 | internalType: "uint256[]", 692 | name: "profileIds", 693 | type: "uint256[]", 694 | }, 695 | { 696 | internalType: "bytes[]", 697 | name: "datas", 698 | type: "bytes[]", 699 | }, 700 | ], 701 | name: "follow", 702 | outputs: [ 703 | { 704 | internalType: "uint256[]", 705 | name: "", 706 | type: "uint256[]", 707 | }, 708 | ], 709 | stateMutability: "nonpayable", 710 | type: "function", 711 | }, 712 | { 713 | inputs: [ 714 | { 715 | components: [ 716 | { 717 | internalType: "address", 718 | name: "follower", 719 | type: "address", 720 | }, 721 | { 722 | internalType: "uint256[]", 723 | name: "profileIds", 724 | type: "uint256[]", 725 | }, 726 | { 727 | internalType: "bytes[]", 728 | name: "datas", 729 | type: "bytes[]", 730 | }, 731 | { 732 | components: [ 733 | { 734 | internalType: "uint8", 735 | name: "v", 736 | type: "uint8", 737 | }, 738 | { 739 | internalType: "bytes32", 740 | name: "r", 741 | type: "bytes32", 742 | }, 743 | { 744 | internalType: "bytes32", 745 | name: "s", 746 | type: "bytes32", 747 | }, 748 | { 749 | internalType: "uint256", 750 | name: "deadline", 751 | type: "uint256", 752 | }, 753 | ], 754 | internalType: "struct DataTypes.EIP712Signature", 755 | name: "sig", 756 | type: "tuple", 757 | }, 758 | ], 759 | internalType: "struct DataTypes.FollowWithSigData", 760 | name: "vars", 761 | type: "tuple", 762 | }, 763 | ], 764 | name: "followWithSig", 765 | outputs: [ 766 | { 767 | internalType: "uint256[]", 768 | name: "", 769 | type: "uint256[]", 770 | }, 771 | ], 772 | stateMutability: "nonpayable", 773 | type: "function", 774 | }, 775 | { 776 | inputs: [ 777 | { 778 | internalType: "uint256", 779 | name: "tokenId", 780 | type: "uint256", 781 | }, 782 | ], 783 | name: "getApproved", 784 | outputs: [ 785 | { 786 | internalType: "address", 787 | name: "", 788 | type: "address", 789 | }, 790 | ], 791 | stateMutability: "view", 792 | type: "function", 793 | }, 794 | { 795 | inputs: [ 796 | { 797 | internalType: "uint256", 798 | name: "profileId", 799 | type: "uint256", 800 | }, 801 | { 802 | internalType: "uint256", 803 | name: "pubId", 804 | type: "uint256", 805 | }, 806 | ], 807 | name: "getCollectModule", 808 | outputs: [ 809 | { 810 | internalType: "address", 811 | name: "", 812 | type: "address", 813 | }, 814 | ], 815 | stateMutability: "view", 816 | type: "function", 817 | }, 818 | { 819 | inputs: [ 820 | { 821 | internalType: "uint256", 822 | name: "profileId", 823 | type: "uint256", 824 | }, 825 | { 826 | internalType: "uint256", 827 | name: "pubId", 828 | type: "uint256", 829 | }, 830 | ], 831 | name: "getCollectNFT", 832 | outputs: [ 833 | { 834 | internalType: "address", 835 | name: "", 836 | type: "address", 837 | }, 838 | ], 839 | stateMutability: "view", 840 | type: "function", 841 | }, 842 | { 843 | inputs: [], 844 | name: "getCollectNFTImpl", 845 | outputs: [ 846 | { 847 | internalType: "address", 848 | name: "", 849 | type: "address", 850 | }, 851 | ], 852 | stateMutability: "view", 853 | type: "function", 854 | }, 855 | { 856 | inputs: [ 857 | { 858 | internalType: "uint256", 859 | name: "profileId", 860 | type: "uint256", 861 | }, 862 | { 863 | internalType: "uint256", 864 | name: "pubId", 865 | type: "uint256", 866 | }, 867 | ], 868 | name: "getContentURI", 869 | outputs: [ 870 | { 871 | internalType: "string", 872 | name: "", 873 | type: "string", 874 | }, 875 | ], 876 | stateMutability: "view", 877 | type: "function", 878 | }, 879 | { 880 | inputs: [ 881 | { 882 | internalType: "uint256", 883 | name: "profileId", 884 | type: "uint256", 885 | }, 886 | ], 887 | name: "getDispatcher", 888 | outputs: [ 889 | { 890 | internalType: "address", 891 | name: "", 892 | type: "address", 893 | }, 894 | ], 895 | stateMutability: "view", 896 | type: "function", 897 | }, 898 | { 899 | inputs: [], 900 | name: "getDomainSeparator", 901 | outputs: [ 902 | { 903 | internalType: "bytes32", 904 | name: "", 905 | type: "bytes32", 906 | }, 907 | ], 908 | stateMutability: "view", 909 | type: "function", 910 | }, 911 | { 912 | inputs: [ 913 | { 914 | internalType: "uint256", 915 | name: "profileId", 916 | type: "uint256", 917 | }, 918 | ], 919 | name: "getFollowModule", 920 | outputs: [ 921 | { 922 | internalType: "address", 923 | name: "", 924 | type: "address", 925 | }, 926 | ], 927 | stateMutability: "view", 928 | type: "function", 929 | }, 930 | { 931 | inputs: [ 932 | { 933 | internalType: "uint256", 934 | name: "profileId", 935 | type: "uint256", 936 | }, 937 | ], 938 | name: "getFollowNFT", 939 | outputs: [ 940 | { 941 | internalType: "address", 942 | name: "", 943 | type: "address", 944 | }, 945 | ], 946 | stateMutability: "view", 947 | type: "function", 948 | }, 949 | { 950 | inputs: [], 951 | name: "getFollowNFTImpl", 952 | outputs: [ 953 | { 954 | internalType: "address", 955 | name: "", 956 | type: "address", 957 | }, 958 | ], 959 | stateMutability: "view", 960 | type: "function", 961 | }, 962 | { 963 | inputs: [ 964 | { 965 | internalType: "uint256", 966 | name: "profileId", 967 | type: "uint256", 968 | }, 969 | ], 970 | name: "getFollowNFTURI", 971 | outputs: [ 972 | { 973 | internalType: "string", 974 | name: "", 975 | type: "string", 976 | }, 977 | ], 978 | stateMutability: "view", 979 | type: "function", 980 | }, 981 | { 982 | inputs: [], 983 | name: "getGovernance", 984 | outputs: [ 985 | { 986 | internalType: "address", 987 | name: "", 988 | type: "address", 989 | }, 990 | ], 991 | stateMutability: "view", 992 | type: "function", 993 | }, 994 | { 995 | inputs: [ 996 | { 997 | internalType: "uint256", 998 | name: "profileId", 999 | type: "uint256", 1000 | }, 1001 | ], 1002 | name: "getHandle", 1003 | outputs: [ 1004 | { 1005 | internalType: "string", 1006 | name: "", 1007 | type: "string", 1008 | }, 1009 | ], 1010 | stateMutability: "view", 1011 | type: "function", 1012 | }, 1013 | { 1014 | inputs: [ 1015 | { 1016 | internalType: "uint256", 1017 | name: "profileId", 1018 | type: "uint256", 1019 | }, 1020 | ], 1021 | name: "getProfile", 1022 | outputs: [ 1023 | { 1024 | components: [ 1025 | { 1026 | internalType: "uint256", 1027 | name: "pubCount", 1028 | type: "uint256", 1029 | }, 1030 | { 1031 | internalType: "address", 1032 | name: "followModule", 1033 | type: "address", 1034 | }, 1035 | { 1036 | internalType: "address", 1037 | name: "followNFT", 1038 | type: "address", 1039 | }, 1040 | { 1041 | internalType: "string", 1042 | name: "handle", 1043 | type: "string", 1044 | }, 1045 | { 1046 | internalType: "string", 1047 | name: "imageURI", 1048 | type: "string", 1049 | }, 1050 | { 1051 | internalType: "string", 1052 | name: "followNFTURI", 1053 | type: "string", 1054 | }, 1055 | ], 1056 | internalType: "struct DataTypes.ProfileStruct", 1057 | name: "", 1058 | type: "tuple", 1059 | }, 1060 | ], 1061 | stateMutability: "view", 1062 | type: "function", 1063 | }, 1064 | { 1065 | inputs: [ 1066 | { 1067 | internalType: "string", 1068 | name: "handle", 1069 | type: "string", 1070 | }, 1071 | ], 1072 | name: "getProfileIdByHandle", 1073 | outputs: [ 1074 | { 1075 | internalType: "uint256", 1076 | name: "", 1077 | type: "uint256", 1078 | }, 1079 | ], 1080 | stateMutability: "view", 1081 | type: "function", 1082 | }, 1083 | { 1084 | inputs: [ 1085 | { 1086 | internalType: "uint256", 1087 | name: "profileId", 1088 | type: "uint256", 1089 | }, 1090 | { 1091 | internalType: "uint256", 1092 | name: "pubId", 1093 | type: "uint256", 1094 | }, 1095 | ], 1096 | name: "getPub", 1097 | outputs: [ 1098 | { 1099 | components: [ 1100 | { 1101 | internalType: "uint256", 1102 | name: "profileIdPointed", 1103 | type: "uint256", 1104 | }, 1105 | { 1106 | internalType: "uint256", 1107 | name: "pubIdPointed", 1108 | type: "uint256", 1109 | }, 1110 | { 1111 | internalType: "string", 1112 | name: "contentURI", 1113 | type: "string", 1114 | }, 1115 | { 1116 | internalType: "address", 1117 | name: "referenceModule", 1118 | type: "address", 1119 | }, 1120 | { 1121 | internalType: "address", 1122 | name: "collectModule", 1123 | type: "address", 1124 | }, 1125 | { 1126 | internalType: "address", 1127 | name: "collectNFT", 1128 | type: "address", 1129 | }, 1130 | ], 1131 | internalType: "struct DataTypes.PublicationStruct", 1132 | name: "", 1133 | type: "tuple", 1134 | }, 1135 | ], 1136 | stateMutability: "view", 1137 | type: "function", 1138 | }, 1139 | { 1140 | inputs: [ 1141 | { 1142 | internalType: "uint256", 1143 | name: "profileId", 1144 | type: "uint256", 1145 | }, 1146 | ], 1147 | name: "getPubCount", 1148 | outputs: [ 1149 | { 1150 | internalType: "uint256", 1151 | name: "", 1152 | type: "uint256", 1153 | }, 1154 | ], 1155 | stateMutability: "view", 1156 | type: "function", 1157 | }, 1158 | { 1159 | inputs: [ 1160 | { 1161 | internalType: "uint256", 1162 | name: "profileId", 1163 | type: "uint256", 1164 | }, 1165 | { 1166 | internalType: "uint256", 1167 | name: "pubId", 1168 | type: "uint256", 1169 | }, 1170 | ], 1171 | name: "getPubPointer", 1172 | outputs: [ 1173 | { 1174 | internalType: "uint256", 1175 | name: "", 1176 | type: "uint256", 1177 | }, 1178 | { 1179 | internalType: "uint256", 1180 | name: "", 1181 | type: "uint256", 1182 | }, 1183 | ], 1184 | stateMutability: "view", 1185 | type: "function", 1186 | }, 1187 | { 1188 | inputs: [ 1189 | { 1190 | internalType: "uint256", 1191 | name: "profileId", 1192 | type: "uint256", 1193 | }, 1194 | { 1195 | internalType: "uint256", 1196 | name: "pubId", 1197 | type: "uint256", 1198 | }, 1199 | ], 1200 | name: "getPubType", 1201 | outputs: [ 1202 | { 1203 | internalType: "enum DataTypes.PubType", 1204 | name: "", 1205 | type: "uint8", 1206 | }, 1207 | ], 1208 | stateMutability: "view", 1209 | type: "function", 1210 | }, 1211 | { 1212 | inputs: [ 1213 | { 1214 | internalType: "uint256", 1215 | name: "profileId", 1216 | type: "uint256", 1217 | }, 1218 | { 1219 | internalType: "uint256", 1220 | name: "pubId", 1221 | type: "uint256", 1222 | }, 1223 | ], 1224 | name: "getReferenceModule", 1225 | outputs: [ 1226 | { 1227 | internalType: "address", 1228 | name: "", 1229 | type: "address", 1230 | }, 1231 | ], 1232 | stateMutability: "view", 1233 | type: "function", 1234 | }, 1235 | { 1236 | inputs: [], 1237 | name: "getState", 1238 | outputs: [ 1239 | { 1240 | internalType: "enum DataTypes.ProtocolState", 1241 | name: "", 1242 | type: "uint8", 1243 | }, 1244 | ], 1245 | stateMutability: "view", 1246 | type: "function", 1247 | }, 1248 | { 1249 | inputs: [ 1250 | { 1251 | internalType: "string", 1252 | name: "name", 1253 | type: "string", 1254 | }, 1255 | { 1256 | internalType: "string", 1257 | name: "symbol", 1258 | type: "string", 1259 | }, 1260 | { 1261 | internalType: "address", 1262 | name: "newGovernance", 1263 | type: "address", 1264 | }, 1265 | ], 1266 | name: "initialize", 1267 | outputs: [], 1268 | stateMutability: "nonpayable", 1269 | type: "function", 1270 | }, 1271 | { 1272 | inputs: [ 1273 | { 1274 | internalType: "address", 1275 | name: "owner", 1276 | type: "address", 1277 | }, 1278 | { 1279 | internalType: "address", 1280 | name: "operator", 1281 | type: "address", 1282 | }, 1283 | ], 1284 | name: "isApprovedForAll", 1285 | outputs: [ 1286 | { 1287 | internalType: "bool", 1288 | name: "", 1289 | type: "bool", 1290 | }, 1291 | ], 1292 | stateMutability: "view", 1293 | type: "function", 1294 | }, 1295 | { 1296 | inputs: [ 1297 | { 1298 | internalType: "address", 1299 | name: "collectModule", 1300 | type: "address", 1301 | }, 1302 | ], 1303 | name: "isCollectModuleWhitelisted", 1304 | outputs: [ 1305 | { 1306 | internalType: "bool", 1307 | name: "", 1308 | type: "bool", 1309 | }, 1310 | ], 1311 | stateMutability: "view", 1312 | type: "function", 1313 | }, 1314 | { 1315 | inputs: [ 1316 | { 1317 | internalType: "address", 1318 | name: "followModule", 1319 | type: "address", 1320 | }, 1321 | ], 1322 | name: "isFollowModuleWhitelisted", 1323 | outputs: [ 1324 | { 1325 | internalType: "bool", 1326 | name: "", 1327 | type: "bool", 1328 | }, 1329 | ], 1330 | stateMutability: "view", 1331 | type: "function", 1332 | }, 1333 | { 1334 | inputs: [ 1335 | { 1336 | internalType: "address", 1337 | name: "profileCreator", 1338 | type: "address", 1339 | }, 1340 | ], 1341 | name: "isProfileCreatorWhitelisted", 1342 | outputs: [ 1343 | { 1344 | internalType: "bool", 1345 | name: "", 1346 | type: "bool", 1347 | }, 1348 | ], 1349 | stateMutability: "view", 1350 | type: "function", 1351 | }, 1352 | { 1353 | inputs: [ 1354 | { 1355 | internalType: "address", 1356 | name: "referenceModule", 1357 | type: "address", 1358 | }, 1359 | ], 1360 | name: "isReferenceModuleWhitelisted", 1361 | outputs: [ 1362 | { 1363 | internalType: "bool", 1364 | name: "", 1365 | type: "bool", 1366 | }, 1367 | ], 1368 | stateMutability: "view", 1369 | type: "function", 1370 | }, 1371 | { 1372 | inputs: [ 1373 | { 1374 | internalType: "uint256", 1375 | name: "tokenId", 1376 | type: "uint256", 1377 | }, 1378 | ], 1379 | name: "mintTimestampOf", 1380 | outputs: [ 1381 | { 1382 | internalType: "uint256", 1383 | name: "", 1384 | type: "uint256", 1385 | }, 1386 | ], 1387 | stateMutability: "view", 1388 | type: "function", 1389 | }, 1390 | { 1391 | inputs: [ 1392 | { 1393 | components: [ 1394 | { 1395 | internalType: "uint256", 1396 | name: "profileId", 1397 | type: "uint256", 1398 | }, 1399 | { 1400 | internalType: "uint256", 1401 | name: "profileIdPointed", 1402 | type: "uint256", 1403 | }, 1404 | { 1405 | internalType: "uint256", 1406 | name: "pubIdPointed", 1407 | type: "uint256", 1408 | }, 1409 | { 1410 | internalType: "bytes", 1411 | name: "referenceModuleData", 1412 | type: "bytes", 1413 | }, 1414 | { 1415 | internalType: "address", 1416 | name: "referenceModule", 1417 | type: "address", 1418 | }, 1419 | { 1420 | internalType: "bytes", 1421 | name: "referenceModuleInitData", 1422 | type: "bytes", 1423 | }, 1424 | ], 1425 | internalType: "struct DataTypes.MirrorData", 1426 | name: "vars", 1427 | type: "tuple", 1428 | }, 1429 | ], 1430 | name: "mirror", 1431 | outputs: [ 1432 | { 1433 | internalType: "uint256", 1434 | name: "", 1435 | type: "uint256", 1436 | }, 1437 | ], 1438 | stateMutability: "nonpayable", 1439 | type: "function", 1440 | }, 1441 | { 1442 | inputs: [ 1443 | { 1444 | components: [ 1445 | { 1446 | internalType: "uint256", 1447 | name: "profileId", 1448 | type: "uint256", 1449 | }, 1450 | { 1451 | internalType: "uint256", 1452 | name: "profileIdPointed", 1453 | type: "uint256", 1454 | }, 1455 | { 1456 | internalType: "uint256", 1457 | name: "pubIdPointed", 1458 | type: "uint256", 1459 | }, 1460 | { 1461 | internalType: "bytes", 1462 | name: "referenceModuleData", 1463 | type: "bytes", 1464 | }, 1465 | { 1466 | internalType: "address", 1467 | name: "referenceModule", 1468 | type: "address", 1469 | }, 1470 | { 1471 | internalType: "bytes", 1472 | name: "referenceModuleInitData", 1473 | type: "bytes", 1474 | }, 1475 | { 1476 | components: [ 1477 | { 1478 | internalType: "uint8", 1479 | name: "v", 1480 | type: "uint8", 1481 | }, 1482 | { 1483 | internalType: "bytes32", 1484 | name: "r", 1485 | type: "bytes32", 1486 | }, 1487 | { 1488 | internalType: "bytes32", 1489 | name: "s", 1490 | type: "bytes32", 1491 | }, 1492 | { 1493 | internalType: "uint256", 1494 | name: "deadline", 1495 | type: "uint256", 1496 | }, 1497 | ], 1498 | internalType: "struct DataTypes.EIP712Signature", 1499 | name: "sig", 1500 | type: "tuple", 1501 | }, 1502 | ], 1503 | internalType: "struct DataTypes.MirrorWithSigData", 1504 | name: "vars", 1505 | type: "tuple", 1506 | }, 1507 | ], 1508 | name: "mirrorWithSig", 1509 | outputs: [ 1510 | { 1511 | internalType: "uint256", 1512 | name: "", 1513 | type: "uint256", 1514 | }, 1515 | ], 1516 | stateMutability: "nonpayable", 1517 | type: "function", 1518 | }, 1519 | { 1520 | inputs: [], 1521 | name: "name", 1522 | outputs: [ 1523 | { 1524 | internalType: "string", 1525 | name: "", 1526 | type: "string", 1527 | }, 1528 | ], 1529 | stateMutability: "view", 1530 | type: "function", 1531 | }, 1532 | { 1533 | inputs: [ 1534 | { 1535 | internalType: "uint256", 1536 | name: "tokenId", 1537 | type: "uint256", 1538 | }, 1539 | ], 1540 | name: "ownerOf", 1541 | outputs: [ 1542 | { 1543 | internalType: "address", 1544 | name: "", 1545 | type: "address", 1546 | }, 1547 | ], 1548 | stateMutability: "view", 1549 | type: "function", 1550 | }, 1551 | { 1552 | inputs: [ 1553 | { 1554 | internalType: "address", 1555 | name: "spender", 1556 | type: "address", 1557 | }, 1558 | { 1559 | internalType: "uint256", 1560 | name: "tokenId", 1561 | type: "uint256", 1562 | }, 1563 | { 1564 | components: [ 1565 | { 1566 | internalType: "uint8", 1567 | name: "v", 1568 | type: "uint8", 1569 | }, 1570 | { 1571 | internalType: "bytes32", 1572 | name: "r", 1573 | type: "bytes32", 1574 | }, 1575 | { 1576 | internalType: "bytes32", 1577 | name: "s", 1578 | type: "bytes32", 1579 | }, 1580 | { 1581 | internalType: "uint256", 1582 | name: "deadline", 1583 | type: "uint256", 1584 | }, 1585 | ], 1586 | internalType: "struct DataTypes.EIP712Signature", 1587 | name: "sig", 1588 | type: "tuple", 1589 | }, 1590 | ], 1591 | name: "permit", 1592 | outputs: [], 1593 | stateMutability: "nonpayable", 1594 | type: "function", 1595 | }, 1596 | { 1597 | inputs: [ 1598 | { 1599 | internalType: "address", 1600 | name: "owner", 1601 | type: "address", 1602 | }, 1603 | { 1604 | internalType: "address", 1605 | name: "operator", 1606 | type: "address", 1607 | }, 1608 | { 1609 | internalType: "bool", 1610 | name: "approved", 1611 | type: "bool", 1612 | }, 1613 | { 1614 | components: [ 1615 | { 1616 | internalType: "uint8", 1617 | name: "v", 1618 | type: "uint8", 1619 | }, 1620 | { 1621 | internalType: "bytes32", 1622 | name: "r", 1623 | type: "bytes32", 1624 | }, 1625 | { 1626 | internalType: "bytes32", 1627 | name: "s", 1628 | type: "bytes32", 1629 | }, 1630 | { 1631 | internalType: "uint256", 1632 | name: "deadline", 1633 | type: "uint256", 1634 | }, 1635 | ], 1636 | internalType: "struct DataTypes.EIP712Signature", 1637 | name: "sig", 1638 | type: "tuple", 1639 | }, 1640 | ], 1641 | name: "permitForAll", 1642 | outputs: [], 1643 | stateMutability: "nonpayable", 1644 | type: "function", 1645 | }, 1646 | { 1647 | inputs: [ 1648 | { 1649 | components: [ 1650 | { 1651 | internalType: "uint256", 1652 | name: "profileId", 1653 | type: "uint256", 1654 | }, 1655 | { 1656 | internalType: "string", 1657 | name: "contentURI", 1658 | type: "string", 1659 | }, 1660 | { 1661 | internalType: "address", 1662 | name: "collectModule", 1663 | type: "address", 1664 | }, 1665 | { 1666 | internalType: "bytes", 1667 | name: "collectModuleInitData", 1668 | type: "bytes", 1669 | }, 1670 | { 1671 | internalType: "address", 1672 | name: "referenceModule", 1673 | type: "address", 1674 | }, 1675 | { 1676 | internalType: "bytes", 1677 | name: "referenceModuleInitData", 1678 | type: "bytes", 1679 | }, 1680 | ], 1681 | internalType: "struct DataTypes.PostData", 1682 | name: "vars", 1683 | type: "tuple", 1684 | }, 1685 | ], 1686 | name: "post", 1687 | outputs: [ 1688 | { 1689 | internalType: "uint256", 1690 | name: "", 1691 | type: "uint256", 1692 | }, 1693 | ], 1694 | stateMutability: "nonpayable", 1695 | type: "function", 1696 | }, 1697 | { 1698 | inputs: [ 1699 | { 1700 | components: [ 1701 | { 1702 | internalType: "uint256", 1703 | name: "profileId", 1704 | type: "uint256", 1705 | }, 1706 | { 1707 | internalType: "string", 1708 | name: "contentURI", 1709 | type: "string", 1710 | }, 1711 | { 1712 | internalType: "address", 1713 | name: "collectModule", 1714 | type: "address", 1715 | }, 1716 | { 1717 | internalType: "bytes", 1718 | name: "collectModuleInitData", 1719 | type: "bytes", 1720 | }, 1721 | { 1722 | internalType: "address", 1723 | name: "referenceModule", 1724 | type: "address", 1725 | }, 1726 | { 1727 | internalType: "bytes", 1728 | name: "referenceModuleInitData", 1729 | type: "bytes", 1730 | }, 1731 | { 1732 | components: [ 1733 | { 1734 | internalType: "uint8", 1735 | name: "v", 1736 | type: "uint8", 1737 | }, 1738 | { 1739 | internalType: "bytes32", 1740 | name: "r", 1741 | type: "bytes32", 1742 | }, 1743 | { 1744 | internalType: "bytes32", 1745 | name: "s", 1746 | type: "bytes32", 1747 | }, 1748 | { 1749 | internalType: "uint256", 1750 | name: "deadline", 1751 | type: "uint256", 1752 | }, 1753 | ], 1754 | internalType: "struct DataTypes.EIP712Signature", 1755 | name: "sig", 1756 | type: "tuple", 1757 | }, 1758 | ], 1759 | internalType: "struct DataTypes.PostWithSigData", 1760 | name: "vars", 1761 | type: "tuple", 1762 | }, 1763 | ], 1764 | name: "postWithSig", 1765 | outputs: [ 1766 | { 1767 | internalType: "uint256", 1768 | name: "", 1769 | type: "uint256", 1770 | }, 1771 | ], 1772 | stateMutability: "nonpayable", 1773 | type: "function", 1774 | }, 1775 | { 1776 | inputs: [ 1777 | { 1778 | internalType: "address", 1779 | name: "from", 1780 | type: "address", 1781 | }, 1782 | { 1783 | internalType: "address", 1784 | name: "to", 1785 | type: "address", 1786 | }, 1787 | { 1788 | internalType: "uint256", 1789 | name: "tokenId", 1790 | type: "uint256", 1791 | }, 1792 | ], 1793 | name: "safeTransferFrom", 1794 | outputs: [], 1795 | stateMutability: "nonpayable", 1796 | type: "function", 1797 | }, 1798 | { 1799 | inputs: [ 1800 | { 1801 | internalType: "address", 1802 | name: "from", 1803 | type: "address", 1804 | }, 1805 | { 1806 | internalType: "address", 1807 | name: "to", 1808 | type: "address", 1809 | }, 1810 | { 1811 | internalType: "uint256", 1812 | name: "tokenId", 1813 | type: "uint256", 1814 | }, 1815 | { 1816 | internalType: "bytes", 1817 | name: "_data", 1818 | type: "bytes", 1819 | }, 1820 | ], 1821 | name: "safeTransferFrom", 1822 | outputs: [], 1823 | stateMutability: "nonpayable", 1824 | type: "function", 1825 | }, 1826 | { 1827 | inputs: [ 1828 | { 1829 | internalType: "address", 1830 | name: "operator", 1831 | type: "address", 1832 | }, 1833 | { 1834 | internalType: "bool", 1835 | name: "approved", 1836 | type: "bool", 1837 | }, 1838 | ], 1839 | name: "setApprovalForAll", 1840 | outputs: [], 1841 | stateMutability: "nonpayable", 1842 | type: "function", 1843 | }, 1844 | { 1845 | inputs: [ 1846 | { 1847 | internalType: "uint256", 1848 | name: "profileId", 1849 | type: "uint256", 1850 | }, 1851 | ], 1852 | name: "setDefaultProfile", 1853 | outputs: [], 1854 | stateMutability: "nonpayable", 1855 | type: "function", 1856 | }, 1857 | { 1858 | inputs: [ 1859 | { 1860 | components: [ 1861 | { 1862 | internalType: "address", 1863 | name: "wallet", 1864 | type: "address", 1865 | }, 1866 | { 1867 | internalType: "uint256", 1868 | name: "profileId", 1869 | type: "uint256", 1870 | }, 1871 | { 1872 | components: [ 1873 | { 1874 | internalType: "uint8", 1875 | name: "v", 1876 | type: "uint8", 1877 | }, 1878 | { 1879 | internalType: "bytes32", 1880 | name: "r", 1881 | type: "bytes32", 1882 | }, 1883 | { 1884 | internalType: "bytes32", 1885 | name: "s", 1886 | type: "bytes32", 1887 | }, 1888 | { 1889 | internalType: "uint256", 1890 | name: "deadline", 1891 | type: "uint256", 1892 | }, 1893 | ], 1894 | internalType: "struct DataTypes.EIP712Signature", 1895 | name: "sig", 1896 | type: "tuple", 1897 | }, 1898 | ], 1899 | internalType: "struct DataTypes.SetDefaultProfileWithSigData", 1900 | name: "vars", 1901 | type: "tuple", 1902 | }, 1903 | ], 1904 | name: "setDefaultProfileWithSig", 1905 | outputs: [], 1906 | stateMutability: "nonpayable", 1907 | type: "function", 1908 | }, 1909 | { 1910 | inputs: [ 1911 | { 1912 | internalType: "uint256", 1913 | name: "profileId", 1914 | type: "uint256", 1915 | }, 1916 | { 1917 | internalType: "address", 1918 | name: "dispatcher", 1919 | type: "address", 1920 | }, 1921 | ], 1922 | name: "setDispatcher", 1923 | outputs: [], 1924 | stateMutability: "nonpayable", 1925 | type: "function", 1926 | }, 1927 | { 1928 | inputs: [ 1929 | { 1930 | components: [ 1931 | { 1932 | internalType: "uint256", 1933 | name: "profileId", 1934 | type: "uint256", 1935 | }, 1936 | { 1937 | internalType: "address", 1938 | name: "dispatcher", 1939 | type: "address", 1940 | }, 1941 | { 1942 | components: [ 1943 | { 1944 | internalType: "uint8", 1945 | name: "v", 1946 | type: "uint8", 1947 | }, 1948 | { 1949 | internalType: "bytes32", 1950 | name: "r", 1951 | type: "bytes32", 1952 | }, 1953 | { 1954 | internalType: "bytes32", 1955 | name: "s", 1956 | type: "bytes32", 1957 | }, 1958 | { 1959 | internalType: "uint256", 1960 | name: "deadline", 1961 | type: "uint256", 1962 | }, 1963 | ], 1964 | internalType: "struct DataTypes.EIP712Signature", 1965 | name: "sig", 1966 | type: "tuple", 1967 | }, 1968 | ], 1969 | internalType: "struct DataTypes.SetDispatcherWithSigData", 1970 | name: "vars", 1971 | type: "tuple", 1972 | }, 1973 | ], 1974 | name: "setDispatcherWithSig", 1975 | outputs: [], 1976 | stateMutability: "nonpayable", 1977 | type: "function", 1978 | }, 1979 | { 1980 | inputs: [ 1981 | { 1982 | internalType: "address", 1983 | name: "newEmergencyAdmin", 1984 | type: "address", 1985 | }, 1986 | ], 1987 | name: "setEmergencyAdmin", 1988 | outputs: [], 1989 | stateMutability: "nonpayable", 1990 | type: "function", 1991 | }, 1992 | { 1993 | inputs: [ 1994 | { 1995 | internalType: "uint256", 1996 | name: "profileId", 1997 | type: "uint256", 1998 | }, 1999 | { 2000 | internalType: "address", 2001 | name: "followModule", 2002 | type: "address", 2003 | }, 2004 | { 2005 | internalType: "bytes", 2006 | name: "followModuleInitData", 2007 | type: "bytes", 2008 | }, 2009 | ], 2010 | name: "setFollowModule", 2011 | outputs: [], 2012 | stateMutability: "nonpayable", 2013 | type: "function", 2014 | }, 2015 | { 2016 | inputs: [ 2017 | { 2018 | components: [ 2019 | { 2020 | internalType: "uint256", 2021 | name: "profileId", 2022 | type: "uint256", 2023 | }, 2024 | { 2025 | internalType: "address", 2026 | name: "followModule", 2027 | type: "address", 2028 | }, 2029 | { 2030 | internalType: "bytes", 2031 | name: "followModuleInitData", 2032 | type: "bytes", 2033 | }, 2034 | { 2035 | components: [ 2036 | { 2037 | internalType: "uint8", 2038 | name: "v", 2039 | type: "uint8", 2040 | }, 2041 | { 2042 | internalType: "bytes32", 2043 | name: "r", 2044 | type: "bytes32", 2045 | }, 2046 | { 2047 | internalType: "bytes32", 2048 | name: "s", 2049 | type: "bytes32", 2050 | }, 2051 | { 2052 | internalType: "uint256", 2053 | name: "deadline", 2054 | type: "uint256", 2055 | }, 2056 | ], 2057 | internalType: "struct DataTypes.EIP712Signature", 2058 | name: "sig", 2059 | type: "tuple", 2060 | }, 2061 | ], 2062 | internalType: "struct DataTypes.SetFollowModuleWithSigData", 2063 | name: "vars", 2064 | type: "tuple", 2065 | }, 2066 | ], 2067 | name: "setFollowModuleWithSig", 2068 | outputs: [], 2069 | stateMutability: "nonpayable", 2070 | type: "function", 2071 | }, 2072 | { 2073 | inputs: [ 2074 | { 2075 | internalType: "uint256", 2076 | name: "profileId", 2077 | type: "uint256", 2078 | }, 2079 | { 2080 | internalType: "string", 2081 | name: "followNFTURI", 2082 | type: "string", 2083 | }, 2084 | ], 2085 | name: "setFollowNFTURI", 2086 | outputs: [], 2087 | stateMutability: "nonpayable", 2088 | type: "function", 2089 | }, 2090 | { 2091 | inputs: [ 2092 | { 2093 | components: [ 2094 | { 2095 | internalType: "uint256", 2096 | name: "profileId", 2097 | type: "uint256", 2098 | }, 2099 | { 2100 | internalType: "string", 2101 | name: "followNFTURI", 2102 | type: "string", 2103 | }, 2104 | { 2105 | components: [ 2106 | { 2107 | internalType: "uint8", 2108 | name: "v", 2109 | type: "uint8", 2110 | }, 2111 | { 2112 | internalType: "bytes32", 2113 | name: "r", 2114 | type: "bytes32", 2115 | }, 2116 | { 2117 | internalType: "bytes32", 2118 | name: "s", 2119 | type: "bytes32", 2120 | }, 2121 | { 2122 | internalType: "uint256", 2123 | name: "deadline", 2124 | type: "uint256", 2125 | }, 2126 | ], 2127 | internalType: "struct DataTypes.EIP712Signature", 2128 | name: "sig", 2129 | type: "tuple", 2130 | }, 2131 | ], 2132 | internalType: "struct DataTypes.SetFollowNFTURIWithSigData", 2133 | name: "vars", 2134 | type: "tuple", 2135 | }, 2136 | ], 2137 | name: "setFollowNFTURIWithSig", 2138 | outputs: [], 2139 | stateMutability: "nonpayable", 2140 | type: "function", 2141 | }, 2142 | { 2143 | inputs: [ 2144 | { 2145 | internalType: "address", 2146 | name: "newGovernance", 2147 | type: "address", 2148 | }, 2149 | ], 2150 | name: "setGovernance", 2151 | outputs: [], 2152 | stateMutability: "nonpayable", 2153 | type: "function", 2154 | }, 2155 | { 2156 | inputs: [ 2157 | { 2158 | internalType: "uint256", 2159 | name: "profileId", 2160 | type: "uint256", 2161 | }, 2162 | { 2163 | internalType: "string", 2164 | name: "imageURI", 2165 | type: "string", 2166 | }, 2167 | ], 2168 | name: "setProfileImageURI", 2169 | outputs: [], 2170 | stateMutability: "nonpayable", 2171 | type: "function", 2172 | }, 2173 | { 2174 | inputs: [ 2175 | { 2176 | components: [ 2177 | { 2178 | internalType: "uint256", 2179 | name: "profileId", 2180 | type: "uint256", 2181 | }, 2182 | { 2183 | internalType: "string", 2184 | name: "imageURI", 2185 | type: "string", 2186 | }, 2187 | { 2188 | components: [ 2189 | { 2190 | internalType: "uint8", 2191 | name: "v", 2192 | type: "uint8", 2193 | }, 2194 | { 2195 | internalType: "bytes32", 2196 | name: "r", 2197 | type: "bytes32", 2198 | }, 2199 | { 2200 | internalType: "bytes32", 2201 | name: "s", 2202 | type: "bytes32", 2203 | }, 2204 | { 2205 | internalType: "uint256", 2206 | name: "deadline", 2207 | type: "uint256", 2208 | }, 2209 | ], 2210 | internalType: "struct DataTypes.EIP712Signature", 2211 | name: "sig", 2212 | type: "tuple", 2213 | }, 2214 | ], 2215 | internalType: "struct DataTypes.SetProfileImageURIWithSigData", 2216 | name: "vars", 2217 | type: "tuple", 2218 | }, 2219 | ], 2220 | name: "setProfileImageURIWithSig", 2221 | outputs: [], 2222 | stateMutability: "nonpayable", 2223 | type: "function", 2224 | }, 2225 | { 2226 | inputs: [ 2227 | { 2228 | internalType: "enum DataTypes.ProtocolState", 2229 | name: "newState", 2230 | type: "uint8", 2231 | }, 2232 | ], 2233 | name: "setState", 2234 | outputs: [], 2235 | stateMutability: "nonpayable", 2236 | type: "function", 2237 | }, 2238 | { 2239 | inputs: [ 2240 | { 2241 | internalType: "address", 2242 | name: "", 2243 | type: "address", 2244 | }, 2245 | ], 2246 | name: "sigNonces", 2247 | outputs: [ 2248 | { 2249 | internalType: "uint256", 2250 | name: "", 2251 | type: "uint256", 2252 | }, 2253 | ], 2254 | stateMutability: "view", 2255 | type: "function", 2256 | }, 2257 | { 2258 | inputs: [ 2259 | { 2260 | internalType: "bytes4", 2261 | name: "interfaceId", 2262 | type: "bytes4", 2263 | }, 2264 | ], 2265 | name: "supportsInterface", 2266 | outputs: [ 2267 | { 2268 | internalType: "bool", 2269 | name: "", 2270 | type: "bool", 2271 | }, 2272 | ], 2273 | stateMutability: "view", 2274 | type: "function", 2275 | }, 2276 | { 2277 | inputs: [], 2278 | name: "symbol", 2279 | outputs: [ 2280 | { 2281 | internalType: "string", 2282 | name: "", 2283 | type: "string", 2284 | }, 2285 | ], 2286 | stateMutability: "view", 2287 | type: "function", 2288 | }, 2289 | { 2290 | inputs: [ 2291 | { 2292 | internalType: "uint256", 2293 | name: "index", 2294 | type: "uint256", 2295 | }, 2296 | ], 2297 | name: "tokenByIndex", 2298 | outputs: [ 2299 | { 2300 | internalType: "uint256", 2301 | name: "", 2302 | type: "uint256", 2303 | }, 2304 | ], 2305 | stateMutability: "view", 2306 | type: "function", 2307 | }, 2308 | { 2309 | inputs: [ 2310 | { 2311 | internalType: "uint256", 2312 | name: "tokenId", 2313 | type: "uint256", 2314 | }, 2315 | ], 2316 | name: "tokenDataOf", 2317 | outputs: [ 2318 | { 2319 | components: [ 2320 | { 2321 | internalType: "address", 2322 | name: "owner", 2323 | type: "address", 2324 | }, 2325 | { 2326 | internalType: "uint96", 2327 | name: "mintTimestamp", 2328 | type: "uint96", 2329 | }, 2330 | ], 2331 | internalType: "struct IERC721Time.TokenData", 2332 | name: "", 2333 | type: "tuple", 2334 | }, 2335 | ], 2336 | stateMutability: "view", 2337 | type: "function", 2338 | }, 2339 | { 2340 | inputs: [ 2341 | { 2342 | internalType: "address", 2343 | name: "owner", 2344 | type: "address", 2345 | }, 2346 | { 2347 | internalType: "uint256", 2348 | name: "index", 2349 | type: "uint256", 2350 | }, 2351 | ], 2352 | name: "tokenOfOwnerByIndex", 2353 | outputs: [ 2354 | { 2355 | internalType: "uint256", 2356 | name: "", 2357 | type: "uint256", 2358 | }, 2359 | ], 2360 | stateMutability: "view", 2361 | type: "function", 2362 | }, 2363 | { 2364 | inputs: [ 2365 | { 2366 | internalType: "uint256", 2367 | name: "tokenId", 2368 | type: "uint256", 2369 | }, 2370 | ], 2371 | name: "tokenURI", 2372 | outputs: [ 2373 | { 2374 | internalType: "string", 2375 | name: "", 2376 | type: "string", 2377 | }, 2378 | ], 2379 | stateMutability: "view", 2380 | type: "function", 2381 | }, 2382 | { 2383 | inputs: [], 2384 | name: "totalSupply", 2385 | outputs: [ 2386 | { 2387 | internalType: "uint256", 2388 | name: "", 2389 | type: "uint256", 2390 | }, 2391 | ], 2392 | stateMutability: "view", 2393 | type: "function", 2394 | }, 2395 | { 2396 | inputs: [ 2397 | { 2398 | internalType: "address", 2399 | name: "from", 2400 | type: "address", 2401 | }, 2402 | { 2403 | internalType: "address", 2404 | name: "to", 2405 | type: "address", 2406 | }, 2407 | { 2408 | internalType: "uint256", 2409 | name: "tokenId", 2410 | type: "uint256", 2411 | }, 2412 | ], 2413 | name: "transferFrom", 2414 | outputs: [], 2415 | stateMutability: "nonpayable", 2416 | type: "function", 2417 | }, 2418 | { 2419 | inputs: [ 2420 | { 2421 | internalType: "address", 2422 | name: "collectModule", 2423 | type: "address", 2424 | }, 2425 | { 2426 | internalType: "bool", 2427 | name: "whitelist", 2428 | type: "bool", 2429 | }, 2430 | ], 2431 | name: "whitelistCollectModule", 2432 | outputs: [], 2433 | stateMutability: "nonpayable", 2434 | type: "function", 2435 | }, 2436 | { 2437 | inputs: [ 2438 | { 2439 | internalType: "address", 2440 | name: "followModule", 2441 | type: "address", 2442 | }, 2443 | { 2444 | internalType: "bool", 2445 | name: "whitelist", 2446 | type: "bool", 2447 | }, 2448 | ], 2449 | name: "whitelistFollowModule", 2450 | outputs: [], 2451 | stateMutability: "nonpayable", 2452 | type: "function", 2453 | }, 2454 | { 2455 | inputs: [ 2456 | { 2457 | internalType: "address", 2458 | name: "profileCreator", 2459 | type: "address", 2460 | }, 2461 | { 2462 | internalType: "bool", 2463 | name: "whitelist", 2464 | type: "bool", 2465 | }, 2466 | ], 2467 | name: "whitelistProfileCreator", 2468 | outputs: [], 2469 | stateMutability: "nonpayable", 2470 | type: "function", 2471 | }, 2472 | { 2473 | inputs: [ 2474 | { 2475 | internalType: "address", 2476 | name: "referenceModule", 2477 | type: "address", 2478 | }, 2479 | { 2480 | internalType: "bool", 2481 | name: "whitelist", 2482 | type: "bool", 2483 | }, 2484 | ], 2485 | name: "whitelistReferenceModule", 2486 | outputs: [], 2487 | stateMutability: "nonpayable", 2488 | type: "function", 2489 | }, 2490 | ]; 2491 | export class LensHub__factory { 2492 | static createInterface() { 2493 | return new utils.Interface(_abi); 2494 | } 2495 | static connect(address, signerOrProvider) { 2496 | return new Contract(address, _abi, signerOrProvider); 2497 | } 2498 | } 2499 | LensHub__factory.abi = _abi; 2500 | --------------------------------------------------------------------------------