Coder Social home page Coder Social logo

core's Introduction

                                              @@@@@@@@@
                                        @@@@@@@@@@@@@@@@@@@@@
                                    @@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
              @@@@@@@@@@@       @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@      @@@@@@@@@@@
        @@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@              @@@@@@@@@@@@@@              @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@          @@@@@@@   @@@@@@@@@         @@@@@@    @@@@@@@@@@@@@@@@@@@@@@@@@
  @@@@@@@@@@@@@@@@@@@@@@  @@        @@@@@@@@  @@@@@@   @       @@@@@@@@   @@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@            @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                          @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
                                  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Lens Protocol

The Lens Protocol is a decentralized, non-custodial social graph. Lens implements unique, on-chain social interaction mechanisms analogous to commonly understood Web2 social media interactions, but significantly expanded with unique functionality that empower communities to form and participants to own their own social graph.

Setup

1. Clone the Repository

git clone [email protected]:lens-protocol/core.git

2. Install Foundry

Follow the instructions from their repository or just do:

curl -L https://foundry.paradigm.xyz | bash
foundryup

3. Install dependencies in submodules

You can do it either with forge:

forge install

or directly with git:

git submodule update --init --recursive

4. Create Your .env File

Copy the .env.example file into .env and fill the necessary fields:

MNEMONIC=
POLYGON_RPC_URL=
MUMBAI_RPC_URL=
KOVAN_RPC_URL=
ROPSTEN_RPC_URL=
MAINNET_RPC_URL=
BLOCK_EXPLORER_KEY=
TENDERLY_PROJECT=
TENDERLY_USERNAME=
TENDERLY_FORK_ID=
TENDERLY_HEAD_ID=

# Forking setup (uncomment to test using a fork)
# TESTING_FORK=mainnet
# TESTING_FORK_CURRENT_VERSION=1
# TESTING_FORK_BLOCK=45504400

If you just want to test locally without a fork, then you can skip this step.

5. Build

You can compile the project using:

forge build

You may notice a warning about some files exceeding code size.

To avoid the warning, you can compile Via IR but it will take more time:

forge build --via-ir

6. Test

You can run unit tests using:

forge test

To run the tests on a fork you need to fill the .env file from the step above, and uncomment the TESTING_FORK variables.

7. Coverage

You can run coverage using:

forge coverage

core's People

Contributors

0xjuancito avatar bensparkscode avatar d3vl0per avatar damarnez avatar donosonaumczuk avatar joshstevens19 avatar kartojal avatar lherskind avatar miguelmtzinf avatar oneski avatar qwolphin avatar roru avatar vicnaum avatar yqrashawn avatar zer0dot avatar zerosnacks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

Setting up locally vs using Docker

What are the main benefits of using Docker vs just running locally?

I wonder if it would be good to outline that developers could also run locally, and what the tradeoffs are for doing so.

I think that some developers might have an easier time running locally, and if there was some explanation around how to do it and what the tradeoffs are vs running in docker, it would be helpful (me included).

Also might be cool to consider using something like GitPod which would allow someone to deploy, run, and change files easily using the in-browser VS Code editor.

EACCES: permission denied, mkdir '/root/.config/hardhat-nodejs'

I'm following the instructions in README.md, even so this problem persists.

First log [BUILDING AND RUNNING DOCKER]:

anarkrypto@anarkrypto-pc:~/lens-protocol/$ export USERID=$UID && docker-compose build && docker-compose run --name lens contracts-env bash
WARNING: The UID variable is not set. Defaulting to a blank string.
Building contracts-env
Sending build context to Docker daemon  4.391MB
Step 1/12 : FROM ethereum/solc:0.8.7 as build-deps
 ---> e0a6d5abb97a
Step 2/12 : FROM node:16 as build-packages
 ---> 5964aa70c11d
Step 3/12 : COPY package*.json ./
 ---> Using cache
 ---> 87b106f63cf5
Step 4/12 : COPY tsconfig*.json ./
 ---> Using cache
 ---> a30e3491931f
Step 5/12 : RUN npm ci --quiet
 ---> Using cache
 ---> 117a4d9b6ab8
Step 6/12 : FROM node:16
 ---> 5964aa70c11d
Step 7/12 : WORKDIR /src
 ---> Using cache
 ---> e4539717da4a
Step 8/12 : COPY --from=build-deps /usr/bin/solc /usr/bin/solc
 ---> Using cache
 ---> 5bc9c444c689
Step 9/12 : COPY --from=build-packages /node_modules /node_modules
 ---> Using cache
 ---> 542483875780
Step 10/12 : COPY docker-entrypoint.sh /docker-entrypoint.sh
 ---> Using cache
 ---> abcff19888cb
Step 11/12 : USER node
 ---> Using cache
 ---> bea0db6a71e8
Step 12/12 : ENTRYPOINT ["sh", "/docker-entrypoint.sh"]
 ---> Using cache
 ---> 5267e266e513
Successfully built 5267e266e513
Successfully tagged lens-protocol_contracts-env:latest
WARNING: The UID variable is not set. Defaulting to a blank string.
Creating network "lens-protocol_default" with the default driver
Creating lens-protocol_contracts-env_run ... done

"The UID variable is not set"
Why ? Even with export USERID=$UID

  • If I run echo $USERID or echo $UID on host, I get 1000
  • If I run echo $USERID on container, I get nothing
  • If I run echo $UID on container, I get 0

Second Log [RUNNING TEST INSIDE CONTAINER]

root@1193996f0613:/src# npm run test

> [email protected] test
> npm run compile && TRACK_GAS=true hardhat test

glob error [Error: EACCES: permission denied, scandir '/root/.npm/_logs'] {
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path: '/root/.npm/_logs'
}

> [email protected] compile
> SKIP_LOAD=true hardhat clean && SKIP_LOAD=true hardhat compile

An unexpected error occurred:

Error: EACCES: permission denied, mkdir '/root/.config/hardhat-nodejs'
    at Object.mkdirSync (node:fs:1334:3)
    at Object.mkdirsSync (/src/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
    at getConfigDirSync (/src/node_modules/hardhat/src/internal/util/global-dir.ts:21:6)
    at Object.hasConsentedTelemetry (/src/node_modules/hardhat/src/internal/util/global-dir.ts:103:21)
    at main (/src/node_modules/hardhat/src/internal/cli/cli.ts:136:49) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/root/.config/hardhat-nodejs'
}
npm notice 
npm notice New minor version of npm available! 8.1.0 -> 8.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.6.0
npm notice Run npm install -g [email protected] to update!
npm notice 
root@1193996f0613:/src# exit
exit
ERROR: 1

"EACCES: permission denied, mkdir '/root/.config/hardhat-nodejs'"

This is weird considering the container user is root


Docker version 20.10.10, build b485636
Ubuntu 20.04.3 LTS

Bug in graphql API


query Publications {
  explorePublications(request: {
    publicationTypes: [POST, COMMENT, MIRROR],
    noRandomize: true,
    sortCriteria: LATEST,
    cursor: "{\"timestamp\":1,\"offset\":172200,\"randomizer\":5}",
    limit: 50
  }) {
    items {
      __typename 
      ... on Post {
        ...PostFields
      }
      ... on Comment {
        ...CommentFields
      }
      ... on Mirror {
        ...MirrorFields
      }
    }
    pageInfo {
      prev
      next
      totalCount
    }
  }
}
fragment MediaFields on Media {
  url
  mimeType
}

fragment ProfileFields on Profile {
  id
  name
  bio
  attributes {
     displayType
     traitType
     key
     value
  }
  isFollowedByMe
  isFollowing(who: null)
  followNftAddress
  metadata
  isDefault
  handle
  picture {
    ... on NftImage {
      contractAddress
      tokenId
      uri
      verified
    }
    ... on MediaSet {
      original {
        ...MediaFields
      }
    }
  }
  coverPicture {
    ... on NftImage {
      contractAddress
      tokenId
      uri
      verified
    }
    ... on MediaSet {
      original {
        ...MediaFields
      }
    }
  }
  ownedBy
  dispatcher {
    address
  }
  stats {
    totalFollowers
    totalFollowing
    totalPosts
    totalComments
    totalMirrors
    totalPublications
    totalCollects
  }
  followModule {
    ... on FeeFollowModuleSettings {
      type
      amount {
        asset {
          name
          symbol
          decimals
          address
        }
        value
      }
      recipient
    }
    ... on ProfileFollowModuleSettings {
     type
    }
    ... on RevertFollowModuleSettings {
     type
    }
  }
}

fragment PublicationStatsFields on PublicationStats { 
  totalAmountOfMirrors
  totalAmountOfCollects
  totalAmountOfComments
}

fragment MetadataOutputFields on MetadataOutput {
  name
  description
  content
  media {
    original {
      ...MediaFields
    }
  }
  attributes {
    displayType
    traitType
    value
  }
}

fragment Erc20Fields on Erc20 {
  name
  symbol
  decimals
  address
}

fragment CollectModuleFields on CollectModule {
  __typename
  ... on FreeCollectModuleSettings {
      type
      followerOnly
      contractAddress
  }
  ... on FeeCollectModuleSettings {
    type
    amount {
      asset {
        ...Erc20Fields
      }
      value
    }
    recipient
    referralFee
  }
  ... on LimitedFeeCollectModuleSettings {
    type
    collectLimit
    amount {
      asset {
        ...Erc20Fields
      }
      value
    }
    recipient
    referralFee
  }
  ... on LimitedTimedFeeCollectModuleSettings {
    type
    collectLimit
    amount {
      asset {
        ...Erc20Fields
      }
      value
    }
    recipient
    referralFee
    endTimestamp
  }
  ... on RevertCollectModuleSettings {
    type
  }
  ... on TimedFeeCollectModuleSettings {
    type
    amount {
      asset {
        ...Erc20Fields
      }
      value
    }
    recipient
    referralFee
    endTimestamp
  }
}

fragment PostFields on Post {
  id
  profile {
    ...ProfileFields
  }
  stats {
    ...PublicationStatsFields
  }
  metadata {
    ...MetadataOutputFields
  }
  createdAt
  collectModule {
    ...CollectModuleFields
  }
  referenceModule {
    ... on FollowOnlyReferenceModuleSettings {
      type
    }
  }
  appId
  hidden
  reaction(request: null)
  mirrors(by: null)
  hasCollectedByMe
}

fragment MirrorBaseFields on Mirror {
  id
  profile {
    ...ProfileFields
  }
  stats {
    ...PublicationStatsFields
  }
  metadata {
    ...MetadataOutputFields
  }
  createdAt
  collectModule {
    ...CollectModuleFields
  }
  referenceModule {
    ... on FollowOnlyReferenceModuleSettings {
      type
    }
  }
  appId
  hidden
  reaction(request: null)
  hasCollectedByMe
}

fragment MirrorFields on Mirror {
  ...MirrorBaseFields
  mirrorOf {
   ... on Post {
      ...PostFields          
   }
   ... on Comment {
      ...CommentFields          
   }
  }
}

fragment CommentBaseFields on Comment {
  id
  profile {
    ...ProfileFields
  }
  stats {
    ...PublicationStatsFields
  }
  metadata {
    ...MetadataOutputFields
  }
  createdAt
  collectModule {
    ...CollectModuleFields
  }
  referenceModule {
    ... on FollowOnlyReferenceModuleSettings {
      type
    }
  }
  appId
  hidden
  reaction(request: null)
  mirrors(by: null)
  hasCollectedByMe
}

fragment CommentFields on Comment {
  ...CommentBaseFields
  mainPost {
    ... on Post {
      ...PostFields
    }
    ... on Mirror {
      ...MirrorBaseFields
      mirrorOf {
        ... on Post {
           ...PostFields          
        }
        ... on Comment {
           ...CommentMirrorOfFields        
        }
      }
    }
  }
}

fragment CommentMirrorOfFields on Comment {
  ...CommentBaseFields
  mainPost {
    ... on Post {
      ...PostFields
    }
    ... on Mirror {
       ...MirrorBaseFields
    }
  }
}

Error:

{
  "errors": [
    {
      "message": "Cannot read properties of null (reading 'is_related_to_post')",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "explorePublications"
      ],
      "extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "stacktrace": [
            "TypeError: Cannot read properties of null (reading 'is_related_to_post')",
            "    at buildCommentOutput (/usr/src/app/packages/api-lens/lib/services/publication.service.js:147:43)",
            "    at getCommentOutput (/usr/src/app/packages/api-lens/lib/services/publication.service.js:171:43)",
            "    at runMicrotasks (<anonymous>)",
            "    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
            "    at async buildCommentOutput (/usr/src/app/packages/api-lens/lib/services/publication.service.js:155:19)",
            "    at async Promise.all (index 37)",
            "    at async getRecommendedPublications (/usr/src/app/packages/api-lens/lib/services/publication.service.js:342:16)",
            "    at async dispatchHandler (/usr/src/app/node_modules/type-graphql/dist/resolvers/helpers.js:82:24)",
            "    at async /usr/src/app/node_modules/type-graphql/dist/resolvers/helpers.js:83:26",
            "    at async dispatchHandler (/usr/src/app/node_modules/type-graphql/dist/resolvers/helpers.js:82:24)"
          ]
        }
      }
    }
  ],
  "data": null
}

Investigate content frontrunning

Try out if someone could see your IPAsset mint pending and frontrun the content.
Design and implement a system to mitigate it (commit-reveal, multisig minting).

Issues running npm scripts in docker

Following the steps in the docs, I'm unable to get npm run compile to run successfully. First, I had to npm install (which should prob be added to the docs -- the compose command doesn't seem to be doing the trick?) when getting hardhat not found, but now I'm getting this after an npm install:

node@8609d1131323:/src$ npm run compile

> [email protected] compile
> SKIP_LOAD=true hardhat clean && SKIP_LOAD=true hardhat compile

Error: ENOENT: no such file or directory, open '/src/node_modules/@solidity-parser/parser/dist/antlr/Solidity.tokens'
    at Object.openSync (node:fs:585:3)
    at Object.readFileSync (node:fs:453:35)
    at /src/node_modules/@solidity-parser/parser/src/tokens-string.js:8:6
    at /src/node_modules/@solidity-parser/parser/dist/index.cjs.js:22:45
    at Object.<anonymous> (/src/node_modules/@solidity-parser/parser/src/tokens.ts:2:27)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)

@solidity-parser/parser isn't in the package.json. Should it be? Adding it and running npm run compile again gives me this:

node@8609d1131323:/src$ npm run compile

> [email protected] compile
> SKIP_LOAD=true hardhat clean && SKIP_LOAD=true hardhat compile

An unexpected error occurred:

TypeError: envPaths is not a function
    at generatePathsSync (/src/node_modules/hardhat/src/internal/util/global-dir.ts:16:10)
    at getConfigDirSync (/src/node_modules/hardhat/src/internal/util/global-dir.ts:20:22)
    at Object.hasConsentedTelemetry (/src/node_modules/hardhat/src/internal/util/global-dir.ts:103:21)
    at main (/src/node_modules/hardhat/src/internal/cli/cli.ts:136:49)

Is this the best place to raise issues about the docs?

Too many warnings/errors when running `npm run test` command

> @aave/[email protected] test
> npm run compile && TRACK_GAS=true hardhat test


> @aave/[email protected] compile
> SKIP_LOAD=true hardhat clean && SKIP_LOAD=true hardhat compile

Solidity 0.8.10 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.

Learn more at https://hardhat.org/reference/solidity-support

Downloading compiler 0.8.10
Compiling 80 files with 0.8.10
Warning: This declaration shadows an existing declaration.
  --> contracts/core/base/ERC721Time.sol:52:28:
   |
52 |     function __ERC721_Init(string calldata name, string calldata symbol) internal {
   |                            ^^^^^^^^^^^^^^^^^^^^
Note: The shadowed declaration is here:
   --> contracts/core/base/ERC721Time.sol:123:5:
    |
123 |     function name() public view virtual override returns (string memory) {
    |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: This declaration shadows an existing declaration.
  --> contracts/core/base/ERC721Time.sol:52:50:
   |
52 |     function __ERC721_Init(string calldata name, string calldata symbol) internal {
   |                                                  ^^^^^^^^^^^^^^^^^^^^^^
Note: The shadowed declaration is here:
   --> contracts/core/base/ERC721Time.sol:130:5:
    |
130 |     function symbol() public view virtual override returns (string memory) {
    |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
   --> contracts/core/CollectNFT.sol:107:26:
    |
107 |     function royaltyInfo(uint256 tokenId, uint256 salePrice)
    |                          ^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/FreeCollectModule.sol:40:9:
   |
40 |         uint256 referrerProfileId,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/FreeCollectModule.sol:44:9:
   |
44 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:21:9:
   |
21 |         uint256 profileId,
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:22:9:
   |
22 |         uint256 pubId,
   |         ^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:23:9:
   |
23 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:33:9:
   |
33 |         uint256 referrerProfileId,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:34:9:
   |
34 |         address collector,
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:35:9:
   |
35 |         uint256 profileId,
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:36:9:
   |
36 |         uint256 pubId,
   |         ^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/collect/RevertCollectModule.sol:37:9:
   |
37 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/ApprovalFollowModule.sol:89:9:
   |
89 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/ProfileFollowModule.sol:33:37:
   |
33 |     function initializeFollowModule(uint256 profileId, bytes calldata data)
   |                                     ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/ProfileFollowModule.sol:33:56:
   |
33 |     function initializeFollowModule(uint256 profileId, bytes calldata data)
   |                                                        ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/RevertFollowModule.sol:26:37:
   |
26 |     function initializeFollowModule(uint256 profileId, bytes calldata data)
   |                                     ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/RevertFollowModule.sol:26:56:
   |
26 |     function initializeFollowModule(uint256 profileId, bytes calldata data)
   |                                                        ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/RevertFollowModule.sol:40:9:
   |
40 |         address follower,
   |         ^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/RevertFollowModule.sol:41:9:
   |
41 |         uint256 profileId,
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/follow/RevertFollowModule.sol:42:9:
   |
42 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:24:9:
   |
24 |         uint256 profileId,
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:25:9:
   |
25 |         uint256 pubId,
   |         ^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:26:9:
   |
26 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:39:9:
   |
39 |         uint256 pubIdPointed,
   |         ^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:40:9:
   |
40 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:54:9:
   |
54 |         uint256 pubIdPointed,
   |         ^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/core/modules/reference/FollowerOnlyReferenceModule.sol:55:9:
   |
55 |         bytes calldata data
   |         ^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/misc/AccessControlV1.sol:37:9:
   |
37 |         bytes memory data
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/misc/AccessControlV2.sol:39:9:
   |
39 |         bytes memory data
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/misc/AccessControlV2.sol:48:9:
   |
48 |         uint256 collectorProfileId,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/misc/AccessControlV2.sol:49:9:
   |
49 |         bytes memory data
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/misc/AccessControlV2.sol:59:9:
   |
59 |         uint256 followerProfileId,
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/misc/AccessControlV2.sol:60:9:
   |
60 |         bytes memory data
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/mocks/MockAccessControlV2BadRevision.sol:39:9:
   |
39 |         bytes memory data
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
 --> contracts/mocks/MockFollowModule.sol:8:37:
  |
8 |     function initializeFollowModule(uint256 profileId, bytes calldata data)
  |                                     ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/mocks/MockFollowModule.sol:26:9:
   |
26 |         uint256 profileId,
   |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/mocks/MockFollowModule.sol:27:9:
   |
27 |         address follower,
   |         ^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/mocks/MockFollowModule.sol:28:9:
   |
28 |         uint256 followNFTTokenId
   |         ^^^^^^^^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
 --> contracts/mocks/MockReferenceModule.sol:9:9:
  |
9 |         uint256 profileId,
  |         ^^^^^^^^^^^^^^^^^


Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> contracts/mocks/MockReferenceModule.sol:10:9:
   |
10 |         uint256 pubId,
   |         ^^^^^^^^^^^^^


Warning: Function state mutability can be restricted to view
  --> contracts/core/modules/follow/ProfileFollowModule.sol:33:5:
   |
33 |     function initializeFollowModule(uint256 profileId, bytes calldata data)
   |     ^ (Relevant source part starts here and spans across multiple lines).


Warning: Function state mutability can be restricted to pure
  --> contracts/mocks/MockFollowModule.sol:25:5:
   |
25 |     function isFollowing(
   |     ^ (Relevant source part starts here and spans across multiple lines).


Generating typings for: 80 artifacts in dir: typechain-types for target: ethers-v5
Successfully generated 137 typings!
Compilation finished successfully
No need to generate any newer typings.


  1) "before all" hook in "{root}"
·----------------------------------------|---------------------------|-------------|-----------------------------·
|          Solc version: 0.8.10          ·  Optimizer enabled: true  ·  Runs: 200  ·  Block limit: 12450000 gas  │
·········································|···························|·············|······························
|  Methods                                                                                                       │
·············|···························|·············|·············|·············|···············|··············
|  Contract  ·  Method                   ·  Min        ·  Max        ·  Avg        ·  # calls      ·  eur (avg)  │
·············|···························|·············|·············|·············|···············|··············
|  LensHub   ·  setState                 ·          -  ·          -  ·      35697  ·            1  ·          -  │
·············|···························|·············|·············|·············|···············|··············
|  LensHub   ·  whitelistProfileCreator  ·          -  ·          -  ·      55659  ·            4  ·          -  │
·············|···························|·············|·············|·············|···············|··············
|  Deployments                           ·                                         ·  % of limit   ·             │
·········································|·············|·············|·············|···············|··············
|  ApprovalFollowModule                  ·          -  ·          -  ·     880803  ·        7.1 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  CollectNFT                            ·          -  ·          -  ·    2196077  ·       17.6 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  Currency                              ·          -  ·          -  ·     648067  ·        5.2 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  Events                                ·          -  ·          -  ·      72205  ·        0.6 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  FeeCollectModule                      ·          -  ·          -  ·    1026777  ·        8.2 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  FeeFollowModule                       ·          -  ·          -  ·     822100  ·        6.6 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  FollowerOnlyReferenceModule           ·          -  ·          -  ·     413886  ·        3.3 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  FollowNFT                             ·          -  ·          -  ·    2458428  ·       19.7 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  FreeCollectModule                     ·          -  ·          -  ·     440263  ·        3.5 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  Helper                                ·          -  ·          -  ·     148063  ·        1.2 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  InteractionLogic                      ·          -  ·          -  ·    1504800  ·       12.1 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  LensHub                               ·          -  ·          -  ·    5337462  ·       42.9 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  LensPeriphery                         ·          -  ·          -  ·    1025804  ·        8.2 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  LimitedFeeCollectModule               ·          -  ·          -  ·    1129055  ·        9.1 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  LimitedTimedFeeCollectModule          ·          -  ·          -  ·    1189103  ·        9.6 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  MockFollowModule                      ·          -  ·          -  ·     241136  ·        1.9 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  MockReferenceModule                   ·          -  ·          -  ·     199567  ·        1.6 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  ModuleGlobals                         ·          -  ·          -  ·     427782  ·        3.4 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  ProfileFollowModule                   ·          -  ·          -  ·     459209  ·        3.7 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  ProfileTokenURILogic                  ·          -  ·          -  ·    3885248  ·       31.2 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  PublishingLogic                       ·          -  ·          -  ·    1389185  ·       11.2 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  RevertCollectModule                   ·          -  ·          -  ·     179713  ·        1.4 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  RevertFollowModule                    ·          -  ·          -  ·     374402  ·          3 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  TimedFeeCollectModule                 ·          -  ·          -  ·    1125647  ·          9 %  ·          -  │
·········································|·············|·············|·············|···············|··············
|  TransparentUpgradeableProxy           ·          -  ·          -  ·     719975  ·        5.8 %  ·          -  │
·----------------------------------------|-------------|-------------|-------------|---------------|-------------·

  0 passing (2m)
  1 failing

  1) "before all" hook in "{root}":
     Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at runNextTicks (node:internal/process/task_queues:65:3)
      at listOnTimeout (node:internal/timers:528:9)
      at processTimers (node:internal/timers:502:7)


npm notice 
npm notice New major version of npm available! 8.19.3 -> 9.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.0
npm notice Run npm install -g [email protected] to update!
npm notice

Docker Operation Not Permitted Issue

Hello,

I have run into a new issue while trying to follow the quick start guide.

When i run sudo docker-compose up, I get the following output:

Step 11/13 : COPY docker-entrypoint.sh /docker-entrypoint.sh
 ---> abda97737947
Step 12/13 : USER node
 ---> Running in 7ad164cc8d63
Removing intermediate container 7ad164cc8d63
 ---> 854e363af381
Step 13/13 : ENTRYPOINT ["sh", "/docker-entrypoint.sh"]
 ---> Running in 5f98e87e2fad
Removing intermediate container 5f98e87e2fad
 ---> 485bef11872c
Successfully built 485bef11872c
Successfully tagged lens-protocol_contracts-env:latest
Creating lens-protocol_contracts-env_1 ... done
Attaching to lens-protocol_contracts-env_1
contracts-env_1  | standard_init_linux.go:228: exec user process caused: operation not permitted

When I run the docker image that was built without docker-compose, (with command docker run lens-protocol_contracts-env), I get this output:

mv: cannot move '/node_modules' to '/src/node_modules': Permission denied

What is more confusing is that this was not an issue while I was trying to fix the other issue I opened earlier: #56

Has anyone on the team seen this before?

Also, here is my current Dockerfile:

# syntax=docker/dockerfile:1.3
FROM ethereum/solc:0.8.7 as build-deps

FROM node:16 as build-packages

COPY package*.json ./
COPY tsconfig*.json ./

RUN npm install -g --unsafe-perm=true --allow-root
RUN mkdir -p /src/node_modules && chown -R node:node /src

# RUN chown -R node:node /node_modules

RUN npm ci --quiet

FROM node:16

WORKDIR /src

COPY --from=build-deps /usr/bin/solc /usr/bin/solc
COPY --from=build-packages /node_modules /node_modules
COPY docker-entrypoint.sh /docker-entrypoint.sh

USER node

ENTRYPOINT ["sh", "/docker-entrypoint.sh"]

Communities as a native feature

I would like to see a community as a different type of post (publicationTypes: COMMUNITY) that would allow me to work easily with the communities in a similar way the lenster does this. On top of publication POST functionality, it will be nice to be able to fetch communities I subscribed to and fulltext search.

Ubuntu Docker Permissions Issue

Hi Lens team,

I tried to follow the quick setup docs, but I am running into a docker permissions issue (likely because I am running this on ubuntu). I wanted to post this here in case your team has run into this before, otherwise, I'll see if I can figure it out myself.

When I run sudo docker-compose up, I see this output:

...
Successfully built bcf4f82a324a
Successfully tagged lens-protocol_contracts-env:latest
Starting lens-protocol_contracts-env_1 ... done
Attaching to lens-protocol_contracts-env_1
contracts-env_1  | mv: cannot create directory '/src/node_modules': Permission denied

The permission denied line is troublesome, but I can still exec into the container.

I exec into the container and run `npm run compile, I get this output:

I have no name!@ac2da960baa4:/src$ npm run compile

> [email protected] compile
> SKIP_LOAD=true hardhat clean && SKIP_LOAD=true hardhat compile

An unexpected error occurred:

Error: EACCES: permission denied, mkdir '/.config'
    at Object.mkdirSync (node:fs:1336:3)
    at mkdirsSync (/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
    at Object.mkdirsSync (/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:36:14)
    at getConfigDirSync (/node_modules/hardhat/src/internal/util/global-dir.ts:21:6)
    at Object.hasConsentedTelemetry (/node_modules/hardhat/src/internal/util/global-dir.ts:103:21)
    at main (/node_modules/hardhat/src/internal/cli/cli.ts:136:49) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/.config'
}

It looks docker will not allow npm to create the directories it needs to successfully complete the commands.

Please let me know if your team knows a fix to this!

Thanks,

Nick

Refactor the Entire Test Suite (Or Move to Foundry)

The repository uses Hardhat as a development environment as it fit our needs perfectly and has a plethora of plugins. Unfortunately, we've run into some issues as we've reached 500+ tests.

Firstly, the test suite takes quite a while to run. This can significantly reduce productivity and increase development time-- even when running a quick-test which does not wipe and re-compile if it isn't needed, the setup time can be quite long.

Secondly, and this is largely my mistake in hindsight, the tests we've built lack in consistency. For instance, some tests create a profile in a beforeEach() hook, others do it individually on a per-test as-needed basis, etc. This makes working on tests a bit of a drag because extra effort needs to be done to validate the specific testing environment. This isn't enough of a problem on its own, but with the next point it can lead to some confusion.

Lastly, the tests lack in clarity. This again is largely my mistake, but because I opted for particularly verbose direct-to-contract calling in most cases, we're left with large difficult-to-read code blocks. As an example, look at the amount of times profile creation happens in the tests!

In order to improve the codebase's overall readability, I recommend either a large-scale refactor of test functions using helper functions (e.g: have helper functions like createProfile() with default values that can be overriden and call those instead of directly calling the contracts explicitly) or migrating the test suite over to Foundry.

Migrating to Foundry has the very likely benefit of speeding up tests significantly, in addition to the increased readability of tests written in solidity. This is a solution I'm pretty excited about, although it's very much a longer-term endeavor.

I'd love some input from integrators and everyone building atop the Lens Protocol, what do you think, folks?

need token

token will boost lensprotocol ecosysten

Error: ${USERID?} missing in Linux

Error with docker-compose right after pulling the repo

ERROR: Missing mandatory value for "user" option interpolating ${USERID?}:${USERID?} in service "contracts-env": USERID

Command: docker-compose up
Or: sudo docker-compose up

  • Ubuntu 20.04.3 LTS
  • Docker version 20.10.10

In fact this variable does not exist in my system.

Proposal of decentralized storage

I notice that Lens's publications has needs to integrate with dStorage, but I can't find from the code repo.

Publications have a ContentURI which points to the specific content the publication contains, this can point to text, an image, a video, or other arbitrary content stored on either a decentralized protocol such as IPFS or Arweave, or a centralized storage provider like AWS S3.

I was wondering if lens has any plan on integrating with IPFS, I can definitely contribute code.
I also have a proposal of integrating with IPFS incentive layer - Crust, that can help Lens' user easily permanently store the social media data in a totally decentralized way. Crust also be used in aave-ui, uniswap-interface and many NFTs/SocialFi/GamingFi projects.

`createProfile` should return `profileId`

For composability in smart contracts, it'd be incredibly useful if the createProfile call returned the newly created profileId. Current workaround is to use getProfileIdByHandle right after the call to createProfile.

feat(request): Add ability to invite

Motivation

Current Discussions indicate there is an unwillingness to add this feature
image

  • If the objective of a social media network is to onboard more people , a closed invite only system is ineffective

Solution

Add ability to invite in Lenster

Invalid Contract Adress or ENS name when running create-profile hardhat task

When i run "npx hardhat create-profile --network localhost", i get the following error msg in the command line:

reason : 'Invalid contract address or ENS name'
code : ' INVALID ARGUMENT'
argument: 'INVALID_ARGUMENT'
value: undefined

I follow along with the quick set up guide & i am stuck in the create-profile.ts phase.
Thx for any insights.

Setup : Ubuntu 22 & docker v20.10.17

Additional status for collect module

It is great to see the already available collect modules. With them, we can easily cover the general use cases of our app (b.trax).

Unfortunately, not to 100%. We'd need additional status for a collect.

In our app, sound files are attached to the publications, which musicians can buy (price from $0 - ...), for which we believe collecting is the correct Lens 'action' to use.

So far, so good.

But from here we have additional status to handle, like if the sound file was downloaded or used in a song by the musician, [edit] when (date) the publication was collected, and several more.
Now the question is, where to store this additional data. I don't see a way to do so in the collect module itself.

I'm happy to create a collect module that fits exactly to our use case, but I think this could be a feature that's potentially valuable outside our app.

So my question is, if you see a way to extend the collect module to hold additional status, or if it's better when I create a new module myself.

downsize `LensHub.sol`

The size of LensHub.sol 24.451Kb is pretty close to the limit size of contract 24576 bytes therefore some refactoring would be needed to free some space to add some more functionality in the future.

empty collect module address is undefined

Hi all, I am going through the docs and getting issues with creating posts

task('post', 'publishes a post').setAction(async ({}, hre) => {
  const [governance, , user] = await initEnv(hre);
  const addrs = getAddrs();
  
  const emptyCollectModuleAddr = addrs['empty collect module'];
  
  const lensHub = LensHub__factory.connect(addrs['lensHub proxy'], governance);
  
  await waitForTx(lensHub.whitelistCollectModule(emptyCollectModuleAddr, true)); // fails 
  
  ...

Unable to deploy the protocol - Cannot find '../typechain-types' issue

Hi ! I dev on windows, I already had issues with the Quick Setup guide when configuring the docker container.
I choosed not to use it and I got other issues for deploying the protocol in a local blockchain.

Here is what I got in the first terminal:
image
(This is in french but means SKIP_LOAD is not recognized as an internal or external control.)
image
I fixed that with "npm ci" in the first terminal and I got:
image
So I guess this is working fine and I just have to keep this window open and dev in another terminal.

I have the exact same issues in the second shell but couldn't fix it:
image
This "Cannot find module '../typechain-types'" issue is the same than previously. I try this:
image
image
And now I got issues with Hardhat (not recognized as internal or external control)..

I tried to set SKIP_LOAD value, to update full-deploy.ts file but nothing is working...
Thank you for your help, and tell me if you have further questions !

Adding Source Endpoint which returns a list of appIds

So right now there is no endpoint which returns list of appIds. As the lens is growing more and more apps built. So its really hard to keep track all those apps and the content which are published on it.

A source endpoint which returns a list of appIds and with the total publication count for that appId.

Unrecognized task unpause

Following along with the Quick Setup guide, I created an unpause.ts file in the tasks directory as stated (double checked that it was in the lens-protocol/tasks directory). The code in the file is identical to that in the guide:

import { task } from 'hardhat/config';
import { LensHub__factory } from '../typechain-types';
import { ProtocolState, waitForTx, initEnv, getAddrs } from './helpers/utils';

task('unpause', 'unpauses the protocol').setAction(async ({}, hre) => {
  const [governance] = await initEnv(hre);
  const addrs = getAddrs();
  const lensHub = LensHub__factory.connect(addrs['lensHub proxy'], governance);
  console.log(await lensHub.getState());
  await waitForTx(lensHub.setState(ProtocolState.Unpaused));
  console.log(await lensHub.getState());
});

When running this command as stated in the guide:

npx hardhat unpause --network localhost

I come across this error:

Error HH303: Unrecognized task unpause

For more info go to https://hardhat.org/HH303 or run Hardhat with --show-stack-traces

I have tried resetting my environment and everything, still no luck. Any guidance would be greatly appreciated. Thank you.

Allow user to follow from different profile `followFrom`

A lot of people have alts on Twitter. In Lens currently, to implement following from an alt, we need to make another Polygon transaction to call LensHub.setDefaultProfile. It seems very unnecessary when we could easily pass in the profile we intend to follow from, in the follow function.

Proposal: a function followFrom which allows you to follow from a different profile

    function followFrom(
        uint256 fromProfile,
        uint256[] calldata profileIds,
        bytes[] calldata followModuleDatas,
        address followNFTImpl,
        mapping(uint256 => DataTypes.ProfileStruct) storage _profileById,
        mapping(bytes32 => uint256) storage _profileIdByHandleHash
    ) external returns (uint256[] memory) {
       // Verify wallet is owner of fromProfile.
       // Proceed

Lens Protocol need orignal token

The Lens Protocol requires tokens to reach the threshold of a decentralized social network, using native tokens to pay fees and votes DAO.

Allow external services (EPNS) to hook into notification system

I would like to create a push notification server with EPNS. Currently, the Lens protocol notification API will only return notifications for the logged-in user.

In what ways could we allow authorized services to access notifications?
And once we've fixed that, perhaps rather than having to pull the API for changes, it would be ideal if we can use webhooks or WebSockets to listen for new notifications.

[Solved] Testing follow module is error

Hi all!
I followed the docs to test follow module
Task and module contract are copied from the document
But I got this error when I run task


Error: call revert exception (method="getFollowNFT(uint256)", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.5.0)
    at Logger.makeError (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/node_modules/@ethersproject/logger/src.ts/index.ts:225:28)
    at Logger.throwError (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/node_modules/@ethersproject/logger/src.ts/index.ts:237:20)
    at Interface.decodeFunctionResult (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/node_modules/@ethersproject/abi/src.ts/interface.ts:425:23)
    at Contract.<anonymous> (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/src.ts/index.ts:392:44)
    at step (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/lib/index.js:48:23)
    at Object.next (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/lib/index.js:29:53)
    at fulfilled (/Users/li/lens-protocol/node_modules/@ethersproject/contracts/lib/index.js:20:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  reason: null,
  code: 'CALL_EXCEPTION',
  method: 'getFollowNFT(uint256)',
  errorArgs: null,
  errorName: null,
  errorSignature: null,
  address: '0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8',
  args: [ 1 ],
  transaction: {
    data: '0xa9ec65630000000000000000000000000000000000000000000000000000000000000001',
    to: '0x1A1FEe7EeD918BD762173e4dc5EfDB8a78C924A8',
    from: '0xeAD9C93b79Ae7C1591b1FB5323BD777E86e150d4'
  }
}

Can anyone help me?

Issue following quick setup guide

I'm following the quick setup guide and getting the following error on step 3:

ERROR: Missing mandatory value for "user" option interpolating ${USERID?}:${USERID?} in service "contracts-env": USERID

As per the guide, I have only cloned the repo and setup a blank .env file.

Mac OSX 12.1 (21C52) (M1)
Docker version 20.10.13, build a224086
docker-compose version 1.29.2, build 5becea4c

claim.lens.xyz not working with VPN

When using PIA VPN, I would get the following errors. By turning off the VPN, the claiming was completed quickly.

image

(couldn't find a more relevant repo to open the issue)

[Question] JSON metadata for Lens Profile NFT

I have a question after reading this

Profiles have a specific URI associated with them, which is meant to include metadata, such as a link to a profile picture or a display name for instance, the JSON standard for this URI is not yet determined.

Is JSON metadata for Lens profile expected to conform to EIP-721 Metadata JSON Schema? If not, what other options are being considered?

Issue running npx hardhat node

After running:
npm i
I run npx hardhat node

And ge this error:

➜  lens-protocol git:(main) ✗ npx hardhat node                                                          
An unexpected error occurred:

tasks/full-deploy-verify.ts:25:8 - error TS2307: Cannot find module '../typechain-types' or its corresponding type declarations.

25 } from '../typechain-types';
          ~~~~~~~~~~~~~~~~~~~~

Able to setPublicationUri

We can use publications other than posts and comments like e-commerce products, communities etc

Some data are intended to change like we can update the image of the community or rename the product in e-commerce product

It would be great if it is able to update the metadata uri 🙏🏻

WDYT @Zer0dot 🙇🏻

Open Letter Signature

Only addresses affiliated with an open letter signature are eligible at this time.

I'm getting this error when I try to claim my handle?

I'm newbie.

Hany

Upgrade ethers to 6

Hi,

I'm running a remix project and have been running into issues with ethersv5 the tl;dr; is it doesn't support ESM

ethers-io/ethers.js#3158

The main issue is how things are imported. I'll work on a PR later this week.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.