{"id":13288170,"url":"https://github.com/mstable/mStable-subgraphs-monorepo","last_synced_at":"2025-03-10T05:32:11.128Z","repository":{"id":43008670,"uuid":"305312533","full_name":"mstable/mStable-subgraphs-monorepo","owner":"mstable","description":"🌐 All mStable subgraphs in one handy monorepo.","archived":false,"fork":false,"pushed_at":"2022-10-03T09:10:07.000Z","size":1244,"stargazers_count":16,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-29T16:58:22.229Z","etag":null,"topics":["assemblyscript","defi","ethereum","graphprotocol","graphql","subgraph"],"latest_commit_sha":null,"homepage":"https://mstable.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mstable.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}},"created_at":"2020-10-19T08:20:41.000Z","updated_at":"2024-04-21T11:12:22.000Z","dependencies_parsed_at":"2023-01-19T02:45:53.872Z","dependency_job_id":null,"html_url":"https://github.com/mstable/mStable-subgraphs-monorepo","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/mstable%2FmStable-subgraphs-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstable%2FmStable-subgraphs-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstable%2FmStable-subgraphs-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mstable%2FmStable-subgraphs-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mstable","download_url":"https://codeload.github.com/mstable/mStable-subgraphs-monorepo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242798225,"owners_count":20186882,"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":["assemblyscript","defi","ethereum","graphprotocol","graphql","subgraph"],"created_at":"2024-07-29T16:55:00.262Z","updated_at":"2025-03-10T05:32:10.655Z","avatar_url":"https://github.com/mstable.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mStable Subgraphs\n\nAll [mStable](https://mstable.org) subgraphs in one handy repo.\n\n\u003ca href=\"https://www.youtube.com/watch?v=l0vrsO3_HpU\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/mstable/mStable-subgraphs-monorepo/master/graphtasia.png\" width=\"430\" /\u003e\u003c/a\u003e\n\n## Installation\n\nThis project uses [Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) and [Lerna](https://github.com/lerna/lerna).\n\n```bash\n# First enable yarn workspaces if needed\nyarn config set workspaces-experimental true\n# Install and link\nyarn\nyarn lerna bootstrap --force-local \u0026\u0026 yarn lerna link --force-local\n# Prepare all the subgraphs for the first time\nyarn prepare:config\n```\n\n## Packages\n\n- `@mstable/subgraph-utils`\n  - Schemas/entities for shared items (e.g. Metrics, Tokens)\n  - Utilities for interacting with data types and performing conversions \n  - Scripts for e.g. merging GraphQL schemas\n- `@mstable/protocol-subgraph`\n  - Subgraph for the mStable protocol\n  - Encompasses mAssets, bAssets, saving contracts, and metrics\n- `@mstable/governance-subgraph`\n  - Subgraph for mStable governance contracts\n  - Encompasses MTA staking, staking rewards, voting power, and metrics\n- `@mstable/ecosystem-subgraph`\n  - Subgraph for mStable's wider ecosystem\n  - Encompasses EARN pools, Merkle drops, pool fund management, and metrics\n\n\n## Development\n\n- GraphQL types in `packages/utils` are stitched together with `yarn codegen` (in that directory).\n- These types can be consumed in other packages with import comments (e.g. `# import Token`); the schema for each subgraph is created via codegen. \n- Each subgraph shares the same config (for different networks) and can be prepared and deployed for the chosen network.\n\n### Preparing the subgraph for other networks\n\n```bash\n# Configures the subgraph for the mainnet and polygon\nyarn prepare:config\n# Change the network to the testnet\ncd packages/protocol\nyarn prepare:ropsten\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstable%2FmStable-subgraphs-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmstable%2FmStable-subgraphs-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmstable%2FmStable-subgraphs-monorepo/lists"}