{"id":28178522,"url":"https://github.com/slycompiler/lens-substream","last_synced_at":"2025-07-18T17:03:42.578Z","repository":{"id":239257036,"uuid":"784419414","full_name":"slycompiler/lens-substream","owner":"slycompiler","description":"Decentralized social-media data streaming with Rust (Best New Subgraph @ ETH Prague 2023)","archived":false,"fork":false,"pushed_at":"2024-04-09T20:16:26.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T09:48:34.290Z","etag":null,"topics":["lens-protocol","rust","substreams"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slycompiler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-09T20:15:47.000Z","updated_at":"2024-10-07T08:31:24.000Z","dependencies_parsed_at":"2024-05-11T03:25:07.167Z","dependency_job_id":"b019ad30-c33a-45a7-8eb4-2819c14d5209","html_url":"https://github.com/slycompiler/lens-substream","commit_stats":null,"previous_names":["hardworking-toptal-dev/lens-substream","slycompiler/lens-substream"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slycompiler/lens-substream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slycompiler%2Flens-substream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slycompiler%2Flens-substream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slycompiler%2Flens-substream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slycompiler%2Flens-substream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slycompiler","download_url":"https://codeload.github.com/slycompiler/lens-substream/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slycompiler%2Flens-substream/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265797991,"owners_count":23829868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lens-protocol","rust","substreams"],"created_at":"2025-05-16T01:12:38.377Z","updated_at":"2025-07-18T17:03:42.568Z","avatar_url":"https://github.com/slycompiler.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lens Substream\n\nA Rusty way to stream Lens data using Substreams.\n\n---\n\nDecentralized social media generates a huge amount of on-chain data. This on-chain data needs a low-latency interface\nfor it to remain accessible for all, along with adding the ability to perform real-time analysis and monitoring.\n\nSubstreams are a data solution developed for The Graph Network. They allow developers to write Rust modules composing\ndata streams with low-cost caching and archiving of blockchain data, high throughput processing, and cursor-based reorgs\nhandling.\n\nThis project builds a (basic) Substream in Rust to monitor on-chain Lens protocol data and provide a low-latency data\nstreaming interface. Potential uses of such a tool could be for real-time analysis and monitoring of Lens data. Since\nSubstreams are streamed, the data can be directly injected into a variety of databases (BigQuery, Clickhouse,\nKafka etc.), opening up a lot of distinct analytics use cases.\n\nA few unrelated citations:\n\n1. [Gizmodo: Here Are 30 of the Hundreds of Subreddits Going Dark to Protest Reddit's API Changes](https://gizmodo.com/reddit-subreddit-api-r-gaming-1850510180)\n2. [Verge: Twitter just closed the book on academic research](https://www.theverge.com/2023/5/31/23739084/twitter-elon-musk-api-policy-chilling-academic-research)\n3. [9to5Google: Reddit’s API changes kill Android’s best third-party apps, including RIF and Sync](https://9to5google.com/2023/06/08/reddit-android-third-party-apps/)\n\n## Installation\n\n1. [Copy this repo](https://github.com/dineshpinto/lens-substreams/generate)\n2. Get an API key from [StreamingFast](https://app.streamingfast.io/)\n3. Install the [Substreams CLI](https://substreams.streamingfast.io/getting-started/installing-the-cli)\n4. Add the API key to your environment variables\n\n```bash\nexport STREAMINGFAST_KEY='xxx'\nexport SUBSTREAMS_API_TOKEN=$(curl https://auth.streamingfast.io/v1/auth/issue -s --data-binary '{\"api_key\":\"'$STREAMINGFAST_KEY'\"}' | jq -r .token)\n```\n\n### Using Makefile defaults\n\n```bash\nmake codegen\nmake build\nmake stream\n```\n\n### Manual compilation\n\n#### Generate protobuf\n\n```bash\nsubstreams protogen ./substreams.yaml --exclude-paths=\"sf/substreams,google\"\n```\n\n#### Compile\n\n```bash\ncargo build --target wasm32-unknown-unknown --release\n```\n\n#### Start Substream\n\n```bash\nsubstreams run -e polygon.streamingfast.io:443 substreams.yaml map_transfers -s 43764445 -t 100\n```\n\n## Limitations\n\n- `Tuples` are not currently supported by `rust-ethereum/ethabi` (\n  see [open issue](https://github.com/openethereum/ethabi/issues/175)),\n  so they have been removed from the Lens Protocol Profiles (LPP) ABI. Currently, only implements protobuf interfaces\n  for Lens collects and mirrors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslycompiler%2Flens-substream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslycompiler%2Flens-substream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslycompiler%2Flens-substream/lists"}