Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ File data sources are a new Subgraph functionality for accessing off-chain data

Rather than fetching files "in line" during handler execution, this introduces templates which can be spawned as new data sources for a given file identifier. These new data sources fetch the files, retrying if they are unsuccessful, running a dedicated handler when the file is found.

This is similar to the [existing data source templates](/developing/creating-a-subgraph/#data-source-templates), which are used to dynamically create new chain-based data sources.
This is similar to the [existing data source templates](/subgraphs/developing/creating/subgraph-manifest/#data-source-templates), which are used to dynamically create new chain-based data sources.

> This replaces the existing `ipfs.cat` API

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ Explore additional [resources for APIs](/subgraphs/developing/creating/graph-ts/

| Version | Release notes |
| :-: | --- |
| 1.2.0 | Added support for [Indexed Argument Filtering](/#indexed-argument-filters--topic-filters) & declared `eth_call` |
| 1.1.0 | Supports [Timeseries & Aggregations](#timeseries-and-aggregations). Added support for type `Int8` for `id`. |
| 1.0.0 | Supports [`indexerHints`](/developing/creating-a-subgraph/#indexer-hints) feature to prune Subgraphs |
| 1.2.0 | Added support for [Indexed Argument Filtering](/subgraphs/developing/creating/advanced/#indexed-argument-filters--topic-filters) & declared `eth_call` |
| 1.1.0 | Supports [Timeseries & Aggregations](/subgraphs/developing/creating/advanced/#timeseries-and-aggregations). Added support for type `Int8` for `id`. |
| 1.0.0 | Supports [`indexerHints`](/subgraphs/developing/creating/subgraph-manifest/#indexer-hints) feature to prune Subgraphs |
| 0.0.9 | Supports `endBlock` feature |
| 0.0.8 | Added support for polling [Block Handlers](/developing/creating-a-subgraph/#polling-filter) and [Initialisation Handlers](/developing/creating-a-subgraph/#once-filter). |
| 0.0.7 | Added support for [File Data Sources](/developing/creating-a-subgraph/#file-data-sources). |
| 0.0.8 | Added support for polling [Block Handlers](/subgraphs/developing/creating/subgraph-manifest/#polling-filter) and [Initialisation Handlers](/subgraphs/developing/creating/subgraph-manifest/#once-filter). |
| 0.0.7 | Added support for [File Data Sources](/subgraphs/developing/creating/advanced/#ipfsarweave-file-data-sources). |
| 0.0.6 | Supports fast [Proof of Indexing](/indexing/overview/#what-is-a-proof-of-indexing-poi) calculation variant. |
| 0.0.5 | Added support for event handlers having access to transaction receipts. |
| 0.0.4 | Added support for managing subgraph features. |
6 changes: 3 additions & 3 deletions website/src/pages/en/subgraphs/developing/developer-faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Within a Subgraph, the events are always processed in the order they appear in t

Templates allow you to create data sources quickly, while your Subgraph is indexing. Your contract might spawn new contracts as people interact with it. Since you know the shape of those contracts (ABI, events, etc.) upfront, you can define how you want to index them in a template. When they are spawned, your Subgraph will create a dynamic data source by supplying the contract address.

Check out the "Instantiating a data source template" section on: [Data Source Templates](/developing/creating-a-subgraph/#data-source-templates).
Check out the "Instantiating a data source template" section on: [Data Source Templates](/subgraphs/developing/creating/subgraph-manifest/#data-source-templates).

### 11. Is it possible to set up a Subgraph using `graph init` from `graph-cli` with two contracts? Or should I manually add another dataSource in `subgraph.yaml` after running `graph init`?

Expand Down Expand Up @@ -108,11 +108,11 @@ Yes. Sepolia supports block handlers, call handlers and event handlers. It shoul

### 19. Is it possible to specify what block to start indexing on?

Yes. `dataSources.source.startBlock` in the `subgraph.yaml` file specifies the number of the block that the dataSource starts indexing from. In most cases, we suggest using the block where the contract was created: [Start blocks](/developing/creating-a-subgraph/#start-blocks)
Yes. `dataSources.source.startBlock` in the `subgraph.yaml` file specifies the number of the block that the dataSource starts indexing from. In most cases, we suggest using the block where the contract was created: [Start blocks](/subgraphs/developing/creating/subgraph-manifest/#start-blocks)

### 20. What are some tips to increase the performance of indexing? My Subgraph is taking a very long time to sync

Yes, you should take a look at the optional start block feature to start indexing from the block where the contract was deployed: [Start blocks](/developing/creating-a-subgraph/#start-blocks)
Yes, you should take a look at the optional start block feature to start indexing from the block where the contract was deployed: [Start blocks](/subgraphs/developing/creating/subgraph-manifest/#start-blocks)

### 21. Is there a way to query the Subgraph directly to determine the latest block number it has indexed?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The standardized schemas each cover one protocol category. Every schema shares a

Because the schemas are meant to be consumed the same way regardless of protocol, they follow a consistent set of conventions.

**Three ways to read quantitative data.** You can query an entity directly for _real-time_ values (e.g. `totalValueLockedUSD` on a `Pool`), use [time-travel queries](https://thegraph.com/docs/en/subgraphs/querying/graphql-api/#time-travel-queries) for _point-in-time_ historical values, or query the snapshot entities for _time-series_ data (e.g. `PoolDailySnapshot`).
**Three ways to read quantitative data.** You can query an entity directly for _real-time_ values (e.g. `totalValueLockedUSD` on a `Pool`), use [time-travel queries](https://thegraph.com/docs/en/subgraphs/querying/graphql-api/#time-travel-queries-example) for _point-in-time_ historical values, or query the snapshot entities for _time-series_ data (e.g. `PoolDailySnapshot`).

**Standardized financial metrics.** Revenue is split consistently across every schema:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ type TokenLockMetadata @entity {
export function handleMetadata(content: Bytes): void {
// dataSource.stringParams() returns the File DataSource CID
// stringParam() will be mocked in the handler test
// for more info https://thegraph.com/docs/en/developing/creating-a-subgraph/#create-a-new-handler-to-process-files
// for more info https://thegraph.com/docs/en/subgraphs/developing/creating/advanced/#create-a-new-handler-to-process-files
let tokenMetadata = new TokenLockMetadata(dataSource.stringParam())
const value = json.fromBytes(content).toObject()

Expand Down
Loading