{"id":18492987,"url":"https://github.com/graphprotocol/memefactory-subgraph","last_synced_at":"2025-07-31T23:09:51.172Z","repository":{"id":33041148,"uuid":"138928148","full_name":"graphprotocol/memefactory-subgraph","owner":"graphprotocol","description":"Memefactory subgraph for The Graph","archived":false,"fork":false,"pushed_at":"2022-03-23T00:15:41.000Z","size":3436,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-23T18:51:48.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-27T20:10:52.000Z","updated_at":"2019-03-27T20:54:03.000Z","dependencies_parsed_at":"2022-08-07T19:30:30.777Z","dependency_job_id":null,"html_url":"https://github.com/graphprotocol/memefactory-subgraph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fmemefactory-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fmemefactory-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fmemefactory-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fmemefactory-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphprotocol","download_url":"https://codeload.github.com/graphprotocol/memefactory-subgraph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247939705,"owners_count":21021831,"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":[],"created_at":"2024-11-06T13:12:07.939Z","updated_at":"2025-04-08T22:30:31.669Z","avatar_url":"https://github.com/graphprotocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Meme Factory Subgraph\n\n[Meme Factory](https://memefactory.io/) subgraph for [The Graph](https://thegraph.com).\n\n## Getting started\n\nLike other subgraphs, the Meme Factory subgraph is built with\n\n```sh\n# Once (installs dependencies)\nyarn\n\n# Each time you want to build\nyarn build-ipfs [--verbosity debug]\n```\n\nHowever, in order to index the subgraph, [graph-node](https://github.com/graphprotocol/graph-node) needs to run against\na Ganache testnet rather than a real Ethereum node. This is because\nthe Meme Factory contracts have not been deployed to a public\nEthereum network yet and we need some test data and events to\nindex.\n\n### Running the testnet\n\nIn order to bring up the Ganache testnet, run the following two\ncommands:\n\n```sh\n# Once\ntar xf ganache-db.tar.bz2\n\n# Each time\nyarn testnet\n```\n\nThis will run Ganache on `http://localhost:8546`, allowing to run\ngraph-node as follows:\n\n```sh\ngraph-node                             \\\n  ...                                  \\\n  --ethereum-rpc http://localhost:8546 \\\n  --subgraph IPFS_HASH\n```\n\n## TODO\n\n1. Identify if there are other contracts/events we should watch\n1. Identify how to handle remaining types and fields (see questions in GraphQL schema)\n\n## Missing features already identified\n\n- GraphQL interfaces\n- `BigInt` math (required for adding votes for and votes against in challenges)\n- Aggregation / counting\n\n## Reference\n\nThis subgraph manifest is based on the following MemeFactory resources:\n\n* [Contracts](https://github.com/district0x/memefactory/tree/master/resources/public/contracts/src)\n* [GraphQL schema](https://github.com/district0x/memefactory/blob/master/src/memefactory/shared/graphql_schema.cljs)\n* [Syncer with event processing](https://github.com/district0x/memefactory/blob/master/src/memefactory/server/syncer.cljs)\n\n## Useful GraphQL queries\n\n```graphql\n{\n  users {\n    id\n    user_address\n  }\n  memes {\n    id\n    regEntry_address\n    regEntry_status\n    regEntry_version\n    regEntry_creator {\n      id\n      user_address\n    }\n    regEntry_deposit\n    regEntry_createdOn\n    regEntry_challengePeriodEnd\n    challenge_comment\n    challenge_votesFor\n    challenge_createdOn\n    challenge_challenger {\n      id\n      user_address\n    }\n    challenge_rewardPool\n    challenge_votesTotal\n    challenge_votesAgainst\n    challenge_commitPeriodEnd\n    challenge_claimedRewardOn\n    challenge_revealPeriodEnd\n  }\n  memeVotes {\n    id\n    vote_option\n    vote_amount\n    vote_createdOn\n    vote_secretHash\n    vote_revealedOn\n    vote_claimedRewardOn\n    vote_meme {\n      id\n      challenge_votes {\n        id\n      }\n    }\n  }\n  paramChanges {\n    id\n    regEntry_address\n    regEntry_status\n    regEntry_version\n    regEntry_creator {\n      id\n      user_address\n    }\n    regEntry_deposit\n    regEntry_createdOn\n    regEntry_challengePeriodEnd\n    challenge_comment\n    challenge_votesFor\n    challenge_createdOn\n    challenge_challenger {\n      id\n      user_address\n    }\n    challenge_rewardPool\n    challenge_votesTotal\n    challenge_votesAgainst\n    challenge_commitPeriodEnd\n    challenge_claimedRewardOn\n    challenge_revealPeriodEnd\n  }\n  users {\n    id\n    user_address\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fmemefactory-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphprotocol%2Fmemefactory-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fmemefactory-subgraph/lists"}