**Lens Protocol - Manual Testing** ### Important Links **Hosted Service** - https://thegraph.com/hosted-service/subgraph/geewynn/lens **API** - https://api.thegraph.com/subgraphs/name/geewynn/looksrare-fee **Github** - https://github.com/geewynn/ #### Profiles - [x] **Get first 5 profile** **Polygon Link** https://etherscan.io/tx/0xd0474a605b36eabda38c71b4de1d8d03851b6fa84bbb3061bd444e1232919323#eventlog **Query** ``` { profiles(first: 5) { id creator _to handle totalPosts totalComments imageURI comments { id contentURI referenceModule timestamp transactionHash pubId profileIdPointed pubIdPointed profileId { id } } } } ``` **Result** ``` { "data": { "profiles": [ { "id": "1", "creator": "0xdab8b0559186c1cb7638b2d4239268cb9cf83ac5", "_to": "0x6c77a5a88c0ae712baeabe12fea81532060dcbf5", "handle": "lensprotocol", "totalPosts": "0", "totalComments": "0", "imageURI": "", "comments": [] }, { "id": "10", "creator": "0x1eec6eccaa4625da3fa6cd6339dbcc2418710e8a", "_to": "0xca1f6d7d8e902617f8bdd87866e00f9844c40a77", "handle": "jouni.lens", "totalPosts": "0", "totalComments": "0", "imageURI": "", "comments": [] }, { "id": "100", "creator": "0x1eec6eccaa4625da3fa6cd6339dbcc2418710e8a", "_to": "0xe5a182aac2cde5b5d98b11c75ec7a0561bbe0639", "handle": "brainjammer.lens", "totalPosts": "0", "totalComments": "0", "imageURI": "", "comments": [] }, { "id": "1000", "creator": "0x1eec6eccaa4625da3fa6cd6339dbcc2418710e8a", "_to": "0x1ce5f3c6db1c42e12b6cf8e644431c861a4a54c9", "handle": "blackhorse_alex.lens", "totalPosts": "0", "totalComments": "0", "imageURI": "", "comments": [] }, { "id": "1001", "creator": "0x1eec6eccaa4625da3fa6cd6339dbcc2418710e8a", "_to": "0x8e352df0462a31ca103bcef5ac6dec7548955767", "handle": "pk2077.lens", "totalPosts": "0", "totalComments": "0", "imageURI": "", "comments": [] } ] } } ``` - [x] **Posts** **Get the first 5 posts** **Query** ``` { posts(first: 5) { collectModule collectModuleReturnData contentURI id datePosted profileId { id } pubId referenceModule referenceModuleReturnData } } ``` **Result** ``` { "data": { "posts": [ { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "collectModuleReturnData": "0x0000000000000000000000000000000000000000000000000000000000000000", "contentURI": "https://ipfs.infura.io/ipfs/QmeBL9KYzjBKmbKGevCTNtM52JC3nrMe9nXtkTP1FeT1JX", "id": "0x000a36b2db1cf0cf1076dbcfb32d60e40d48b292aecb01b4e8c49a9b605b81414a000000", "datePosted": "1652920075", "profileId": { "id": "3852" }, "pubId": "1", "referenceModule": "0x0000000000000000000000000000000000000000", "referenceModuleReturnData": "0x" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "collectModuleReturnData": "0x0000000000000000000000000000000000000000000000000000000000000000", "contentURI": "https://ipfs.infura.io/ipfs/QmYypZnZjwJApDr8YAJAvRiw3AJaemK2mdxLs2fWJFw9nu", "id": "0x002ccaeaf2f313bc6a97db48e81d9dbab9d001e8b01077353e7985e26cbe4ba9ed000000", "datePosted": "1652902628", "profileId": { "id": "3776" }, "pubId": "1", "referenceModule": "0x0000000000000000000000000000000000000000", "referenceModuleReturnData": "0x" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "collectModuleReturnData": "0x0000000000000000000000000000000000000000000000000000000000000000", "contentURI": "https://ipfs.infura.io/ipfs/Qmd3yYhZ8kwpKiPhDFPCghZ5PFmRLSSheVzvRGprkJvW1t", "id": "0x0124ab1145bcff4559e234470588e0d3ada551e8eb179a30a640ef2804134eba7e000000", "datePosted": "1652889124", "profileId": { "id": "1314" }, "pubId": "4", "referenceModule": "0x0000000000000000000000000000000000000000", "referenceModuleReturnData": "0x" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "collectModuleReturnData": "0x0000000000000000000000000000000000000000000000000000000000000000", "contentURI": "https://ipfs.infura.io/ipfs/QmQMgZYzpGrWLKpzsAewybfNbx1ntwfFKBzNhdeoGAefTd", "id": "0x014e865c5bae75947c2cc6c2a258c4873b324e37042256950ce8f24acea0260d9d000000", "datePosted": "1652898830", "profileId": { "id": "3402" }, "pubId": "3", "referenceModule": "0x0000000000000000000000000000000000000000", "referenceModuleReturnData": "0x" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "collectModuleReturnData": "0x0000000000000000000000000000000000000000000000000000000000000000", "contentURI": "https://ipfs.infura.io/ipfs/QmV1VZFuBigRr8CFk1vDfPv6vexSPyU3mRfYyeF8nEpdf5", "id": "0x01558b6797874869ca2acb1f6a1c0c2027ee013fa9b8969ffd10649ff7b891952c010000", "datePosted": "1652885186", "profileId": { "id": "35" }, "pubId": "2", "referenceModule": "0x0000000000000000000000000000000000000000", "referenceModuleReturnData": "0x" } ] } } ``` - [x] **Comments** get the first 5 Comments **Polygonscan Link** * https://polygonscan.com/tx/0x00881a796830d3d429cfef51dda087e506d6d057c71376e3951743f39264f02c * https://polygonscan.com/tx/0x00c4ef434c8161b665b8c3bdeba4fe300fe7942359b07c601c171e37d6092eec * https://polygonscan.com/tx/0x0155284c48db6145a754142bebc455b6a9cb7ab6585d6a3eb1fdc49c0f42de65 * https://polygonscan.com/tx/0x01841e96bb45214478926ae94a4fd203a507bb2b82782ca2038e6a447fb74b58 * https://polygonscan.com/tx/0x01be8be6c55935cb72aed443dbecd23662dd447cad74cbf40ab467e372c70959 **Query** ``` { commentCreateds(first: 5) { collectModule contentURI id profileId { id } profileIdPointed pubId pubIdPointed timestamp transactionHash referenceModule } } ``` **Result** ``` { "data": { "commentCreateds": [ { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "contentURI": "https://ipfs.infura.io/ipfs/QmQrupRhEqu4yuqZCvDxgmrhGwLoo9ztT5Er9CYF9DACNJ", "id": "0x00881a796830d3d429cfef51dda087e506d6d057c71376e3951743f39264f02cba000000", "profileId": { "id": "87" }, "profileIdPointed": "1581", "pubId": "2", "pubIdPointed": "5", "timestamp": "1652967466", "transactionHash": "0x00881a796830d3d429cfef51dda087e506d6d057c71376e3951743f39264f02c", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "contentURI": "https://ipfs.infura.io/ipfs/Qmcf7rinog6yu9iKbR8czz3WawtrZc4YLasMS3HpTqssme", "id": "0x00c4ef434c8161b665b8c3bdeba4fe300fe7942359b07c601c171e37d6092eec4a010000", "profileId": { "id": "2007" }, "profileIdPointed": "12", "pubId": "3", "pubIdPointed": "1", "timestamp": "1652959016", "transactionHash": "0x00c4ef434c8161b665b8c3bdeba4fe300fe7942359b07c601c171e37d6092eec", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "contentURI": "https://ipfs.infura.io/ipfs/QmUS9f24h3SbW5RDnnHDo2g2GHmhd5YxHXRXnuojc8UCF7", "id": "0x0155284c48db6145a754142bebc455b6a9cb7ab6585d6a3eb1fdc49c0f42de6567000000", "profileId": { "id": "323" }, "profileIdPointed": "4108", "pubId": "25", "pubIdPointed": "3", "timestamp": "1652930472", "transactionHash": "0x0155284c48db6145a754142bebc455b6a9cb7ab6585d6a3eb1fdc49c0f42de65", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "contentURI": "https://ipfs.infura.io/ipfs/QmbBk5S2g14B8ZgnsMoKDCA5L8zFx5XxhMj2DFBDSTXzff", "id": "0x01841e96bb45214478926ae94a4fd203a507bb2b82782ca2038e6a447fb74b589d000000", "profileId": { "id": "583" }, "profileIdPointed": "377", "pubId": "7", "pubIdPointed": "2", "timestamp": "1652944236", "transactionHash": "0x01841e96bb45214478926ae94a4fd203a507bb2b82782ca2038e6a447fb74b58", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "collectModule": "0x23b9467334beb345aaa6fd1545538f3d54436e96", "contentURI": "https://ipfs.infura.io/ipfs/QmWyVxRvtdQF3Rcina8mQj7ELgz5GeCqS3NEAn7w7sYxXm", "id": "0x01be8be6c55935cb72aed443dbecd23662dd447cad74cbf40ab467e372c709599d000000", "profileId": { "id": "1262" }, "profileIdPointed": "1262", "pubId": "9", "pubIdPointed": "7", "timestamp": "1652896742", "transactionHash": "0x01be8be6c55935cb72aed443dbecd23662dd447cad74cbf40ab467e372c70959", "referenceModule": "0x0000000000000000000000000000000000000000" } ] } } ``` - [x] **Followed** Query to return first 5 followed account **Polygonscan Link** * https://polygonscan.com/tx/0x0002cd01741badc856aea7f9c1921a562878936c5ef1f65facd0d90a35a5540d * https://polygonscan.com/tx/0x000421f8f36d9e2f77e5b85c9f0768a92950993301ded4c731d14242155367bd * https://polygonscan.com/tx/0x00045cce2c77bcc2338cff527a0691747766c2ef9307d22f9b9daf72e670b331 * https://polygonscan.com/tx/0x00057a711e1f7e3177d60ea3a6addc483333162acba2624ba7fd555588536efa * https://polygonscan.com/tx/0x00074ffc1ca4130e903844541ee51660a7565107fc1e9e1b2d76ce26c0902661 **Query** ``` { followeds(first: 5) { followModuleDatas follower id transactionHash timestamp profileIds { id } } } ``` **Result** ``` { "data": { "followeds": [ { "followModuleDatas": [ "0x" ], "follower": "0xd157bc43016e1c245bd2ac92bbbd3f5445000001", "id": "0x0002cd01741badc856aea7f9c1921a562878936c5ef1f65facd0d90a35a5540d75000000", "transactionHash": "0x0002cd01741badc856aea7f9c1921a562878936c5ef1f65facd0d90a35a5540d", "timestamp": "1652932112", "profileIds": [ { "id": "204" } ] }, { "followModuleDatas": [ "0x" ], "follower": "0x472f916934161be833e924da2f31b8100f321ed1", "id": "0x000421f8f36d9e2f77e5b85c9f0768a92950993301ded4c731d14242155367bd7d000000", "transactionHash": "0x000421f8f36d9e2f77e5b85c9f0768a92950993301ded4c731d14242155367bd", "timestamp": "1652939363", "profileIds": [ { "id": "1247" } ] }, { "followModuleDatas": [ "0x" ], "follower": "0x33a0e472b4f408ae4ac79b4a1a43f3ccdc93faa2", "id": "0x00045cce2c77bcc2338cff527a0691747766c2ef9307d22f9b9daf72e670b33145000000", "transactionHash": "0x00045cce2c77bcc2338cff527a0691747766c2ef9307d22f9b9daf72e670b331", "timestamp": "1652891214", "profileIds": [ { "id": "2201" } ] }, { "followModuleDatas": [ "0x" ], "follower": "0x235fb978fce02c0d4f712da59af9ac730ca86372", "id": "0x00057a711e1f7e3177d60ea3a6addc483333162acba2624ba7fd555588536efa7e000000", "transactionHash": "0x00057a711e1f7e3177d60ea3a6addc483333162acba2624ba7fd555588536efa", "timestamp": "1652941481", "profileIds": [ { "id": "1688" } ] }, { "followModuleDatas": [ "0x" ], "follower": "0x26c774c3a772f9222c89c3d201e40e395c962b0a", "id": "0x00074ffc1ca4130e903844541ee51660a7565107fc1e9e1b2d76ce26c09026615f000000", "transactionHash": "0x00074ffc1ca4130e903844541ee51660a7565107fc1e9e1b2d76ce26c0902661", "timestamp": "1652924139", "profileIds": [ { "id": "4558" } ] } ] } } ``` - [x] **Mirrors** Query to return first 5 Mirrored Post **Polygonscan Link** * https://polygonscan.com/tx/0x0002cd01741badc856aea7f9c1921a562878936c5ef1f65facd0d90a35a5540d * https://polygonscan.com/tx/0x000421f8f36d9e2f77e5b85c9f0768a92950993301ded4c731d14242155367bd * https://polygonscan.com/tx/0x00045cce2c77bcc2338cff527a0691747766c2ef9307d22f9b9daf72e670b331 * https://polygonscan.com/tx/0x00057a711e1f7e3177d60ea3a6addc483333162acba2624ba7fd555588536efa * https://polygonscan.com/tx/0x00074ffc1ca4130e903844541ee51660a7565107fc1e9e1b2d76ce26c0902661 **Query** ``` { mirrors(first: 5) { dateCreated id profileId { id handle } profileIdPointed pubId pubIdPointed referenceModule } } ``` **Result** ``` { "data": { "mirrors": [ { "dateCreated": "1652967972", "id": "0x01d1822749eea64980514f0f57f2bc2386e188e78f9e18ffc7f3aac15821320e4f040000", "profileId": { "id": "87", "handle": "0xtrk34.lens" }, "profileIdPointed": "1", "pubId": "3", "pubIdPointed": "1", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "dateCreated": "1652972185", "id": "0x020d421330108565fede1dd6af15489ec6b23f85097ea9ff078b019f3c3de2655b000000", "profileId": { "id": "7572", "handle": "trinksalecia.lens" }, "profileIdPointed": "1982", "pubId": "2", "pubIdPointed": "3", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "dateCreated": "1652888262", "id": "0x02cc1d58e5b1089fe3d2703453b1335e8db0df394c500f7aa9cbcf4483bde607bd000000", "profileId": { "id": "894", "handle": "waltermitty.lens" }, "profileIdPointed": "5", "pubId": "2", "pubIdPointed": "1", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "dateCreated": "1652884694", "id": "0x059f2e75f4c1affa53321bd24522b8f021d4d0eeecc7468e9dc79eebcd4969508c010000", "profileId": { "id": "862", "handle": "reivaxc.lens" }, "profileIdPointed": "5", "pubId": "2", "pubIdPointed": "1", "referenceModule": "0x0000000000000000000000000000000000000000" }, { "dateCreated": "1652885668", "id": "0x05b2c03e401e25d7fdcef8294bd83668b3f5dbb40c0ce2e0eb33f04d708804eb64000000", "profileId": { "id": "67", "handle": "abstract.lens" }, "profileIdPointed": "1", "pubId": "1", "pubIdPointed": "1", "referenceModule": "0x0000000000000000000000000000000000000000" } ] } } ```