From c3ffbe73ddc29ec74f99052fae5a05b8cd4abb7a Mon Sep 17 00:00:00 2001 From: Idalith <126833353+idalithb@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:34:10 -0800 Subject: [PATCH 1/3] Update README.md --- examples/README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/examples/README.md b/examples/README.md index 6800e1bc9..f3eca4b8b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,49 @@ # Example Subgraphs -A collection of subgraph examples to help developers get started with The Graph. Please see -[the documentation](https://thegraph.com/docs) for more information. +This section contains several subgraph examples to help you get started with [The Graph](https://thegraph.com/). Each example demonstrates specific configurations and assumes basic familiarity with subgraph components. + +## Table of Contents + +1. **[Aggregations](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/aggregations)** + This subgraph demonstrates how to aggregate data using block numbers as predictable values. Comments in the schema, subgraph manifest, and mappings provide guidance for implementing custom aggregations. + +2. **[Arweave Blocks and Transactions](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/arweave-blocks-transactions)** + This subgraph indexes blocks, transactions, tags, and POAs on the Arweave blockchain. Requires `graph-cli` version 0.30.2 or above to build. + +3. **[Cosmos Block Filtering](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-block-filtering)** + This subgraph stores `Block` objects that represent blocks appended to a Cosmos chain, saving only the block number and timestamp to the store. + +4. **[Cosmos Osmosis Token Swaps](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-osmosis-token-swaps)** + This subgraph stores `TokenSwap` objects that represent token swaps made using the Generalized Automated Market Maker (GAMM) in the Osmosis chain. + +5. **[Cosmos Validator Delegations](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-validator-delegations)** + This subgraph stores `Delegation` objects representing validator delegations on a Cosmos chain. + +6. **[Cosmos Validator Rewards](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-validator-rewards)** + This example stores `Reward` objects representing rewards received by validators on a Cosmos chain. + +7. **[Ethereum Basic Event Handlers](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/ethereum-basic-event-handlers)** + This subgraph shows how to handle basic events on the Ethereum blockchain using **The Graph**. It provides a practical implementation of event handlers, showcasing how to index and query blockchain data. + +8. **[Ethereum Gravatar](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/ethereum-gravatar)** + This subgraph indexes data from the Ethereum Gravatar smart contract. Gravatar is a service where users can create and manage globally unique avatars. + +9. **[Example Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/example-subgraph)** + This subgraph shows the structure of a minimal subgraph. It provides a generic setup with a simple contract and schema designed to teach the fundamentals of defining, mapping, and querying subgraph data. + +10. **[Matic Lens Protocol Posts Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/matic-lens-protocol-posts-subgraph)** + This example demonstrates how to index data from the Lens Protocol deployed on the Polygon (Matic) network. + +11. **[NEAR Blocks](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/near-blocks)** + This subgraph indexes blockchain data from the NEAR Protocol. It listens to block-related events and stores key data such as block number, timestamp, and hash in a queryable format. + +12. **[NEAR Receipts](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/near-receipts)** + This subgraph indexes transaction receipts from the NEAR Protocol. It tracks and stores receipt data such as transaction hash, status, and execution details. + +13. **[Substreams Powered Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/substreams-powered-subgraph)** + This is a basic Substreams-powered subgraph, which includes the Substreams definition. It tracks new contract deployments on Ethereum and demonstrates integration with Graph Node using `substreams_entity_change` types and helpers. + +To learn more about subgraphs, review [subgraphs]( https://thegraph.com/docs/en/subgraphs/developing/subgraphs/) on [The Graph docs]( https://thegraph.com/docs/en/). + + + From ecd06927d8ecf7ad6dd71aa06b25326267bf4640 Mon Sep 17 00:00:00 2001 From: Idalith <126833353+idalithb@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:40:04 -0800 Subject: [PATCH 2/3] Update README.md --- examples/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/README.md b/examples/README.md index f3eca4b8b..1adef87bc 100644 --- a/examples/README.md +++ b/examples/README.md @@ -5,43 +5,43 @@ This section contains several subgraph examples to help you get started with [Th ## Table of Contents 1. **[Aggregations](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/aggregations)** - This subgraph demonstrates how to aggregate data using block numbers as predictable values. Comments in the schema, subgraph manifest, and mappings provide guidance for implementing custom aggregations. + This example demonstrates how to aggregate data using block numbers as predictable values. The comments in the schema, subgraph manifest, and mappings provide guidance for implementing custom aggregations. 2. **[Arweave Blocks and Transactions](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/arweave-blocks-transactions)** - This subgraph indexes blocks, transactions, tags, and POAs on the Arweave blockchain. Requires `graph-cli` version 0.30.2 or above to build. + This example indexes blocks, transactions, tags, and POAs on the Arweave blockchain. Please note that it requires `graph-cli` version 0.30.2 or above to build. 3. **[Cosmos Block Filtering](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-block-filtering)** - This subgraph stores `Block` objects that represent blocks appended to a Cosmos chain, saving only the block number and timestamp to the store. + This example stores `Block` objects that represent blocks appended to a Cosmos chain, saving only the block number and timestamp to the store. 4. **[Cosmos Osmosis Token Swaps](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-osmosis-token-swaps)** - This subgraph stores `TokenSwap` objects that represent token swaps made using the Generalized Automated Market Maker (GAMM) in the Osmosis chain. + This example stores `TokenSwap` objects that represent token swaps made using the Generalized Automated Market Maker (GAMM) in the Osmosis chain. 5. **[Cosmos Validator Delegations](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-validator-delegations)** - This subgraph stores `Delegation` objects representing validator delegations on a Cosmos chain. + This example stores `Delegation` objects representing validator delegations on a Cosmos chain. 6. **[Cosmos Validator Rewards](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-validator-rewards)** This example stores `Reward` objects representing rewards received by validators on a Cosmos chain. 7. **[Ethereum Basic Event Handlers](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/ethereum-basic-event-handlers)** - This subgraph shows how to handle basic events on the Ethereum blockchain using **The Graph**. It provides a practical implementation of event handlers, showcasing how to index and query blockchain data. + This example shows how to handle basic events on the Ethereum blockchain using The Graph. It provides a practical implementation of event handlers, showcasing how to index and query blockchain data. 8. **[Ethereum Gravatar](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/ethereum-gravatar)** - This subgraph indexes data from the Ethereum Gravatar smart contract. Gravatar is a service where users can create and manage globally unique avatars. + This example indexes data from the Ethereum Gravatar smart contract. Gravatar is a service where users can create and manage globally unique avatars. 9. **[Example Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/example-subgraph)** - This subgraph shows the structure of a minimal subgraph. It provides a generic setup with a simple contract and schema designed to teach the fundamentals of defining, mapping, and querying subgraph data. + This example shows the structure of a minimal,basic subgraph. It provides a generic setup with a simple contract and schema designed to teach the fundamentals of defining, mapping, and querying subgraph data. 10. **[Matic Lens Protocol Posts Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/matic-lens-protocol-posts-subgraph)** This example demonstrates how to index data from the Lens Protocol deployed on the Polygon (Matic) network. 11. **[NEAR Blocks](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/near-blocks)** - This subgraph indexes blockchain data from the NEAR Protocol. It listens to block-related events and stores key data such as block number, timestamp, and hash in a queryable format. + This example indexes blockchain data from the NEAR Protocol. It listens to block-related events and stores key data such as block number, timestamp, and hash in a queryable format. 12. **[NEAR Receipts](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/near-receipts)** - This subgraph indexes transaction receipts from the NEAR Protocol. It tracks and stores receipt data such as transaction hash, status, and execution details. + This example indexes transaction receipts from the NEAR Protocol. It tracks and stores receipt data such as transaction hash, status, and execution details. 13. **[Substreams Powered Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/substreams-powered-subgraph)** - This is a basic Substreams-powered subgraph, which includes the Substreams definition. It tracks new contract deployments on Ethereum and demonstrates integration with Graph Node using `substreams_entity_change` types and helpers. + This example is a basic Substreams-powered subgraph, which includes the Substreams definition. It tracks new contract deployments on Ethereum and demonstrates integration with Graph Node using `substreams_entity_change` types and helpers. To learn more about subgraphs, review [subgraphs]( https://thegraph.com/docs/en/subgraphs/developing/subgraphs/) on [The Graph docs]( https://thegraph.com/docs/en/). From 4d289d2d8212eca763be6b1975bc71655475446a Mon Sep 17 00:00:00 2001 From: YaroShkvorets Date: Mon, 3 Feb 2025 17:23:55 -0500 Subject: [PATCH 3/3] fix lint --- .prettierrc.js | 16 ++++++++++++++++ .prettierrc.json | 1 - examples/README.md | 5 +---- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .prettierrc.js delete mode 100644 .prettierrc.json diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 000000000..c980757b9 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,16 @@ +import prettierConfig from '@theguild/prettier-config'; + +export default { + ...prettierConfig, + overrides: [ + ...(prettierConfig.overrides || []), + { + files: '*.md{,x}', + options: { + semi: false, + trailingComma: 'none', + proseWrap: 'preserve', + }, + }, + ], +}; diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 8ec0bdc6c..000000000 --- a/.prettierrc.json +++ /dev/null @@ -1 +0,0 @@ -"@theguild/prettier-config" diff --git a/examples/README.md b/examples/README.md index 1adef87bc..8dc4ee944 100644 --- a/examples/README.md +++ b/examples/README.md @@ -43,7 +43,4 @@ This section contains several subgraph examples to help you get started with [Th 13. **[Substreams Powered Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/substreams-powered-subgraph)** This example is a basic Substreams-powered subgraph, which includes the Substreams definition. It tracks new contract deployments on Ethereum and demonstrates integration with Graph Node using `substreams_entity_change` types and helpers. -To learn more about subgraphs, review [subgraphs]( https://thegraph.com/docs/en/subgraphs/developing/subgraphs/) on [The Graph docs]( https://thegraph.com/docs/en/). - - - +To learn more about subgraphs, review [subgraphs](https://thegraph.com/docs/en/subgraphs/developing/subgraphs/) on [The Graph docs](https://thegraph.com/docs/en/).