graph init` placera l'exemple de manifeste de subgraph. Le `` est l'adresse de votre contrat existant. `` est le nom du réseau sur lequel le contrat réside. `` est un chemin local vers un fichier ABI de contrat. **`--network`-- et `--abi` -- sont facultatifs.**
-
-### À partir d'un exemple de subgraph
-
-Le second mode `graph init` prend en charge est la création d'un nouveau projet à partir d'un exemple de subgraph. La commande suivante le fait :
-
-```
-graph init --par-exemple --produit-service hébergé / []
-```
-
-Le subgraph d'exemple est basé sur le contrat Gravity de Dani Grant qui gère les avatars d'utilisateurs et émet des événements `NewGravatar` ou `UpdateGravatar` chaque fois que des avatars sont créés ou mis à jour. Le subgraph gère ces événements en créant des entités `Gravatar` dans le stockage des nœuds de The Graph et en veillant à ce qu'elles soient mises à jour en fonction des événements. Continuez sur le [manifeste de subgraphs](/developing/creating-a-subgraph#the-subgraph-manifest) pour mieux comprendre les événements de vos contrats intelligents auxquels prêter attention, les mappages, etc.
-
-### À partir d'un contract proxy
-
-Pour créer un subgraph adapté au suivi d'un contract proxy, initialisez le subgraph en spécifiant l'adresse du contrat de mise en œuvre. Une fois le processus d'initialisation terminé, la dernière étape consiste à mettre à jour le nom du réseau dans le fichier subgraph.yaml à l'adresse d'un contract proxy. Vous pouvez utiliser la commande ci-dessous.
-
-```sh
-graph init \
- --product hosted-service
- --from-contract \
- / []
-```
-
-## Réseaux pris en charge par le service hébergé
-
-Vous pouvez trouver la liste des réseaux supportés [ici](/developing/supported-networks).
diff --git a/website/pages/fr/deploying/subgraph-studio.mdx b/website/pages/fr/deploying/subgraph-studio.mdx
deleted file mode 100644
index d44f3c17c6f6..000000000000
--- a/website/pages/fr/deploying/subgraph-studio.mdx
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: How to Use Subgraph Studio
----
-
-Bienvenue dans votre nouveau site de Lancement 👩🏽🚀
-
-Subgraph Studio is your place to build and create subgraphs, add metadata, and publish them to the new decentralized Explorer (more on that [here](/network/explorer)).
-
-What you can do in Subgraph Studio:
-
-- Créer un subgraphe via l'interface utilisateur de Studio
-- Déployer un subgraphe à l'aide de la CLI
-- Publier un subgraph avec l'interface utilisateur de Studio
-- Testez-le dans le playground
-- Intégrez-le dans l'environnement de préproduction à l'aide de l'URL de requête
-- Créez et gérez vos clés API pour des subgraphs spécifiques
-
-Here in Subgraph Studio, you have full control over your subgraphs. Not only can you test your subgraphs before you publish them, but you can also restrict your API keys to specific domains and only allow certain Indexers to query from their API keys.
-
-Les requêtes des subgraphs génère des frais d'interrogation, utilisés pour récompenser les indexeurs [Indexeurs](/network/indexing) sur le réseau Graph. Si vous êtes un développeur dapp ou un développeur de subgraphs, le Studio vous permettra de créer de meilleurs subgraphs pour alimenter vos subgraphs ou celles de votre communauté. Le Studio est composé de 5 parties principales :
-
-- Contrôles de votre compte utilisateur
-- Une liste de subgraphs que vous avez créés
-- Une section pour gérer, afficher les détails et visualiser l'état d'un subgraph spécifique
-- Une section pour gérer vos clés API dont vous aurez besoin pour interroger un subgraph
-- Une section pour gérer votre facturation
-
-## Comment créer votre compte
-
-1. Sign in with your wallet - you can do this via MetaMask, WalletConnect, Coinbase Wallet or Safe.
-1. Dès que vous êtes connecté, vous verrez votre clé de déploiement unique sur la page d'accueil de votre compte. Cela vous permettra soit de publier vos subgraphs, soit de gérer vos clés API + facturation. Vous disposerez d'une clé de déploiement unique qui pourra être regénérée si vous pensez qu'elle a été compromise.
-
-## Comment créer un subgraph dans Subgraph Studio
-
-
-
-## Compatibilité des subgraphs avec le réseau de The Graph
-
-In order to be supported by Indexers on The Graph Network, subgraphs must:
-
-- Indexer un [réseau supporté](/developing/supported-networks)
-- Ne doit utiliser aucune des fonctionnalités suivantes :
- - ipfs.cat & ipfs.map
- - Erreurs non fatales
- - La greffe
-
-Plus de fonctions & de réseaux seront ajoutés progressivement au réseau Graph.
-
-### Flux du cycle de vie des subgraphs
-
-
-
-After you have created your subgraph, you will be able to deploy it using the [CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), or command-line interface. Deploying a subgraph with the CLI will push the subgraph to the Studio where you’ll be able to test subgraphs using the playground. This will eventually allow you to publish to the Graph Network. For more information on CLI setup, [check this out](/developing/defining-a-subgraph#install-the-graph-cli) (psst, make sure you have your deploy key on hand). Remember, deploying is **not the same as** publishing. When you deploy a subgraph, you just push it to the Studio where you’re able to test it. Versus, when you publish a subgraph, you are publishing it on-chain.
-
-## Tester votre subgraph dans Subgraph Studio
-
-Si vous voulez tester votre subgraph avant de le publier sur le réseau, vous pouvez le faire dans le subgraph **Playground (aire de jeu)** ou consulter vos journaux de bord. Les journaux de subgraph vous indiqueront **où** votre subgraph échoue.
-
-## Publiez votre subgraph dans Subgraph Studio
-
-Vous êtes arrivé jusqu'ici - félicitations !
-
-In order to publish your subgraph successfully, you’ll need to go through the following steps outlined in this [section](/publishing/publishing-a-subgraph/).
-
-Jetez un œil à l'aperçu vidéo ci-dessous également :
-
-
-
-Remember, while you’re going through your publishing flow, you’ll be able to push to either Arbitrum One or Arbitrum Sepolia. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Arbitrum Sepolia, which is free to do. This will allow you to see how the subgraph will work in Graph Explorer and will allow you to test curation elements.
-
-Les indexeurs doivent soumettre des enregistrements obligatoires de preuve d'indexation à partir d'un hash de bloc spécifique. Parce que la publication d'un subgraph est une action effectuée sur la blockchain, n'oubliez pas que la transaction peut prendre jusqu'à quelques minutes pour être complétée. Toute adresse que vous utilisez pour publier le contrat sera la seule à pouvoir publier les futures versions. Choisissez judicieusement !
-
-Les subgraphes avec des signaux de curation sont présentés aux indexeurs afin qu'ils puissent être indexés sur le réseau décentralisé. Vous pouvez publier des subgraphs et des signaux en une seule transaction, ce qui vous permet de générer le premier signal de curation sur le subraphe et d'économiser sur les coûts de gaz. En ajoutant votre signal au signal fourni ultérieurement par les curateurs, votre subgraph aura également plus de chances de répondre aux requêtes.
-
-**Maintenant que vous avez publié votre subgraph, voyons comment vous allez le gérer régulièrement.** Notez que vous ne pouvez pas publier votre subgraph sur le réseau si la synchronisation a échoué. Cela est généralement dû au fait que le subgraphe contient des bogues - les journaux vous indiqueront où se trouvent ces problèmes!
-
-## Versionner votre subgraph avec la CLI
-
-Developers might want to update their subgraph, for a variety of reasons. When this is the case, you can deploy a new version of your subgraph to the Studio using the CLI (it will only be private at this point) and if you are happy with it, you can publish this new deployment to Graph Explorer. This will create a new version of your subgraph that curators can start signaling on and Indexers will be able to index this new version.
-
-Up until recently, developers were forced to deploy and publish a new version of their subgraph to the Explorer to update the metadata of their subgraphs. Now, developers can update the metadata of their subgraphs **without having to publish a new version**. Developers can update their subgraph details in the Studio (under the profile picture, name, description, etc) by checking an option called **Update Details** in Graph Explorer. If this is checked, an on-chain transaction will be generated that updates subgraph details in the Explorer without having to publish a new version with a new deployment.
-
-Veuillez noter qu'il y a des coûts associés à la publication d'une nouvelle version d'un subgraph sur le réseau. En plus des frais de transaction, les développeurs doivent également financer une partie de la taxe de curation sur le signal d'automigration. Vous ne pouvez pas publier une nouvelle version de votre subgraph si les curateurs ne l'ont pas signalé. Pour plus d'informations sur les risques de curation, veuillez en savoir plus [ici](/network/curating).
-
-### Archivage automatique des versions de subgraphs
-
-Whenever you deploy a new subgraph version in Subgraph Studio, the previous version will be archived. Archived versions won't be indexed/synced and therefore cannot be queried. You can unarchive an archived version of your subgraph in the Studio UI. Please note that previous versions of non-published subgraphs deployed to the Studio will be automatically archived.
-
-
diff --git a/website/pages/fr/developing/creating-a-subgraph.mdx b/website/pages/fr/developing/creating-a-subgraph.mdx
deleted file mode 100644
index b3a27f97546e..000000000000
--- a/website/pages/fr/developing/creating-a-subgraph.mdx
+++ /dev/null
@@ -1,1601 +0,0 @@
----
-title: Comment créer un subgraph
----
-
-Un subgraph récupère des données depuis une blockchain, les manipule puis les enregistre afin que ces données soient aisément accessibles via GraphQL.
-
-
-
-Un subgraph se constitue des fichiers suivants :
-
-- `subgraph.yaml` : un fichier YAML qui contient le manifeste du subgraph
-
-- `schema.graphql`: un schéma GraphQL qui définit les données stockées pour votre subgraph et comment les interroger via GraphQL
-
-- `Mappages AssemblyScript` : [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) qui traduit les données d'événement en entités définies dans votre schéma (par exemple `mapping.ts` dans ce tutoriel)
-
-> In order to use your subgraph on The Graph's decentralized network, you will need to [create an API key](/deploying/subgraph-studio-faqs/#2-how-do-i-create-an-api-key). It is recommended that you [add signal](/network/curating/#how-to-signal) to your subgraph with at least [3,000 GRT](/sunrise/#how-can-i-ensure-high-quality-of-service-and-redundancy-for-subgraphs-on-the-graph-network).
-
-Before you go into detail about the contents of the manifest file, you need to install the [Graph CLI](https://github.com/graphprotocol/graph-tooling) which you will need to build and deploy a subgraph.
-
-## Installation du Graph CLI
-
-La CLI Graph est écrite en JavaScript et vous devrez installer soit `yarn` ou `npm` pour l'utiliser ; on suppose que vous avez du fil dans ce qui suit.
-
-Une fois que vous avez `yarn`, installez la CLI Graph en exécutant
-
-**Installation avec yarn :**
-
-```bash
-npm install -g @graphprotocol/graph-cli
-```
-
-**Installation avec npm :**
-
-```bash
-npm install -g @graphprotocol/graph-cli
-```
-
-Once installed, the `graph init` command can be used to set up a new subgraph project, either from an existing contract or from an example subgraph. This command can be used to create a subgraph in Subgraph Studio by passing in `graph init --product subgraph-studio`. If you already have a smart contract deployed to your preferred network, bootstrapping a new subgraph from that contract can be a good way to get started.
-
-## D'un contrat existant
-
-La commande suivante crée un subgraph qui indexe tous les événements d'un contrat existant. Il essaie de récupérer l'ABI du contrat via Etherscan et utilise un chemin de fichier local en cas d'échec. Si l'un des arguments facultatifs manque, il vous guide à travers un formulaire interactif.
-
-```sh
-graph init \
- --product subgraph-studio
- --from-contract \
- [--network ] \
- [--abi ] \
- []
-```
-
-The `` est l'ID de votre subgraph dans Subgraph Studio, il peut être trouvé sur la page d'information de votre subgraph.
-
-## A partir d'un exemple de subgraph
-
-Le second mode `graph init` prend en charge est la création d'un nouveau projet à partir d'un exemple de subgraph. La commande suivante le fait :
-
-```sh
-graph init --studio
-```
-
-The [example subgraph](https://github.com/graphprotocol/example-subgraph) is based on the Gravity contract by Dani Grant that manages user avatars and emits `NewGravatar` or `UpdateGravatar` events whenever avatars are created or updated. The subgraph handles these events by writing `Gravatar` entities to the Graph Node store and ensuring these are updated according to the events. The following sections will go over the files that make up the subgraph manifest for this example.
-
-## Ajouter de nouvelles sources de données à un subgraph existant
-
-Depuis `v0.31.0`, le `graph-cli` prend en charge l'ajout de nouvelles sources de données à un subgraph existant via la commande `graph add`.
-
-```sh
-graph add []
-
-Options:
-
- --abi Path to the contract ABI (default: download from Etherscan)
- --contract-name Name of the contract (default: Contract)
- --merge-entities Whether to merge entities with the same name (default: false)
- --network-file Networks config file path (default: "./networks.json")
-```
-
-La commande `add` récupérera l'ABI depuis Etherscan (sauf si un chemin ABI est spécifié avec l'option `--abi`) et créera une nouvelle `dataSource` de la même manière que la commande `graph init` crée un `dataSource` `--from-contract`, mettant à jour le schéma et les mappages en conséquence.
-
-L'option `--merge-entities` identifie la façon dont le développeur souhaite gérer les conflits de noms d'`entité` et d'`événement` :
-
-- Si `true` : le nouveau `dataSource` doit utiliser les `eventHandlers` & `entités`.
-- Si `false` : une nouvelle entité & le gestionnaire d'événements doit être créé avec `${dataSourceName}{EventName}`.
-
-L'`adresse` du contrat sera écrite dans le `networks.json` du réseau concerné.
-
-> **Remarque :** Lorsque vous utilisez la Cli interactive, après avoir exécuté avec succès `graph init`, vous serez invité à ajouter une nouvelle `dataSource`.
-
-## Le manifeste du subgraph
-
-Le manifeste du subgraph `subgraph.yaml` définit les contrats intelligents que votre subgraph indexe, les événements de ces contrats auxquels prêter attention et comment mapper les données d'événements aux entités que Graph Node stocke et permet d'interroger. La spécification complète des manifestes de subgraphs peut être trouvée [ici](https://github.com/graphprotocol/graph-node/blob/master/docs/subgraph-manifest.md).
-
-Pour l'exemple de subgraph, `subgraph.yaml` est :
-
-```yaml
-version spec : 0.0.4
-description : Gravatar pour Ethereum
-référentiel : https://github.com/graphprotocol/graph-tooling
-schéma:
- fichier : ./schema.graphql
-indexeurConseils :
- tailler : automatique
-les sources de données:
- - genre : ethereum/contrat
- nom: Gravité
- réseau : réseau principal
- source:
- adresse : '0x2E645469f354BB4F5c8a05B3b30A929361cf77eC'
- abi : Gravité
- bloc de démarrage : 6175244
- bloc de fin : 7175245
- contexte:
- foo :
- tapez : Booléen
- données : vrai
- bar:
- tapez : chaîne
- données : 'barre'
- cartographie :
- genre : ethereum/événements
- Version api : 0.0.6
- langage : wasm/assemblyscript
- entités :
- -Gravatar
- abis :
- - nom : Gravité
- fichier : ./abis/Gravity.json
- Gestionnaires d'événements :
- - événement : NewGravatar(uint256,adresse,chaîne,chaîne)
- gestionnaire : handleNewGravatar
- - événement : UpdatedGravatar (uint256, adresse, chaîne, chaîne)
- gestionnaire : handleUpdatedGravatar
- Gestionnaires d'appels :
- - fonction : createGravatar(string,string)
- gestionnaire : handleCreateGravatar
- gestionnaires de blocs :
- - gestionnaire : handleBlock
- - gestionnaire : handleBlockWithCall
- filtre:
- genre : appeler
- fichier : ./src/mapping.ts
-```
-
-Les entrées importantes à mettre à jour pour le manifeste sont :
-
-- `specVersion`: a semver version that identifies the supported manifest structure and functionality for the subgraph. The latest version is `1.2.0`. See [specVersion releases](#specversion-releases) section to see more details on features & releases.
-
-- `description`: a human-readable description of what the subgraph is. This description is displayed in Graph Explorer when the subgraph is deployed to Subgraph Studio.
-
-- `repository`: the URL of the repository where the subgraph manifest can be found. This is also displayed in Graph Explorer.
-
-- `fonctionnalités` : une liste de tous les noms de [fonctionnalités](#experimental-features) utilisés.
-
-- `indexerHints.prune` : Définit la conservation des données de blocs historiques pour un subgraph. Voir [prune](#prune) dans la section [indexerHints](#indexer-hints).
-
-- `dataSources.source` : l'adresse du contrat intelligent, les sources du sous-graphe, et l'ABI du contrat intelligent à utiliser. L'adresse est facultative ; son omission permet d'indexer les événements correspondants de tous les contrats.
-
-- `dataSources.source` : l'adresse du contrat intelligent, les sources du subgraph, et l'Abi du contrat intelligent à utiliser. L'adresse est facultative ; son omission permet d'indexer les événements correspondants de tous les contrats.
-
-- `dataSources.source.endBlock`: The optional number of the block that the data source stops indexing at, including that block. Minimum spec version required: `0.0.9`.
-
-- `dataSources.context` : paires clé-valeur qui peuvent être utilisées dans les mappages de subgraphs. Prend en charge différents types de données comme `Bool`, `String`, `Int`, `Int8`, `BigDecimal`, `Octets`, `Liste` et `BigInt`. Chaque variable doit spécifier son `type` et ses `données`. Ces variables de contexte sont ensuite accessibles dans les fichiers de mappage, offrant des options plus configurables pour le développement de subgraphs.
-
-- `dataSources.mapping.entities` : les entités que la source de données écrit dans le magasin. Le schéma de chaque entité est défini dans le fichier schema.graphql.
-
-- `dataSources.mapping.abis` : un ou plusieurs fichiers ABI nommés pour le contrat source ainsi que tout autre contrat intelligent avec lequel vous interagissez à partir des mappages.
-
-- `dataSources.mapping.eventHandlers` : répertorie les événements de contrat intelligent auxquels ce subgraph réagit et les gestionnaires du mappage —./src/mapping.ts dans l'exemple qui transforment ces événements en entités dans le magasin.
-
-- `dataSources.mapping.callHandlers` : répertorie les fonctions de contrat intelligent auxquelles ce smubgraph réagit et les gestionnaires du mappage qui transforment les entrées et sorties en appels de fonction en entités dans le magasin.
-
-- `dataSources.mapping.blockHandlers` : répertorie les blocs auxquels ce subgraph réagit et les gestionnaires du mappage à exécuter lorsqu'un bloc est ajouté à la chaîne. Sans filtre, le gestionnaire de bloc sera exécuté à chaque bloc. Un filtre d'appel facultatif peut être fourni en ajoutant un champ `filter` avec `kind: call` au gestionnaire. Cela n'exécutera le gestionnaire que si le bloc contient au moins un appel au contrat de source de données.
-
-Un seul subgraph peut indexer les données de plusieurs contrats intelligents. Ajoutez une entrée pour chaque contrat à partir duquel les données doivent être indexées dans le tableau `dataSources`.
-
-### Ordre de déclenchement des gestionnaires
-
-Les déclencheurs d'une source de données au sein d'un bloc sont classés à l'aide du processus suivant :
-
-1. Les déclencheurs d'événements et d'appels sont d'abord classés par index de transaction au sein du bloc.
-2. Les déclencheurs d'événements et d'appels au sein d'une même transaction sont classés selon une convention : les déclencheurs d'événements d'abord, puis les déclencheurs d'appel, chaque type respectant l'ordre dans lequel ils sont définis dans le manifeste.
-3. Les déclencheurs de bloc sont exécutés après les déclencheurs d'événement et d'appel, dans l'ordre dans lequel ils sont définis dans le manifeste.
-
-Ces règles de commande sont susceptibles de changer.
-
-> **Note:** Lorsque de nouveaux [sources de données dynamiques](#data-source-templates-for-dynamically-created-contracts) sont créés, les gestionnaires définis pour les sources de données dynamiques ne commenceront à être traités qu'une fois que tous les gestionnaires de sources de données existants auront été traités, et se répéteront dans la même séquence chaque fois qu'ils seront déclenchés.
-
-### Indexed Argument Filters / Topic Filters
-
-> **Requires**: [SpecVersion](#specversion-releases) >= `1.2.0`
-
-Topic filters, also known as indexed argument filters, are a powerful feature in subgraphs that allow users to precisely filter blockchain events based on the values of their indexed arguments.
-
-- These filters help isolate specific events of interest from the vast stream of events on the blockchain, allowing subgraphs to operate more efficiently by focusing only on relevant data.
-
-- This is useful for creating personal subgraphs that track specific addresses and their interactions with various smart contracts on the blockchain.
-
-#### How Topic Filters Work
-
-When a smart contract emits an event, any arguments that are marked as indexed can be used as filters in a subgraph's manifest. This allows the subgraph to listen selectively for events that match these indexed arguments.
-
-- The event's first indexed argument corresponds to `topic1`, the second to `topic2`, and so on, up to `topic3`, since the Ethereum Virtual Machine (EVM) allows up to three indexed arguments per event.
-
-```solidity
-// SPDX-License-Identifier: MIT
-pragma solidity ^0.8.0;
-
-contract Token {
- // Event declaration with indexed parameters for addresses
- event Transfer(address indexed from, address indexed to, uint256 value);
-
- // Function to simulate transferring tokens
- function transfer(address to, uint256 value) public {
- // Emitting the Transfer event with from, to, and value
- emit Transfer(msg.sender, to, value);
- }
-}
-```
-
-In this example:
-
-- The `Transfer` event is used to log transactions of tokens between addresses.
-- The `from` and `to` parameters are indexed, allowing event listeners to filter and monitor transfers involving specific addresses.
-- The `transfer` function is a simple representation of a token transfer action, emitting the Transfer event whenever it is called.
-
-#### Configuration in Subgraphs
-
-Topic filters are defined directly within the event handler configuration in the subgraph manifest. Here is how they are configured:
-
-```yaml
-eventHandlers:
- - event: SomeEvent(indexed uint256, indexed address, indexed uint256)
- handler: handleSomeEvent
- topic1: ['0xValue1', '0xValue2']
- topic2: ['0xAddress1', '0xAddress2']
- topic3: ['0xValue3']
-```
-
-In this setup:
-
-- `topic1` corresponds to the first indexed argument of the event, `topic2` to the second, and `topic3` to the third.
-- Each topic can have one or more values, and an event is only processed if it matches one of the values in each specified topic.
-
-##### Filter Logic
-
-- Within a Single Topic: The logic functions as an OR condition. The event will be processed if it matches any one of the listed values in a given topic.
-- Between Different Topics: The logic functions as an AND condition. An event must satisfy all specified conditions across different topics to trigger the associated handler.
-
-#### Example 1: Tracking Direct Transfers from Address A to Address B
-
-```yaml
-eventHandlers:
- - event: Transfer(indexed address,indexed address,uint256)
- handler: handleDirectedTransfer
- topic1: ['0xAddressA'] # Sender Address
- topic2: ['0xAddressB'] # Receiver Address
-```
-
-In this configuration:
-
-- `topic1` is configured to filter `Transfer` events where `0xAddressA` is the sender.
-- `topic2` is configured to filter `Transfer` events where `0xAddressB` is the receiver.
-- The subgraph will only index transactions that occur directly from `0xAddressA` to `0xAddressB`.
-
-#### Example 2: Tracking Transactions in Either Direction Between Two or More Addresses
-
-```yaml
-eventHandlers:
- - event: Transfer(indexed address,indexed address,uint256)
- handler: handleTransferToOrFrom
- topic1: ['0xAddressA', '0xAddressB', '0xAddressC'] # Sender Address
- topic2: ['0xAddressB', '0xAddressC'] # Receiver Address
-```
-
-In this configuration:
-
-- `topic1` is configured to filter `Transfer` events where `0xAddressA`, `0xAddressB`, `0xAddressC` is the sender.
-- `topic2` is configured to filter `Transfer` events where `0xAddressB` and `0xAddressC` is the receiver.
-- The subgraph will index transactions that occur in either direction between multiple addresses allowing for comprehensive monitoring of interactions involving all addresses.
-
-## Declared eth_call
-
-> **Requires**: [SpecVersion](#specversion-releases) >= `1.2.0`. Currently, `eth_calls` can only be declared for event handlers.
-
-Declarative `eth_calls` are a valuable subgraph feature that allows `eth_calls` to be executed ahead of time, enabling `graph-node` to execute them in parallel.
-
-This feature does the following:
-
-- Significantly improves the performance of fetching data from the Ethereum blockchain by reducing the total time for multiple calls and optimizing the subgraph's overall efficiency.
-- Allows faster data fetching, resulting in quicker query responses and a better user experience.
-- Reduces wait times for applications that need to aggregate data from multiple Ethereum calls, making the data retrieval process more efficient.
-
-### Key Concepts
-
-- Declarative `eth_calls`: Ethereum calls that are defined to be executed in parallel rather than sequentially.
-- Parallel Execution: Instead of waiting for one call to finish before starting the next, multiple calls can be initiated simultaneously.
-- Time Efficiency: The total time taken for all the calls changes from the sum of the individual call times (sequential) to the time taken by the longest call (parallel).
-
-### Scenario without Declarative `eth_calls`
-
-Imagine you have a subgraph that needs to make three Ethereum calls to fetch data about a user's transactions, balance, and token holdings.
-
-Traditionally, these calls might be made sequentially:
-
-1. Call 1 (Transactions): Takes 3 seconds
-2. Call 2 (Balance): Takes 2 seconds
-3. Call 3 (Token Holdings): Takes 4 seconds
-
-Total time taken = 3 + 2 + 4 = 9 seconds
-
-### Scenario with Declarative `eth_calls`
-
-With this feature, you can declare these calls to be executed in parallel:
-
-1. Call 1 (Transactions): Takes 3 seconds
-2. Call 2 (Balance): Takes 2 seconds
-3. Call 3 (Token Holdings): Takes 4 seconds
-
-Since these calls are executed in parallel, the total time taken is equal to the time taken by the longest call.
-
-Total time taken = max (3, 2, 4) = 4 seconds
-
-### How it Works
-
-1. Declarative Definition: In the subgraph manifest, you declare the Ethereum calls in a way that indicates they can be executed in parallel.
-2. Parallel Execution Engine: The Graph Node's execution engine recognizes these declarations and runs the calls simultaneously.
-3. Result Aggregation: Once all calls are complete, the results are aggregated and used by the subgraph for further processing.
-
-### Example Configuration in Subgraph Manifest
-
-Declared `eth_calls` can access the `event.address` of the underlying event as well as all the `event.params`.
-
-`Subgraph.yaml` using `event.address`:
-
-```yaml
-eventHandlers:
-event: Swap(indexed address,indexed address,int256,int256,uint160,uint128,int24)
-handler: handleSwap
-calls:
- global0X128: Pool[event.address].feeGrowthGlobal0X128()
- global1X128: Pool[event.address].feeGrowthGlobal1X128()
-```
-
-Details for the example above:
-
-- `global0X128` is the declared `eth_call`.
-- The text before colon(`global0X128`) is the label for this `eth_call` which is used when logging errors.
-- The text (`Pool[event.address].feeGrowthGlobal0X128()`) is the actual `eth_call` that will be executed, which is in the form of `Contract[address].function(arguments)`
-- The `address` and `arguments` can be replaced with variables that will be available when the handler is executed.
-
-`Subgraph.yaml` using `event.params`
-
-```yaml
-calls:
- - ERC20DecimalsToken0: ERC20[event.params.token0].decimals()
-```
-
-### SpecVersion Releases
-
-| Version | Notes de version |
-| :-: | --- |
-| 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 |
-| 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.6 | Supports fast [Proof of Indexing](/network/indexing/#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. |
-
-### Obtenir les ABI
-
-Le(s) fichier(s) ABI doivent correspondre à votre(vos) contrat(s). Il existe plusieurs façons d'obtenir des fichiers ABI :
-
-- Si vous construisez votre propre projet, vous aurez probablement accès à vos ABI les plus récents.
-- Si vous créez un subgraph pour un projet public, vous pouvez télécharger ce projet sur votre ordinateur et obtenir l'ABI en utilisant la [`compilation truffle `](https://truffleframework.com/docs/truffle/overview) ou en utilisant solc pour compiler.
-- Vous pouvez également trouver l'ABI sur [Etherscan](https://etherscan.io/), mais ce n'est pas toujours fiable, car l'ABI qui y est téléchargé peut être obsolète. Assurez-vous d'avoir le bon ABI, sinon l'exécution de votre subgraph échouera.
-
-## Le Schema GraphQL
-
-Le schéma de votre subgraph se trouve dans le fichier `schema.graphql`. Les schémas GraphQL sont définis à l'aide du langage de définition d'interface GraphQL. Si vous n'avez jamais écrit de schéma GraphQL, il est recommandé de consulter cette introduction sur le système de types GraphQL. La documentation de référence pour les schémas GraphQL est disponible dans la section [API GraphQL](/querying/graphql-api).
-
-## Définir des entités
-
-Avant de définir des entités, il est important de prendre du recul et de réfléchir à la manière dont vos données sont structurées et liées. Toutes les requêtes seront effectuées sur le modèle de données défini dans le schéma du subgraph et les entités indexées par le subgraph. Pour cette raison, il est bon de définir le schéma du subgraph d'une manière qui correspond aux besoins de votre dapp. Il peut être utile d'imaginer les entités comme des « objets contenant des données », plutôt que comme des événements ou des fonctions.
-
-Avec The Graph, vous définissez simplement les types d'entités dans `schema.graphql`, et Graph Node générera des champs de niveau supérieur pour interroger des instances uniques et des collections de ce type d'entité. Chaque type qui doit être une entité doit être annoté avec une directive `@entity`. Par défaut, les entités sont mutables, ce qui signifie que les mappages peuvent charger des entités existantes, les modifier et stocker une nouvelle version de cette entité. La mutabilité a un prix, et pour les types d'entités dont on sait qu'elles ne seront jamais modifiées, par exemple parce qu'elles contiennent simplement des données extraites textuellement de la chaîne, il est recommandé de les marquer comme immuables avec `@entity (immuable : vrai)`. Les mappages peuvent apporter des modifications aux entités immuables tant que ces modifications se produisent dans le même bloc dans lequel l'entité a été créée. Les entités immuables sont beaucoup plus rapides à écrire et à interroger et doivent donc être utilisées autant que possible.
-
-### Bon exemple
-
-L'entité `Gravatar` ci-dessous est structurée autour d'un objet Gravatar et constitue un bon exemple de la façon dont une entité pourrait être définie.
-
-```graphql
-type Gravatar @entity(immutable: true) {
- id: Bytes!
- owner: Bytes
- displayName: String
- imageUrl: String
- accepted: Boolean
-}
-```
-
-### Mauvais exemple
-
-Les exemples d'entités `GravatarAccepted` et `GravatarDeclined` ci-dessous sont basés sur des événements. Il n'est pas recommandé de mapper des événements ou des appels de fonction à des entités 1:1.
-
-```graphql
-type GravatarAccepted @entity {
- id: Bytes!
- owner: Bytes
- displayName: String
- imageUrl: String
-}
-
-type GravatarDeclined @entity {
- id: Bytes!
- owner: Bytes
- displayName: String
- imageUrl: String
-}
-```
-
-### Champs facultatifs et obligatoires
-
-Les champs d'entité peuvent être définis comme obligatoires ou facultatifs. Les champs obligatoires sont indiqués par le `!` dans le schéma. Si un champ obligatoire n'est pas défini dans le mappage, vous recevrez cette erreur lors de l'interrogation du champ :
-
-```
-Null value resolved for non-null field 'name'
-```
-
-Chaque entité doit avoir un champ `id`, qui doit être de type `Bytes !` ou `String !`. Il est généralement recommandé d'utiliser `Bytes !`, à moins que l'`identifiant` ne contienne du texte lisible par l'homme, car les entités avec des identifiants `Bytes !` seront plus rapides à écrire. et interrogez comme ceux avec un `String!` `id`. Le champ `id` sert de clé primaire et doit être unique parmi toutes les entités du même type. Pour des raisons historiques, le type `ID!` est également accepté et est synonyme de `String!`.
-
-Pour certains types d'entités, l'`id` est construit à partir des identifiants de deux autres entités ; cela est possible en utilisant `concat`, par exemple `let id = left.id.concat(right.id)` pour former l'identifiant à partir des identifiants de `gauche0 > et à droite`. De même, pour construire un identifiant à partir de l'identifiant d'une entité existante et d'un compteur `count`, `let id = left.id.concatI32(count)` peut être utilisé. La concaténation est garantie pour produire des identifiants uniques tant que la longueur de `left` est la même pour toutes ces entités, par exemple, parce que `left.id` est une `adresse `.
-
-### Types scalaires intégrés
-
-#### Scalaires pris en charge par GraphQL
-
-Nous prenons en charge les scalaires suivants dans notre API GraphQL :
-
-| Type | Description |
-| --- | --- |
-| `Octets` | Tableau d'octets, représenté sous forme de chaîne hexadécimale. Couramment utilisé pour les hachages et adresses Ethereum. |
-| `String` | Scalaire pour les valeurs `chaîne`. Les caractères nuls ne sont pas pris en charge et sont automatiquement supprimés. |
-| `Boolean` | Scalar pour `boolean` values. |
-| `Int` | The GraphQL spec defines `Int` to be a signed 32-bit integer. |
-| `Int8` | An 8-byte signed integer, also known as a 64-bit signed integer, can store values in the range from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Prefer using this to represent `i64` from ethereum. |
-| `BigInt` | Grands entiers. Utilisé pour les types `uint32`, `int64`, `uint64`, ..., `uint256` d'Ethereum. Remarque : Tout ce qui se trouve en dessous de `uint32`, tel que `int32`, `uint24` ou `int8`, est représenté par `i32 et bio`. Accédez à [API GraphQL - Requêtes](/querying/graphql-api#queries) pour une description de l'API de recherche en texte intégral et d'autres exemples d'utilisation.
-
-```graphql
-query {
- bandSearch(text: "breaks & electro & detroit") {
- id
- name
- description
- wallet
- }
-}
-```
-
-> **[Gestion des fonctionnalités](#experimental-features) :** À partir de `specVersion` `0.0.4` et au-delà, `fullTextSearch` doit être déclaré sous la section `fonctionnalités` dans le manifeste du subgraph.
-
-### Langues prises en charge
-
-Le choix d'une langue différente aura un effet définitif, bien que parfois subtil, sur l'API de recherche en texte intégral. Les champs couverts par un champ de requête en texte intégral sont examinés dans le contexte de la langue choisie, de sorte que les lexèmes produits par les requêtes d'analyse et de recherche varient d'une langue à l'autre. Par exemple : lorsque vous utilisez le dictionnaire turc pris en charge, "token" est dérivé de "toke", tandis que, bien sûr, le dictionnaire anglais le dérivera de "token".
-
-Dictionnaires de langues pris en charge :
-
-| Code | Dictionnaire |
-| ------ | ------------ |
-| simple | Général |
-| da | Danois |
-| nl | Néerlandais |
-| en | Anglais |
-| fi | Finlandais |
-| fr | Français |
-| de | Allemand |
-| hu | Hongrois |
-| it | Italien |
-| no | Norvégien |
-| pt | Portugais |
-| ro | Roumain |
-| ru | Russe |
-| es | Espagnol |
-| sv | Suédois |
-| tr | Turc |
-
-### Algorithmes de classement
-
-Algorithmes de classement:
-
-| Algorithme | Description |
-| --- | --- |
-| rang | Utilisez la qualité de correspondance (0-1) de la requête en texte intégral pour trier les résultats. |
-| proximitéRang | Similaire au classement mais inclut également la proximité des matchs. |
-
-## Écriture de mappages
-
-Les mappages prennent les données d'une source particulière et les transforment en entités définies dans votre schéma. Les mappages sont écrits dans un sous-ensemble de [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) appelé [AssemblyScript](https : //github.com/AssemblyScript/assemblyscript/wiki) qui peut être compilé en WASM ([WebAssembly](https://webassembly.org/)). AssemblyScript est plus strict que TypeScript normal, mais fournit une syntaxe familière.
-
-Pour chaque gestionnaire d'événements défini dans `subgraph.yaml` sous `mapping.eventHandlers`, créez une fonction exportée du même nom. Chaque gestionnaire doit accepter un seul paramètre appelé `event` avec un type correspondant au nom de l'événement qui est géré.
-
-Dans le subgraph d'exemple, `src/mapping.ts` contient des gestionnaires pour les événements `NewGravatar` et `UpdatedGravatar` :
-
-```javascript
-import { NewGravatar, UpdatedGravatar } from '../generated/Gravity/Gravity'
-import { Gravatar } from '../generated/schema'
-
-export function handleNewGravatar(event: NewGravatar): void {
- let gravatar = new Gravatar(event.params.id)
- gravatar.owner = event.params.owner
- gravatar.displayName = event.params.displayName
- gravatar.imageUrl = event.params.imageUrl
- gravatar.save()
-}
-
-export function handleUpdatedGravatar(event: UpdatedGravatar): void {
- let id = event.params.id
- let gravatar = Gravatar.load(id)
- if (gravatar == null) {
- gravatar = new Gravatar(id)
- }
- gravatar.owner = event.params.owner
- gravatar.displayName = event.params.displayName
- gravatar.imageUrl = event.params.imageUrl
- gravatar.save()
-}
-```
-
-Le premier gestionnaire prend un événement `NewGravatar` et crée une nouvelle entité `Gravatar` avec `new Gravatar(event.params.id.toHex())`, remplissant les champs d'entité en utilisant les paramètres d'événement correspondants. Cette instance d'entité est représentée par la variable `gravatar`, avec une valeur d'identifiant de `event.params.id.toHex()`.
-
-Le deuxième gestionnaire essaie de charger le `Gravatar` existant à partir du magasin Graph Node. S'il n'existe pas encore, il est créé à la demande. L'entité est ensuite mise à jour pour correspondre aux nouveaux paramètres d'événement avant d'être réenregistrée dans le magasin à l'aide de `gravatar.save()`.
-
-### ID recommandés pour la création de nouvelles entités
-
-Il est fortement recommandé d'utiliser `Bytes` pour les champs `id` et de n'utiliser `String` que pour les attributs qui contiennent vraiment du texte lisible par l'homme, comme le nom d'un jeton. Vous trouverez ci-dessous quelques valeurs de `id` à prendre en compte lors de la création de nouvelles entités.
-
-- `transfer.id = événement.transaction. hachage`
-
-- `let id = event.transaction.hash.concatI32(event.logIndex.toI32())`
-
-- For entities that store aggregated data, for e.g, daily trade volumes, the `id` usually contains the day number. Here, using a `Bytes` as the `id` is beneficial. Determining the `id` would look like
-
-```typescript
-let dayID = event.block.timestamp.toI32() / 86400
-let id = Bytes.fromI32(dayID)
-```
-
-- Convert constant addresses to `Bytes`.
-
-`const id = Bytes.fromHexString('0xdead...beef')`
-
-There is a [Graph Typescript Library](https://github.com/graphprotocol/graph-tooling/tree/main/packages/ts) which contains utilities for interacting with the Graph Node store and conveniences for handling smart contract data and entities. It can be imported into `mapping.ts` from `@graphprotocol/graph-ts`.
-
-### Traitement des entités ayant des identifiants identiques
-
-Lors de la création et de l'enregistrement d'une nouvelle entité, si une entité avec le même ID existe déjà, les propriétés de la nouvelle entité sont toujours préférées lors du processus de fusion. Cela signifie que l'entité existante sera mise à jour avec les valeurs de la nouvelle entité.
-
-If a null value is intentionally set for a field in the new entity with the same ID, the existing entity will be updated with the null value.
-
-Si aucune valeur n'est définie pour un champ de la nouvelle entité avec le même ID, le champ aura également la valeur null.
-
-## Génération de code
-
-Afin de faciliter et de sécuriser le travail avec les contrats intelligents, les événements et les entités, la CLI Graph peut générer des types AssemblyScript à partir du schéma GraphQL du subgraph et des ABI de contrat inclus dans les sources de données.
-
-Cela se fait avec
-
-```sh
-graph codegen [--output-dir ] []
-```
-
-mais dans la plupart des cas, les subgraphs sont déjà préconfigurés via `package.json` pour vous permettre d'exécuter simplement l'une des opérations suivantes pour obtenir le même résultat :
-
-```sh
-# Yarn
-yarn codegen
-
-# NPM
-npm run codegen
-```
-
-Cela générera une classe AssemblyScript pour chaque contrat intelligent dans les fichiers ABI mentionnés dans `subgraph.yaml`, vous permettant de lier ces contrats à des adresses spécifiques dans les mappages et d'appeler des méthodes de contrat en lecture seule contre le bloc en cours. traité. Il générera également une classe pour chaque événement de contrat afin de fournir un accès facile aux paramètres de l'événement, ainsi qu'au bloc et à la transaction d'où provient l'événement. Tous ces types sont écrits dans `//.ts`. Dans le sous-graphe d'exemple, ce serait `generated/Gravity/Gravity.ts`, permettant aux mappages d'importer ces types avec.
-
-```javascript
-import {
- // La classe de contrat :
- Gravity,
- // Les classes d'événements :
- NewGravatar,
- UpdatedGravatar,
-} from '../generated/Gravity/Gravity'
-```
-
-De plus, une classe est générée pour chaque type d'entité dans le schéma GraphQL du subgraph. Ces classes fournissent un chargement d'entités de type sécurisé, un accès en lecture et en écriture aux champs d'entité ainsi qu'une méthode `save()` pour écrire les entités à stocker. Toutes les classes d'entités sont écrites dans `/schema.ts`, permettant aux mappages de les importer avec
-
-```javascript
-import { Gravatar } from '../generated/schema'
-```
-
-> **Remarque :** La génération de code doit être effectuée à nouveau après chaque modification du schéma GraphQL ou des ABI inclus dans le manifeste. Elle doit également être effectuée au moins une fois avant de construire ou de déployer le subgraph.
-
-Code generation does not check your mapping code in `src/mapping.ts`. If you want to check that before trying to deploy your subgraph to Graph Explorer, you can run `yarn build` and fix any syntax errors that the TypeScript compiler might find.
-
-## Modèles de sources de données
-
-Un modèle courant dans les contrats intelligents compatibles EVM est l'utilisation de contrats de registre ou d'usine, dans lesquels un contrat crée, gère ou référence un nombre arbitraire d'autres contrats qui ont chacun leur propre état et leurs propres événements.
-
-Les adresses de ces sous-traitants peuvent ou non être connues à l'avance et bon nombre de ces contrats peuvent être créés et/ou ajoutés au fil du temps. C'est pourquoi, dans de tels cas, définir une seule source de données ou un nombre fixe de sources de données est impossible et une approche plus dynamique est nécessaire : des _modèles de sources de données_.
-
-### Source de données pour le contrat principal
-
-Tout d’abord, vous définissez une source de données régulière pour le contrat principal. L'extrait ci-dessous montre un exemple simplifié de source de données pour le contrat d'usine d'échange [Uniswap](https://uniswap.org). Notez le gestionnaire d'événements `NewExchange(address,address)`. Ceci est émis lorsqu'un nouveau contrat d'échange est créé en chaîne par le contrat d'usine.
-
-```yaml
-dataSources:
- - kind: ethereum/contract
- name: Factory
- network: mainnet
- source:
- address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95'
- abi: Factory
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.6
- language: wasm/assemblyscript
- file: ./src/mappings/factory.ts
- entities:
- - Directory
- abis:
- - name: Factory
- file: ./abis/factory.json
- eventHandlers:
- - event: NewExchange(address,address)
- handler: handleNewExchange
-```
-
-### Modèles de source de données pour les contrats créés dynamiquement
-
-Ensuite, vous ajoutez des _modèles de source de données_ au manifeste. Celles-ci sont identiques aux sources de données classiques, sauf qu'il leur manque une adresse de contrat prédéfinie sous `source`. Généralement, vous définirez un modèle pour chaque type de sous-contrat géré ou référencé par le contrat parent.
-
-```yaml
-dataSources:
- - kind: ethereum/contract
- name: Factory
- # ... other source fields for the main contract ...
-templates:
- - name: Exchange
- kind: ethereum/contract
- network: mainnet
- source:
- abi: Exchange
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.6
- language: wasm/assemblyscript
- file: ./src/mappings/exchange.ts
- entities:
- - Exchange
- abis:
- - name: Exchange
- file: ./abis/exchange.json
- eventHandlers:
- - event: TokenPurchase(address,uint256,uint256)
- handler: handleTokenPurchase
- - event: EthPurchase(address,uint256,uint256)
- handler: handleEthPurchase
- - event: AddLiquidity(address,uint256,uint256)
- handler: handleAddLiquidity
- - event: RemoveLiquidity(address,uint256,uint256)
- handler: handleRemoveLiquidity
-```
-
-### Instanciation d'un modèle de source de données
-
-Dans la dernière étape, vous mettez à jour votre mappage de contrat principal pour créer une instance de source de données dynamique à partir de l'un des modèles. Dans cet exemple, vous modifieriez le mappage de contrat principal pour importer le modèle `Exchange` et appeleriez la méthode `Exchange.create(address)` dessus pour commencer à indexer le nouveau contrat d'échange.
-
-```typescript
-import { Exchange } from '../generated/templates'
-
-export function handleNewExchange(event: NewExchange): void {
- // Commence à indexer l'échange ; `event.params.exchange` est le
- // adresse du nouveau contrat d'échange
- Exchange.create(event.params.exchange)
-}
-```
-
-> **Remarque :** Une nouvelle source de données traitera uniquement les appels et les événements du bloc dans lequel elle a été créée et de tous les blocs suivants, mais ne traitera pas les données historiques, c'est-à-dire les données. qui est contenu dans les blocs précédents.
->
-> Si les blocs précédents contiennent des données pertinentes pour la nouvelle source de données, il est préférable d'indexer ces données en lisant l'état actuel du contrat et en créant des entités représentant cet état au moment de la création de la nouvelle source de données.
-
-### Data Source Context
-
-Les contextes de source de données permettent de transmettre une configuration supplémentaire lors de l'instanciation d'un modèle. Dans notre exemple, disons que les échanges sont associés à une paire de transactions particulière, qui est incluse dans l'événement `NewExchange`. Ces informations peuvent être transmises à la source de données instanciée, comme suit :
-
-```typescript
-import { Exchange } from '../generated/templates'
-
-export function handleNewExchange(event: NewExchange): void {
- let context = new DataSourceContext()
- context.setString('tradingPair', event.params.tradingPair)
- Exchange.createWithContext(event.params.exchange, context)
-}
-```
-
-A l'intérieur d'un mappage du modèle `Exchange`, le contexte est alors accessible :
-
-```typescript
-import { dataSource } from '@graphprotocol/graph-ts'
-
-let context = dataSource.context()
-let tradingPair = context.getString('tradingPair')
-```
-
-Il existe des setters et des getters comme `setString` et `getString` pour tous les types de valeur.
-
-## Blocs de démarrage
-
-Le `startBlock` est un paramètre facultatif qui vous permet de définir à partir de quel bloc de la chaîne la source de données commencera l'indexation. La définition du bloc de départ permet à la source de données d'ignorer potentiellement des millions de blocs non pertinents. En règle générale, un développeur de subgraphs définira `startBlock` sur le bloc dans lequel le contrat intelligent de la source de données a été créé.
-
-```yaml
-dataSources:
- - kind: ethereum/contract
- name: ExampleSource
- network: mainnet
- source:
- address: '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95'
- abi: ExampleContract
- startBlock: 6627917
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.6
- language: wasm/assemblyscript
- file: ./src/mappings/factory.ts
- entities:
- - User
- abis:
- - name: ExampleContract
- file: ./abis/ExampleContract.json
- eventHandlers:
- - event: NewEvent(address,address)
- handler: handleNewEvent
-```
-
-> **Remarque :** Le bloc de création de contrat peut être rapidement consulté sur Etherscan :
->
-> 1. Recherchez le contrat en saisissant son adresse dans la barre de recherche.
-> 2. Cliquez sur le hachage de la transaction de création dans la section `Contract Creator`.
-> 3. Chargez la page des détails de la transaction où vous trouverez le bloc de départ de ce contrat.
-
-## Conseils pour l'indexeur
-
-Le paramètre `indexerHints` dans le manifeste d'un subgraph fournit des directives aux indexeurs sur le traitement et la gestion d'un subgraph. Il influence les décisions opérationnelles concernant la gestion des données, les stratégies d'indexation et les optimisations. Actuellement, il propose l'option `prune` pour gérer la conservation ou l'élagage des données historiques.
-
-> This feature is available from `specVersion: 1.0.0`
-
-### Prune
-
-`indexerHints.prune` : définit la conservation des données de bloc historiques pour un subgraph. Les options incluent :
-
-1. `"never"`: No pruning of historical data; retains the entire history.
-2. `"auto"`: Retains the minimum necessary history as set by the indexer, optimizing query performance.
-3. Un nombre spécifique : Fixe une limite personnalisée au nombre de blocs historiques à conserver.
-
-```
- indexerHints:
- prune: auto
-```
-
-> The term "history" in this context of subgraphs is about storing data that reflects the old states of mutable entities.
-
-History as of a given block is required for:
-
-- [Time travel queries](/querying/graphql-api/#time-travel-queries), which enable querying the past states of these entities at specific blocks throughout the subgraph's history
-- Using the subgraph as a [graft base](/developing/creating-a-subgraph/#grafting-onto-existing-subgraphs) in another subgraph, at that block
-- Rewinding the subgraph back to that block
-
-If historical data as of the block has been pruned, the above capabilities will not be available.
-
-> L'utilisation de `"auto"` est généralement recommandée car elle maximise les performances des requêtes et est suffisante pour la plupart des utilisateurs qui n'ont pas besoin d'accéder à de nombreuses données historiques.
-
-Pour les subgraphs exploitant les [requêtes de voyage dans le temps](/querying/graphql-api/#time-travel-queries), il est conseillé soit de définir un nombre spécifique de blocs pour la conservation des données historiques, soit d'utiliser ` prune : never` pour conserver tous les états historiques des entités. Vous trouverez ci-dessous des exemples de configuration des deux options dans les paramètres de votre subgraph :
-
-Pour conserver une quantité spécifique de données historiques :
-
-```
- indexerHints:
- prune: 1000 # Replace 1000 with the desired number of blocks to retain
-```
-
-Préserver l'histoire complète des États de l'entité :
-
-```
-indexerHints:
- prune: never
-```
-
-You can check the earliest block (with historical state) for a given subgraph by querying the [Indexing Status API](/deploying/deploying-a-subgraph-to-hosted/#checking-subgraph-health):
-
-```
-{
- indexingStatuses(subgraphs: ["Qm..."]) {
- subgraph
- synced
- health
- chains {
- earliestBlock {
- number
- }
- latestBlock {
- number
- }
- chainHeadBlock { number }
- }
- }
-}
-```
-
-Note that the `earliestBlock` is the earliest block with historical data, which will be more recent than the `startBlock` specified in the manifest, if the subgraph has been pruned.
-
-## Event Handlers
-
-Event handlers in a subgraph react to specific events emitted by smart contracts on the blockchain and trigger handlers defined in the subgraph's manifest. This enables subgraphs to process and store event data according to defined logic.
-
-### Defining an Event Handler
-
-An event handler is declared within a data source in the subgraph's YAML configuration. It specifies which events to listen for and the corresponding function to execute when those events are detected.
-
-```yaml
-dataSources:
- - kind: ethereum/contract
- name: Gravity
- network: dev
- source:
- address: '0x731a10897d267e19b34503ad902d0a29173ba4b1'
- abi: Gravity
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.6
- language: wasm/assemblyscript
- entities:
- - Gravatar
- - Transaction
- abis:
- - name: Gravity
- file: ./abis/Gravity.json
- eventHandlers:
- - event: Approval(address,address,uint256)
- handler: handleApproval
- - event: Transfer(address,address,uint256)
- handler: handleTransfer
- topic1: ['0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', '0xc8dA6BF26964aF9D7eEd9e03E53415D37aA96325'] # Optional topic filter which filters only events with the specified topic.
-```
-
-## Gestionnaires d'appels
-
-Bien que les événements constituent un moyen efficace de collecter les modifications pertinentes apportées à l'état d'un contrat, de nombreux contrats évitent de générer des journaux pour optimiser les coûts du gaz. Dans ces cas, un subgraph peut s'abonner aux appels effectués vers le contrat de source de données. Ceci est réalisé en définissant des gestionnaires d'appels faisant référence à la signature de la fonction et au gestionnaire de mappage qui traitera les appels à cette fonction. Pour traiter ces appels, le gestionnaire de mappage recevra un `ethereum.Call` comme argument avec les entrées et sorties saisies de l'appel. Les appels effectués à n'importe quelle profondeur dans la chaîne d'appels d'une transaction déclencheront le mappage, permettant de capturer l'activité avec le contrat de source de données via des contrats proxy.
-
-Les gestionnaires d'appels ne se déclencheront que dans l'un des deux cas suivants : lorsque la fonction spécifiée est appelée par un compte autre que le contrat lui-même ou lorsqu'elle est marquée comme externe dans Solidity et appelée dans le cadre d'une autre fonction du même contrat.
-
-> **Remarque :** Les gestionnaires d'appels dépendent actuellement de l'API de suivi de parité. Certains réseaux, tels que la chaîne BNB et Arbitrum, ne prennent pas en charge cette API. Si un subgraph indexant l’un de ces réseaux contient un ou plusieurs gestionnaires d’appels, il ne démarrera pas la synchronisation. Les développeurs de subgraphs devraient plutôt utiliser des gestionnaires d'événements. Ceux-ci sont bien plus performants que les gestionnaires d'appels et sont pris en charge sur tous les réseaux evm.
-
-### Définir un gestionnaire d'appels
-
-Pour définir un gestionnaire d'appels dans votre manifeste, ajoutez simplement un tableau `callHandlers` sous la source de données à laquelle vous souhaitez vous abonner.
-
-```yaml
-dataSources:
- - kind: ethereum/contract
- name: Gravity
- network: mainnet
- source:
- address: '0x731a10897d267e19b34503ad902d0a29173ba4b1'
- abi: Gravity
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.6
- language: wasm/assemblyscript
- entities:
- - Gravatar
- - Transaction
- abis:
- - name: Gravity
- file: ./abis/Gravity.json
- callHandlers:
- - function: createGravatar(string,string)
- handler: handleCreateGravatar
-```
-
-La `fonction` est la signature de fonction normalisée permettant de filtrer les appels. La propriété `handler` est le nom de la fonction de votre mappage que vous souhaitez exécuter lorsque la fonction cible est appelée dans le contrat de source de données.
-
-### Fonction de cartographie
-
-Chaque gestionnaire d'appel prend un seul paramètre dont le type correspond au nom de la fonction appelée. Dans l'exemple de subgraph ci-dessus, le mappage contient un gestionnaire lorsque la fonction `createGravatar` est appelée et reçoit un paramètre `CreateGravatarCall` comme argument :
-
-```typescript
-import { CreateGravatarCall } from '../generated/Gravity/Gravity'
-import { Transaction } from '../generated/schema'
-
-export function handleCreateGravatar(call: CreateGravatarCall): void {
- let id = call.transaction.hash
- let transaction = new Transaction(id)
- transaction.displayName = call.inputs._displayName
- transaction.imageUrl = call.inputs._imageUrl
- transaction.save()
-}
-```
-
-La fonction `handleCreateGravatar` prend un nouveau `CreateGravatarCall` qui est une sous-classe de `ethereum. Call`, fournie par `@graphprotocol/graph-ts`, qui inclut les entrées et sorties saisies de l’appel. Le type `CreateGravatarCall` est généré pour vous lorsque vous exécutez `graph codegen`.
-
-## Block Handlers
-
-En plus de s'abonner à des événements de contrat ou à des appels de fonction, un subgraph peut souhaiter mettre à jour ses données à mesure que de nouveaux blocs sont ajoutés à la chaîne. Pour y parvenir, un subgraph peut exécuter une fonction après chaque bloc ou après des blocs correspondant à un filtre prédéfini.
-
-### Filtres pris en charge
-
-#### Filtre d'appel
-
-```yaml
-filter:
- kind: call
-```
-
-_Le gestionnaire défini sera appelé une fois pour chaque bloc contenant un appel au contrat (source de données) sous lequel le gestionnaire est défini._
-
-> **Remarque :** Le filtre `call` dépend actuellement de l'API de traçage de parité. Certains réseaux, tels que la chaîne BNB et Arbitrum, ne prennent pas en charge cette API. Si un subgraph indexant l'un de ces réseaux contient un ou plusieurs gestionnaires de blocs avec un filtre `call`, il ne démarrera pas la synchronisation.
-
-L'absence de filtre pour un gestionnaire de bloc garantira que le gestionnaire est appelé à chaque bloc. Une source de données ne peut contenir qu'un seul gestionnaire de bloc pour chaque type de filtre.
-
-```yaml
-dataSources:
- - kind: ethereum/contract
- name: Gravity
- network: dev
- source:
- address: '0x731a10897d267e19b34503ad902d0a29173ba4b1'
- abi: Gravity
- mapping:
- kind: ethereum/events
- apiVersion: 0.0.6
- language: wasm/assemblyscript
- entities:
- - Gravatar
- - Transaction
- abis:
- - name: Gravity
- file: ./abis/Gravity.json
- blockHandlers:
- - handler: handleBlock
- - handler: handleBlockWithCallToContract
- filter:
- kind: call
-```
-
-#### Filtre d'interrogation
-
-> **Nécessite `specVersion` >= 0.0.8**
-
-> **Remarque :** Les filtres d'interrogation ne sont disponibles que sur les sources de données de `genre : ethereum`.
-
-```yaml
-blockHandlers:
- - handler: handleBlock
- filter:
- kind: polling
- every: 10
-```
-
-Le gestionnaire défini sera appelé une fois pour tous les blocs `n`, où `n` est la valeur fournie dans le champ `every`. Cette configuration permet au sugraph d'effectuer des opérations spécifiques à intervalles réguliers.
-
-#### Le filtre Once
-
-> **Nécessite `specVersion` >= 0.0.8**
-
-> **Remarque :** Les filtres Once ne sont disponibles que sur les sources de données de `genre : Ethereum`.
-
-```yaml
-blockHandlers:
- - handler: handleOnce
- filter:
- kind: once
-```
-
-Le gestionnaire défini avec le filtre once ne sera appelé qu'une seule fois avant l'exécution de tous les autres gestionnaires. Cette configuration permet au subgraph d'utiliser le gestionnaire comme gestionnaire d'initialisation, effectuant des tâches spécifiques au début de l'indexation.
-
-```ts
-export function handleOnce(block: ethereum.Block): void {
- let data = new InitialData(Bytes.fromUTF8('initial'))
- data.data = 'Setup data here'
- data.save()
-}
-```
-
-### Fonction de cartographie
-
-La fonction de mappage recevra un `ethereum.Block` comme seul argument. Comme les fonctions de mappage pour les événements, cette fonction peut accéder aux entités de subgraphs existantes dans le magasin, appeler des contrats intelligents et créer ou mettre à jour des entités.
-
-```typescript
-import { ethereum } from '@graphprotocol/graph-ts'
-
-export function handleBlock(block: ethereum.Block): void {
- let id = block.hash
- let entity = new Block(id)
- entity.save()
-}
-```
-
-## Événements anonymes
-
-Si vous devez traiter des événements anonymes dans Solidity, cela peut être réalisé en fournissant le sujet 0 de l'événement, comme dans l'exemple :
-
-```yaml
-eventHandlers:
- - event: LogNote(bytes4,address,bytes32,bytes32,uint256,bytes)
- topic0: '0x644843f351d3fba4abcd60109eaff9f54bac8fb8ccf0bab941009c21df21cf31'
- handler: handleGive
-```
-
-Un événement ne sera déclenché que lorsque la signature et le sujet 0 correspondent. Par défaut, `topic0` est égal au hachage de la signature de l'événement.
-
-## Reçus de transaction dans les gestionnaires d'événements
-
-À partir de `specVersion` `0.0.5` et `apiVersion` `0.0.7`, les gestionnaires d'événements peuvent avoir accès au reçu du transaction qui les a émis.
-
-Pour ce faire, les gestionnaires d'événements doivent être déclarés dans le manifeste du subgraph avec la nouvelle clé `receipt: true`, qui est facultative et vaut par défaut false.
-
-```yaml
-eventHandlers:
- - event: NewGravatar(uint256,address,string,string)
- handler: handleNewGravatar
- receipt: true
-```
-
-Dans la fonction de gestionnaire, le reçu est accessible dans le champ `Event.receipt`. Lorsque la clé `receipt` est définie sur `false` ou omise dans le manifeste, une valeur `null` sera renvoyée à la place.
-
-## Fonctionnalités expérimentales
-
-À partir de `specVersion` `0.0.4`, les fonctionnalités de subgraph doivent être explicitement déclarées dans la section `features` au niveau supérieur du fichier manifeste, en utilisant leur `camelCase`, comme indiqué dans le tableau ci-dessous :
-
-| Fonctionnalité | Nom |
-| --------------------------------------------------------------- | ------------------- |
-| [Erreurs non fatales](#non-fatal-errors) | `erreursnonfatales` |
-| [Recherche en texte intégral](#defining-fulltext-search-fields) | `fullTextSearch` |
-| [La greffe](#grafting-onto-existing-subgraphs) | `grafting` |
-
-Par exemple, si un subgraph utilise les fonctionnalités **Recherche en texte intégral** et **Erreurs non fatales** features, le `features` dans le manifeste doit être :
-
-```yaml
-specVersion: 0.0.4
-description: Gravatar for Ethereum
-features:
- - fullTextSearch
- - nonFatalErrors
-dataSources: ...
-```
-
-Notez que l'utilisation d'une fonctionnalité sans la déclarer entraînera une **erreur de validation** lors du déploiement du sous-graphe, mais aucune erreur ne se produira si une fonctionnalité est déclarée mais n'est pas utilisée.
-
-### Timeseries and Aggregations
-
-Timeseries and aggregations enable your subgraph to track statistics like daily average price, hourly total transfers, etc.
-
-This feature introduces two new types of subgraph entity. Timeseries entities record data points with timestamps. Aggregation entities perform pre-declared calculations on the Timeseries data points on an hourly or daily basis, then store the results for easy access via GraphQL.
-
-#### Example Schema
-
-```graphql
-type Data @entity(timeseries: true) {
- id: Int8!
- timestamp: Timestamp!
- price: BigDecimal!
-}
-
-type Stats @aggregation(intervals: ["hour", "day"], source: "Data") {
- id: Int8!
- timestamp: Timestamp!
- sum: BigDecimal! @aggregate(fn: "sum", arg: "price")
-}
-```
-
-### Defining Timeseries and Aggregations
-
-Timeseries entities are defined with `@entity(timeseries: true)` in schema.graphql. Every timeseries entity must have a unique ID of the int8 type, a timestamp of the Timestamp type, and include data that will be used for calculation by aggregation entities. These Timeseries entities can be saved in regular trigger handlers, and act as the “raw data” for the Aggregation entities.
-
-Aggregation entities are defined with `@aggregation` in schema.graphql. Every aggregation entity defines the source from which it will gather data (which must be a Timeseries entity), sets the intervals (e.g., hour, day), and specifies the aggregation function it will use (e.g., sum, count, min, max, first, last). Aggregation entities are automatically calculated on the basis of the specified source at the end of the required interval.
-
-#### Available Aggregation Intervals
-
-- `hour`: sets the timeseries period every hour, on the hour.
-- `day`: sets the timeseries period every day, starting and ending at 00:00.
-
-#### Available Aggregation Functions
-
-- `sum`: Total of all values.
-- `count`: Number of values.
-- `min`: Minimum value.
-- `max`: Maximum value.
-- `first`: First value in the period.
-- `last`: Last value in the period.
-
-#### Example Aggregations Query
-
-```graphql
-{
- stats(interval: "hour", where: { timestamp_gt: 1704085200 }) {
- id
- timestamp
- sum
- }
-}
-```
-
-Note:
-
-To use Timeseries and Aggregations, a subgraph must have a spec version ≥1.1.0. Note that this feature might undergo significant changes that could affect backward compatibility.
-
-[Read more](https://github.com/graphprotocol/graph-node/blob/master/docs/aggregations.md) about Timeseries and Aggregations.
-
-### Erreurs non fatales
-
-Les erreurs d'indexation sur les subgraphs déjà synchronisés entraîneront, par défaut, l'échec du subgraph et l'arrêt de la synchronisation. Les subgraphs peuvent également être configurés pour continuer la synchronisation en présence d'erreurs, en ignorant les modifications apportées par le gestionnaire qui a provoqué l'erreur. Cela donne aux auteurs de subgraphs le temps de corriger leurs subgraphs pendant que les requêtes continuent d'être traitées sur le dernier bloc, bien que les résultats puissent être incohérents en raison du bogue à l'origine de l'erreur. Notez que certaines erreurs sont toujours fatales. Pour être non fatale, l'erreur doit être connue pour être déterministe.
-
-> **Remarque :** Le réseau Graph ne prend pas encore en charge les erreurs non fatales et les développeurs ne doivent pas déployer de subgraphs utilisant cette fonctionnalité sur le réseau via le Studio.
-
-L'activation des erreurs non fatales nécessite la définition de l'indicateur de fonctionnalité suivant sur le manifeste du subgraph :
-
-```yaml
-specVersion: 0.0.4
-description: Gravatar for Ethereum
-features:
- - nonFatalErrors
- ...
-```
-
-La requête doit également choisir d'interroger les données présentant des incohérences potentielles via l'argument `subgraphError`. Il est également recommandé d'interroger `_meta` pour vérifier si le subgraph a ignoré des erreurs, comme dans l'exemple :
-
-```graphql
-foos(first: 100, subgraphError: allow) {
- id
-}
-
-_meta {
- hasIndexingErrors
-}
-```
-
-Si le subgraph rencontre une erreur, cette requête renverra à la fois les données et une erreur graphql avec le message `"indexing_error"`, comme dans cet exemple de réponse :
-
-```graphql
-"data": {
- "foos": [
- {
- "id": "0xdead"
- }
- ],
- "_meta": {
- "hasIndexingErrors": true
- }
-},
-"errors": [
- {
- "message": "indexing_error"
- }
-]
-```
-
-### Greffe sur des subgraphs existants
-
-> **Remarque :** il n'est pas recommandé d'utiliser le greffage lors de la mise à niveau initiale vers The Graph Network. Apprenez-en plus [ici](/cookbook/grafting/#important-note-on-grafting-when-upgrading-to-the-network).
-
-Lorsqu'un subgraph est déployé pour la première fois, il commence à indexer les événements au niveau du bloc Genesis de la chaîne correspondante (ou au `startBlock` défini avec chaque source de données). Dans certaines circonstances ; il est avantageux de réutiliser les données d'un subgraph existant et de commencer l'indexation à un bloc beaucoup plus tard. Ce mode d'indexation est appelé _Grafting_. Le greffage est, par exemple, utile pendant le développement pour surmonter rapidement de simples erreurs dans les mappages ou pour faire fonctionner à nouveau temporairement un subgraph existant après son échec.
-
-Un subgraph est greffé sur un subgraph de base lorsque le manifeste du soubgraph dans `subgraph.yaml` contient un bloc `graft` au niveau supérieur :
-
-```yaml
-description: ...
-graft:
- base: Qm... # Subgraph ID of base subgraph
- block: 7345624 # Block number
-```
-
-Lorsqu'un subgraph dont le manifeste contient un bloc `graft` est déployé, Graph Node copiera les données du subgraph `base` jusqu'au `bloc` donné inclus. puis continuez à indexer le nouveau subgraph à partir de ce bloc. Le subgraph de base doit exister sur l'instance Graph Node cible et doit avoir été indexé jusqu'au moins au bloc donné. En raison de cette restriction, le greffage ne doit être utilisé que pendant le développement ou en cas d'urgence pour accélérer la production d'un subgraph équivalent non greffé.
-
-Étant donné que le greffage copie plutôt que l'indexation des données de base, il est beaucoup plus rapide d'amener le susgraph dans le bloc souhaité que l'indexation à partir de zéro, bien que la copie initiale des données puisse encore prendre plusieurs heures pour de très gros subgraphs. Pendant l'initialisation du subgraph greffé, le nœud graphique enregistrera des informations sur les types d'entités qui ont déjà été copiés.
-
-Le subgraph greffé peut utiliser un schéma GraphQL qui n'est pas identique à celui du subgraph de base, mais simplement compatible avec celui-ci. Il doit s'agir d'un schéma de subgraph valide à part entière, mais il peut s'écarter du schéma du subgraph de base des manières suivantes :
-
-- Il ajoute ou supprime des types d'entités
-- Il supprime les attributs des types d'entités
-- Il ajoute des attributs nullables aux types d'entités
-- Il transforme les attributs non nullables en attributs nullables
-- Il ajoute des valeurs aux énumérations
-- Il ajoute ou supprime des interfaces
-- Cela change pour quels types d'entités une interface est implémentée
-
-> **[Gestion des fonctionnalités](#experimental-features) :** le `greffage` doit être déclaré sous `features`dans le manifeste du subgraph.
-
-## IPFS/Arweave File Data Sources
-
-Les sources de données de fichiers sont une nouvelle fonctionnalité de subgraph permettant d'accéder aux données hors chaîne pendant l'indexation de manière robuste et extensible. Les sources de données de fichiers prennent en charge la récupération de fichiers depuis IPFS et Arweave.
-
-> Cela jette également les bases d’une indexation déterministe des données hors chaîne, ainsi que de l’introduction potentielle de données arbitraires provenant de HTTP.
-
-### Aperçu
-
-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.
-
-> Cela remplace l'API `ipfs.cat` existante
-
-### Guide de mise à niveau
-
-#### Mettre à jour `graph-ts` et `graph-cli`
-
-Les sources de données de fichiers nécessitent graph-ts >=0.29.0 et graph-cli >=0.33.1
-
-#### Ajouter un nouveau type d'entité qui sera mis à jour lorsque des fichiers seront trouvés
-
-Les sources de données de fichier ne peuvent pas accéder ni mettre à jour les entités basées sur une chaîne, mais doivent mettre à jour les entités spécifiques au fichier.
-
-Cela peut impliquer de diviser les champs des entités existantes en entités distinctes, liées entre elles.
-
-Entité combinée d'origine :
-
-```graphql
-type Token @entity {
- id: ID!
- tokenID: BigInt!
- tokenURI: String!
- externalURL: String!
- ipfsURI: String!
- image: String!
- name: String!
- description: String!
- type: String!
- updatedAtTimestamp: BigInt
- owner: User!
-}
-```
-
-Nouvelle entité scindée :
-
-```graphql
-type Token @entity {
- id: ID!
- tokenID: BigInt!
- tokenURI: String!
- ipfsURI: TokenMetadata
- updatedAtTimestamp: BigInt
- owner: String!
-}
-
-type TokenMetadata @entity {
- id: ID!
- image: String!
- externalURL: String!
- name: String!
- description: String!
-}
-```
-
-Si la relation est 1:1 entre l'entité parent et l'entité de source de données de fichier résultante, le modèle le plus simple consiste à lier l'entité parent à une entité de fichier résultante en utilisant le CID IPFS comme recherche. Contactez Discord si vous rencontrez des difficultés pour modéliser vos nouvelles entités basées sur des fichiers !
-
-> You can use [nested filters](/querying/graphql-api/#example-for-nested-entity-filtering) to filter parent entities on the basis of these nested entities.
-
-#### Ajoutez une nouvelle source de données modélisée avec `kind: file/ipfs` ou `kind: file/arweave`
-
-Il s'agit de la source de données qui sera générée lorsqu'un fichier d'intérêt est identifié.
-
-```yaml
-templates:
- - name: TokenMetadata
- kind: file/ipfs
- mapping:
- apiVersion: 0.0.7
- language: wasm/assemblyscript
- file: ./src/mapping.ts
- handler: handleMetadata
- entities:
- - TokenMetadata
- abis:
- - name: Token
- file: ./abis/Token.json
-```
-
-> Actuellement, les `abis` sont requis, bien qu'il ne soit pas possible d'appeler des contrats à partir de sources de données de fichiers
-
-The file data source must specifically mention all the entity types which it will interact with under `entities`. See [limitations](#limitations) for more details.
-
-#### Créer un nouveau gestionnaire pour traiter les fichiers
-
-This handler should accept one `Bytes` parameter, which will be the contents of the file, when it is found, which can then be processed. This will often be a JSON file, which can be processed with `graph-ts` helpers ([documentation](/developing/graph-ts/api/#json-api)).
-
-Le CID du fichier sous forme de chaîne lisible est accessible via `dataSource` comme suit :
-
-```typescript
-const cid = dataSource.stringParam()
-```
-
-Exemple de gestionnaire :
-
-```typescript
-import { json, Bytes, dataSource } from '@graphprotocol/graph-ts'
-import { TokenMetadata } from '../generated/schema'
-
-export function handleMetadata(content: Bytes): void {
- let tokenMetadata = new TokenMetadata(dataSource.stringParam())
- const value = json.fromBytes(content).toObject()
- if (value) {
- const image = value.get('image')
- const name = value.get('name')
- const description = value.get('description')
- const externalURL = value.get('external_url')
-
- if (name && image && description && externalURL) {
- tokenMetadata.name = name.toString()
- tokenMetadata.image = image.toString()
- tokenMetadata.externalURL = externalURL.toString()
- tokenMetadata.description = description.toString()
- }
-
- tokenMetadata.save()
- }
-}
-```
-
-#### Générer des sources de données de fichiers si nécessaire
-
-Vous pouvez désormais créer des sources de données de fichiers lors de l'exécution de gestionnaires basés sur une chaîne :
-
-- Importez le modèle à partir des `modèles` générés automatiquement
-- appeler `TemplateName.create(cid : string)` à partir d'un mappage, où le cid est un identifiant de contenu valide pour IPFS ou Arweave
-
-Pour IPFS, Graph Node prend en charge les identifiants de contenu [v0 et v1](https://docs.ipfs.tech/concepts/content-addressing/), ainsi que les identifiants de contenu avec des répertoires (par exemple `bafyreighykzv2we26wfrbzkcdw37sbrby4upq7ae3aqobbq7i4er3tnxci/metadata.json`).
-
-For Arweave, as of version 0.33.0 Graph Node can fetch files stored on Arweave based on their [transaction ID](https://docs.arweave.org/developers/arweave-node-server/http-api#transactions) from an Arweave gateway ([example file](https://bdxujjl5ev5eerd5ouhhs6o4kjrs4g6hqstzlci5pf6vhxezkgaa.arweave.net/CO9EpX0lekJEfXUOeXncUmMuG8eEp5WJHXl9U9yZUYA)). Arweave supports transactions uploaded via Irys (previously Bundlr), and Graph Node can also fetch files based on [Irys manifests](https://docs.irys.xyz/overview/gateways#indexing).
-
-Exemple:
-
-```typescript
-import { TokenMetadata as TokenMetadataTemplate } from '../generated/templates'
-
-const ipfshash = 'QmaXzZhcYnsisuue5WRdQDH6FDvqkLQX1NckLqBYeYYEfm'
-//Cet exemple de code concerne un sous-graphe de Crypto coven. Le hachage ipfs ci-dessus est un répertoire contenant les métadonnées des jetons pour toutes les NFT de l'alliance cryptographique.
-
-export function handleTransfer(event: TransferEvent): void {
- let token = Token.load(event.params.tokenId.toString())
- if (!token) {
- token = new Token(event.params.tokenId.toString())
- token.tokenID = event.params.tokenId
-
- token.tokenURI = '/' + event.params.tokenId.toString() + '.json'
- const tokenIpfsHash = ipfshash + token.tokenURI
- //Ceci crée un chemin vers les métadonnées pour un seul Crypto coven NFT. Il concatène le répertoire avec "/" + nom de fichier + ".json"
-
- token.ipfsURI = tokenIpfsHash
-
- TokenMetadataTemplate.create(tokenIpfsHash)
- }
-
- token.updatedAtTimestamp = event.block.timestamp
- token.owner = event.params.to.toHexString()
- token.save()
-}
-```
-
-Cela créera une nouvelle source de données de fichier, qui interrogera le point d'extrémité IPFS ou Arweave configuré du nœud de graphique, en réessayant si elle n'est pas trouvée. Lorsque le fichier est trouvé, le gestionnaire de la source de données de fichier est exécuté.
-
-Cet exemple utilise le CID comme recherche entre l'entité `Token` parent et l'entité `TokenMetadata` résultante.
-
-> Auparavant, c'est à ce stade qu'un développeur de subgraphs aurait appelé `ipfs.cat(CID)` pour récupérer le fichier
-
-Félicitations, vous utilisez des sources de données de fichiers !
-
-#### Déployer vos subgraphs
-
-Vous pouvez maintenant `construire` et `déployer` votre subgraph sur n'importe quel nœud de graph >=v0.30.0-rc.0.
-
-#### Limitations
-
-Les entités et les gestionnaires de sources de données de fichiers sont isolés des autres entités du subgraph, ce qui garantit que leur exécution est déterministe et qu'il n'y a pas de contamination des sources de données basées sur des chaînes. Pour être plus précis :
-
-- Les entités créées par les sources de données de fichiers sont immuables et ne peuvent pas être mises à jour
-- Les gestionnaires de sources de données de fichiers ne peuvent pas accéder à des entités provenant d'autres sources de données de fichiers
-- Les entités associées aux sources de données de fichiers ne sont pas accessibles aux gestionnaires basés sur des chaînes
-
-> Cette contrainte ne devrait pas poser de problème pour la plupart des cas d'utilisation, mais elle peut en compliquer certains. N'hésitez pas à nous contacter via Discord si vous rencontrez des problèmes pour modéliser vos données basées sur des fichiers dans un subgraph !
-
-En outre, il n'est pas possible de créer des sources de données à partir d'une source de données de fichier, qu'il s'agisse d'une source de données onchain ou d'une autre source de données de fichier. Cette restriction pourrait être levée à l'avenir.
-
-#### Meilleures pratiques
-
-Si vous liez des métadonnées NFT aux jetons correspondants, utilisez le hachage IPFS des métadonnées pour référencer une entité Metadata à partir de l'entité Token. Enregistrez l'entité Metadata en utilisant le hachage IPFS comme identifiant.
-
-You can use [DataSource context](/developing/graph-ts/api/#entity-and-datasourcecontext) when creating File Data Sources to pass extra information which will be available to the File Data Source handler.
-
-Si vous avez des entités qui sont actualisées plusieurs fois, créez des entités uniques basées sur des fichiers en utilisant le hachage & IPFS ; l'ID de l'entité, et référencez-les en utilisant un champ dérivé dans l'entité basée sur la chaîne.
-
-> Nous travaillons à l'amélioration de la recommandation ci-dessus, afin que les requêtes ne renvoient que la version "la plus récente"
-
-#### Problèmes connus
-
-Les sources de données de fichiers nécessitent actuellement des ABI, même si les ABI ne sont pas utilisées ([problème](https://github.com/graphprotocol/graph-cli/issues/961)). La solution consiste à ajouter n'importe quel ABI.
-
-Handlers for File Data Sources cannot be in files which import `eth_call` contract bindings, failing with "unknown import: `ethereum::ethereum.call` has not been defined" ([issue](https://github.com/graphprotocol/graph-node/issues/4309)). Workaround is to create file data source handlers in a dedicated file.
-
-#### Exemples
-
-[Crypto Coven Subgraph migration](https://github.com/azf20/cryptocoven-api/tree/file-data-sources-refactor)
-
-#### Les Références
-
-[Sources de données du fichier GIP](https://forum.thegraph.com/t/gip-file-data-sources/2721)
diff --git a/website/pages/fr/developing/creating-a-subgraph/_meta.js b/website/pages/fr/developing/creating-a-subgraph/_meta.js
new file mode 100644
index 000000000000..a904468b50a2
--- /dev/null
+++ b/website/pages/fr/developing/creating-a-subgraph/_meta.js
@@ -0,0 +1,5 @@
+import meta from '../../../en/developing/creating-a-subgraph/_meta.js'
+
+export default {
+ ...meta,
+}
diff --git a/website/pages/fr/developing/graph-ts/_meta.js b/website/pages/fr/developing/graph-ts/_meta.js
new file mode 100644
index 000000000000..466762da9ce8
--- /dev/null
+++ b/website/pages/fr/developing/graph-ts/_meta.js
@@ -0,0 +1,5 @@
+import meta from '../../../en/developing/graph-ts/_meta.js'
+
+export default {
+ ...meta,
+}
diff --git a/website/pages/fr/developing/unit-testing-framework.mdx b/website/pages/fr/developing/unit-testing-framework.mdx
index b3c5e2dde822..5fa8e45fb1b2 100644
--- a/website/pages/fr/developing/unit-testing-framework.mdx
+++ b/website/pages/fr/developing/unit-testing-framework.mdx
@@ -1157,7 +1157,6 @@ De même que les sources de données dynamiques de contrat, les utilisateurs peu
##### Exemple `subgraph.yaml`
```yaml
-
---
templates:
- kind: file/ipfs
diff --git a/website/pages/fr/managing/deprecate-a-subgraph.mdx b/website/pages/fr/managing/deprecate-a-subgraph.mdx
deleted file mode 100644
index 034db6a1c8ee..000000000000
--- a/website/pages/fr/managing/deprecate-a-subgraph.mdx
+++ /dev/null
@@ -1,24 +0,0 @@
----
-title: Deprecate a Subgraph
----
-
-## Deprecating a Subgraph
-
-Although you cannot delete a subgraph, you can deprecate it on Graph Explorer.
-
-### Step-by-Step
-
-To deprecate your subgraph, do the following:
-
-1. Visit the contract address for Arbitrum One subgraphs [here](https://arbiscan.io/address/0xec9A7fb6CbC2E41926127929c2dcE6e9c5D33Bec#writeProxyContract).
-2. Call `deprecateSubgraph` with your `SubgraphID` as your argument.
-3. Your subgraph will no longer appear in searches on Graph Explorer.
-
-**Please note the following:**
-
-- The owner's wallet should call the `deprecateSubgraph` function.
-- Curators will not be able to signal on the subgraph anymore.
-- Curators that already signaled on the subgraph can withdraw their signal at an average share price.
-- Deprecated subgraphs will show an error message.
-
-> If you interacted with the deprecated subgraph, you can find it in your user profile under the "Subgraphs", "Indexing", or "Curating" tab, respectively.
diff --git a/website/pages/fr/mips-faqs.mdx b/website/pages/fr/mips-faqs.mdx
deleted file mode 100644
index 7276003edb79..000000000000
--- a/website/pages/fr/mips-faqs.mdx
+++ /dev/null
@@ -1,127 +0,0 @@
----
-title: MIPs FAQs
----
-
-## Présentation
-
-> Remarque : le programme MIPs est fermé depuis mai 2023. Merci à tous les indexeurs qui ont participé !
-
-C'est une période passionnante pour participer à l'écosystème The Graph ! Lors du [Graph Day 2022](https://thegraph.com/graph-day/2022/), Yaniv Tal a annoncé la [cessation du service hébergé](https://thegraph.com/blog/sunsetting-hosted-service/), un moment vers lequel l’écosystème Graph travaille depuis de nombreuses années.
-
-Pour prendre en charge la cessation du service hébergé et la migration de toutes ses activités vers le réseau décentralisé, la Graph Foundation a annoncé le \[programme de fournisseurs d'infrastructures de migration (MIP)(https://thegraph.com/blog/mips-multi -programme-d'incitation-à-indexation-en-chaîne).
-
-Le programme MIPs est un programme d'incitation destiné aux indexeurs pour les soutenir avec des ressources pour indexer les chaînes au-delà du mainnet Ethereum et aider le protocole The Graph à étendre le réseau décentralisé en une couche d'infrastructure multi-chaînes.
-
-Le programme MIPs a alloué 0,75 % de l'offre de GRT (75 millions de GRT), dont 0,5 % pour récompenser les indexeurs qui contribuent au démarrage du réseau et 0,25 % alloués aux subventions de réseau pour les développeurs de sous-graphes utilisant des subgraphs multi-chaînes.
-
-### Ressources utiles
-
-- [Indexer 2ools from Vincent (Victor) Taglia](https://indexer-2ools.vincenttaglia.com/#/)
-- [Comment devenir un indexeur efficace sur le réseau Graph](https://thegraph.com/blog/how-to-become-indexer/)
-- [Centre de connaissances de l'indexeur](https://thegraph.academy/indexers/)
-- [Allocation Optimiser](https://github.com/graphprotocol/allocationopt.jl)
-- [Allocation Optimization Tooling](https://github.com/anyblockanalytics/thegraph-allocation-optimization/)
-
-### 1. Est-il possible de générer une preuve d'indexation (POI) valide même si un subgraph a échoué ?
-
-Oui, c'est effectivement le cas. .
-
-Pour le contexte, la charte d'arbitrage, [en savoir plus sur la charte ici](https://hackmd.io/@4Ln8SAS4RX-505bIHZTeRw/BJcHzpHDu#Abstract), précise la méthodologie de génération d'un POI pour un subgraph défaillant.
-
-Un membre de la communauté, [SunTzu](https://github.com/suntzu93), a créé un script pour automatiser ce processus conformément à la méthodologie de la charte d'arbitrage. Consultez le dépôt [ici](https://github.com/suntzu93/get_valid_poi_subgraph).
-
-### 2. Quelle chaîne le programme MIPs encouragera-t-il en premier ?
-
-La première chaîne qui sera prise en charge sur le réseau décentralisé est Gnosis Chain ! Anciennement connue sous le nom de xDAI, Gnosis Chain est une chaîne basée sur EVM. Gnosis Chain a été sélectionnée comme la première en raison de sa convivialité d'exécution des nœuds, de sa préparation à l'indexeur, de son alignement avec The Graph et de son adoption dans web3.
-
-### 3. Comment de nouvelles chaînes seront-elles ajoutées au programme MIPs ?
-
-De nouvelles chaînes seront annoncées tout au long du programme MIP, en fonction de l'état de préparation de l'indexeur, de la demande et du sentiment de la communauté. Les chaînes seront d'abord prises en charge sur le testnet et, par la suite, un GIP sera transmis pour prendre en charge cette chaîne sur le réseau principal. Les indexeurs participant au programme MIPs choisiront les chaînes qu'ils souhaitent soutenir et gagneront des récompenses par chaîne, en plus de gagner des frais de requête et des récompenses d'indexation sur le réseau pour la fourniture de subgraphs. Les participants aux MIP seront notés en fonction de leurs performances, de leur capacité à répondre aux besoins du réseau et du soutien de la communauté.
-
-### 4. Comment saurons-nous quand le réseau sera prêt pour une nouvelle chaîne ?
-
-La Graph Foundation surveillera les mesures de performances QoS, les performances du réseau et les canaux communautaires pour mieux évaluer l'état de préparation. La priorité est de garantir que le réseau répond aux besoins de performances de ces dapps multi-chaînes afin de pouvoir migrer leurs subgraphs.
-
-### La Graph Foundation surveillera les mesures de performances QoS, les performances du réseau et les canaux communautaires pour mieux évaluer l'état de préparation. La priorité est de garantir que le réseau répond aux besoins de performances de ces dapps multi-chaînes afin de pouvoir migrer leurs subgraphs?
-
-Étant donné que les chaînes varient dans leurs exigences en matière de synchronisation des nœuds, et qu'elles diffèrent en termes de volume de requêtes et d'adoption, les récompenses par chaîne seront décidées à la fin du cycle de cette chaîne pour garantir que tous les commentaires et apprentissags sont capturés. Cependant, à tout moment, les indexeurs pourront également gagner des frais de requête et des récompenses d'indexation une fois que la chaîne sera prise en charge sur le réseau.
-
-### 6. Devons-nous indexer toutes les chaînes du programme MIP ou pouvons-nous choisir une seule chaîne et l'indexer ?
-
-Vous êtes invités à indexer la chaîne de votre choix ! L'objectif du programme MIPs est de doter les indexeurs des outils et des connaissances nécessaires pour indexer les chaînes qu'ils souhaitent et prendre en charge les écosystèmes Web3 qui les intéressent. Cependant, pour chaque chaîne, il existe des phases allant du testnet au mainnet. Assurez-vous de terminer toutes les phases des chaînes que vous indexez. Voir [La page de notion MIPs](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059) pour en savoir plus sur les phases.
-
-### 7. Quand les récompenses seront-elles distribuées ?
-
-Les récompenses MIP seront distribuées par chaîne une fois que les mesures de performances seront atteintes et que les subgraphs migrés seront pris en charge par ces indexeurs. Recherchez des informations sur les récompenses totales par chaîne à mi-chemin du cycle de cette chaîne.
-
-### 8. Comment fonctionne la notation ?
-
-Les indexeurs concourront pour des récompenses basées sur leurs scores tout au long du programme dans le classement. La notation du programme sera basée sur :
-
-**Subgraph Coverage**
-
-- Are you providing maximal support for subgraphs per chain?
-
-- During MIPs, large Indexers are expected to stake 50%+ of subgraphs per chain they support.
-
-**Quality Of Service**
-
-- Is the Indexer serving the chain with good Quality of Service (latency, fresh data, uptime, etc.)?
-
-- Is the Indexer supporting dapp developers being reactive to their needs?
-
-Is Indexer allocating efficiently, contributing to the overall health of the network?
-
-**Community Support**
-
-- Is Indexer collaborating with fellow Indexers to help them get set up for multi-chain?
-
-- Is Indexer providing feedback to core devs throughout the program or sharing information with Indexers in the Forum?
-
-### 9. Comment les rôles Discord sont-ils assignés ?
-
-Les modérateurs assigneront les rôles dans les prochains jours.
-
-### 10. Est-il possible de démarrer le programme sur un réseau de test, puis de passer au réseau principal ? Serez-vous capable d'identifier mon nœud et d'en tenir compte lors de la distribution des récompenses ?
-
-Oui, c’est effectivement ce que l’on attend de vous. Plusieurs phases sont sur Görli et une sur le mainnet.
-
-### 11. À quel moment attendez-vous des participants qu'ils ajoutent un déploiement de réseau principal ?
-
-Il sera nécessaire d'avoir un indexeur de mainnet pendant la phase 3. Plus d'informations à ce sujet seront [partagées bientôt sur cette page de notion.](https://thegraphfoundation.notion.site/MIPs-Home-911e1187f1d94d12b247317265f81059)
-
-### 12. Les récompenses seront-elles soumises à des conditions d'acquisition ?
-
-Le pourcentage qui sera distribué à la fin du programme sera soumis à l'acquisition des droits. Plus d’informations à ce sujet seront partagées dans l’accord d’indexation.
-
-### 13. Pour les équipes comptant plus d'un membre, tous les membres de l'équipe se verront-ils attribuer un rôle Discord MIPs ?
-
-Oui
-
-### 14. Est-il possible d'utiliser les jetons verrouillés du programme de conservation de graphiques pour participer au testnet MIPs ?
-
-Oui
-
-### 15. Pendant le programme MIP, y aura-t-il une période pour contester les POI invalides ?
-
-Être décidé. Veuillez revenir périodiquement sur cette page pour plus de détails à ce sujet ou si votre demande est urgente, veuillez envoyer un e-mail à info@thegraph.foundation
-
-### 17. Peut-on combiner deux contrats d'acquisition progressive(vesting contracts) ?
-
-Non. Les options sont les suivantes : vous pouvez déléguer l’un à l’autre ou exécuter deux indexeurs distincts.
-
-### 18. Questions relatives au KYC ?
-
-Veuillez envoyer un e-mail à info@thegraph.foundation
-
-### 19. Je ne suis pas prêt à indexer la chaîne Gnosis, puis-je intervenir et commencer l'indexation à partir d'une autre chaîne lorsque je suis prêt ?
-
-Oui
-
-### 20. Existe-t-il des régions recommandées pour exécuter les serveurs ?
-
-Nous ne donnons pas de recommandations sur les régions. Lorsque vous choisissez des emplacements, vous voudrez peut-être réfléchir aux principaux marchés pour les crypto-monnaies.
-
-### 21. What is “handler gas cost”?
-
-C'est la mesure déterministe du coût d'exécution d'un gestionnaire. Contrairement à ce que son nom pourrait laisser penser, il n’est pas lié au coût du gaz sur les blockchains.
diff --git a/website/pages/fr/querying/_meta.js b/website/pages/fr/querying/_meta.js
index 5903eca7ce9a..e52da8f399fb 100644
--- a/website/pages/fr/querying/_meta.js
+++ b/website/pages/fr/querying/_meta.js
@@ -2,5 +2,4 @@ import meta from '../../en/querying/_meta.js'
export default {
...meta,
- 'graph-client': undefined, // Remove from sidebar, defined only for `en` language
}
diff --git a/website/pages/fr/querying/graph-client/_meta.js b/website/pages/fr/querying/graph-client/_meta.js
new file mode 100644
index 000000000000..f00c8556ac1b
--- /dev/null
+++ b/website/pages/fr/querying/graph-client/_meta.js
@@ -0,0 +1,5 @@
+import meta from '../../../en/querying/graph-client/_meta.js'
+
+export default {
+ ...meta,
+}
diff --git a/website/pages/ha/_meta.js b/website/pages/ha/_meta.js
index ac570f79abfc..f2f3b56163a5 100644
--- a/website/pages/ha/_meta.js
+++ b/website/pages/ha/_meta.js
@@ -1,5 +1,5 @@
import meta from '../en/_meta.js'
export default {
- ...structuredClone(meta),
+ ...meta,
}
diff --git a/website/pages/ha/cookbook/avoid-eth-calls.mdx b/website/pages/ha/cookbook/avoid-eth-calls.mdx
new file mode 100644
index 000000000000..25fcb8b0db9d
--- /dev/null
+++ b/website/pages/ha/cookbook/avoid-eth-calls.mdx
@@ -0,0 +1,116 @@
+---
+title: Subgraph Best Practice 4 - Improve Indexing Speed by Avoiding eth_calls
+---
+
+## TLDR
+
+`eth_calls` are calls that can be made from a subgraph to an Ethereum node. These calls take a significant amount of time to return data, slowing down indexing. If possible, design smart contracts to emit all the data you need so you don’t need to use `eth_calls`.
+
+## Why Avoiding `eth_calls` Is a Best Practice
+
+Subgraphs are optimized to index event data emitted from smart contracts. A subgraph can also index the data coming from an `eth_call`, however, this can significantly slow down subgraph indexing as `eth_calls` require making external calls to smart contracts. The responsiveness of these calls relies not on the subgraph but on the connectivity and responsiveness of the Ethereum node being queried. By minimizing or eliminating eth_calls in our subgraphs, we can significantly improve our indexing speed.
+
+### What Does an eth_call Look Like?
+
+`eth_calls` are often necessary when the data required for a subgraph is not available through emitted events. For example, consider a scenario where a subgraph needs to identify whether ERC20 tokens are part of a specific pool, but the contract only emits a basic `Transfer` event and does not emit an event that contains the data that we need:
+
+```yaml
+event Transfer(address indexed from, address indexed to, uint256 value);
+```
+
+Suppose the tokens' pool membership is determined by a state variable named `getPoolInfo`. In this case, we would need to use an `eth_call` to query this data:
+
+```typescript
+import { Address } from '@graphprotocol/graph-ts'
+import { ERC20, Transfer } from '../generated/ERC20/ERC20'
+import { TokenTransaction } from '../generated/schema'
+
+export function handleTransfer(event: Transfer): void {
+ let transaction = new TokenTransaction(event.transaction.hash.toHex())
+
+ // Bind the ERC20 contract instance to the given address:
+ let instance = ERC20.bind(event.address)
+
+ // Retrieve pool information via eth_call
+ let poolInfo = instance.getPoolInfo(event.params.to)
+
+ transaction.pool = poolInfo.toHexString()
+ transaction.from = event.params.from.toHexString()
+ transaction.to = event.params.to.toHexString()
+ transaction.value = event.params.value
+
+ transaction.save()
+}
+```
+
+This is functional, however is not ideal as it slows down our subgraph’s indexing.
+
+## How to Eliminate `eth_calls`
+
+Ideally, the smart contract should be updated to emit all necessary data within events. For instance, modifying the smart contract to include pool information in the event could eliminate the need for `eth_calls`:
+
+```
+event TransferWithPool(address indexed from, address indexed to, uint256 value, bytes32 indexed poolInfo);
+```
+
+With this update, the subgraph can directly index the required data without external calls:
+
+```typescript
+import { Address } from '@graphprotocol/graph-ts'
+import { ERC20, TransferWithPool } from '../generated/ERC20/ERC20'
+import { TokenTransaction } from '../generated/schema'
+
+export function handleTransferWithPool(event: TransferWithPool): void {
+ let transaction = new TokenTransaction(event.transaction.hash.toHex())
+
+ transaction.pool = event.params.poolInfo.toHexString()
+ transaction.from = event.params.from.toHexString()
+ transaction.to = event.params.to.toHexString()
+ transaction.value = event.params.value
+
+ transaction.save()
+}
+```
+
+This is much more performant as it has eliminated the need for `eth_calls`.
+
+## How to Optimize `eth_calls`
+
+If modifying the smart contract is not possible and `eth_calls` are required, read “[Improve Subgraph Indexing Performance Easily: Reduce eth_calls](https://thegraph.com/blog/improve-subgraph-performance-reduce-eth-calls/)” by Simon Emanuel Schmid to learn various strategies on how to optimize `eth_calls`.
+
+## Reducing the Runtime Overhead of `eth_calls`
+
+For the `eth_calls` that can not be eliminated, the runtime overhead they introduce can be minimized by declaring them in the manifest. When `graph-node` processes a block it performs all declared `eth_calls` in parallel before handlers are run. Calls that are not declared are executed sequentially when handlers run. The runtime improvement comes from performing calls in parallel rather than sequentially - that helps reduce the total time spent in calls but does not eliminate it completely.
+
+Currently, `eth_calls` can only be declared for event handlers. In the manifest, write
+
+```yaml
+event: TransferWithPool(address indexed, address indexed, uint256, bytes32 indexed)
+handler: handleTransferWithPool
+calls:
+ ERC20.poolInfo: ERC20[event.address].getPoolInfo(event.params.to)
+```
+
+The portion highlighted in yellow is the call declaration. The part before the colon is simply a text label that is only used for error messages. The part after the colon has the form `Contract[address].function(params)`. Permissible values for address and params are `event.address` and `event.params.`.
+
+The handler itself accesses the result of this `eth_call` exactly as in the previous section by binding to the contract and making the call. graph-node caches the results of declared `eth_calls` in memory and the call from the handler will retrieve the result from this in memory cache instead of making an actual RPC call.
+
+Note: Declared eth_calls can only be made in subgraphs with specVersion >= 1.2.0.
+
+## Conclusion
+
+You can significantly improve indexing performance by minimizing or eliminating `eth_calls` in your subgraphs.
+
+## Subgraph Best Practices 1-6
+
+1. [Improve Query Speed with Subgraph Pruning](/cookbook/pruning/)
+
+2. [Improve Indexing and Query Responsiveness by Using @derivedFrom](/cookbook/derivedfrom/)
+
+3. [Improve Indexing and Query Performance by Using Immutable Entities and Bytes as IDs](/cookbook/immutable-entities-bytes-as-ids/)
+
+4. [Improve Indexing Speed by Avoiding `eth_calls`](/cookbook/avoid-eth-calls/)
+
+5. [Simplify and Optimize with Timeseries and Aggregations](/cookbook/timeseries/)
+
+6. [Use Grafting for Quick Hotfix Deployment](/cookbook/grafting-hotfix/)
diff --git a/website/pages/ha/cookbook/derivedfrom.mdx b/website/pages/ha/cookbook/derivedfrom.mdx
new file mode 100644
index 000000000000..75827a185a6b
--- /dev/null
+++ b/website/pages/ha/cookbook/derivedfrom.mdx
@@ -0,0 +1,87 @@
+---
+title: Subgraph Best Practice 2 - Improve Indexing and Query Responsiveness By Using @derivedFrom
+---
+
+## TLDR
+
+Arrays in your schema can really slow down a subgraph's performance as they grow beyond thousands of entries. If possible, the `@derivedFrom` directive should be used when using arrays as it prevents large arrays from forming, simplifies handlers, and reduces the size of individual entities, improving indexing speed and query performance significantly.
+
+## How to Use the `@derivedFrom` Directive
+
+You just need to add a `@derivedFrom` directive after your array in your schema. Like this:
+
+```graphql
+comments: [Comment!]! @derivedFrom(field: "post")
+```
+
+`@derivedFrom` creates efficient one-to-many relationships, enabling an entity to dynamically associate with multiple related entities based on a field in the related entity. This approach removes the need for both sides of the relationship to store duplicate data, making the subgraph more efficient.
+
+### Example Use Case for `@derivedFrom`
+
+An example of a dynamically growing array is a blogging platform where a “Post” can have many “Comments”.
+
+Let’s start with our two entities, `Post` and `Comment`
+
+Without optimization, you could implement it like this with an array:
+
+```graphql
+type Post @entity {
+ id: Bytes!
+ title: String!
+ content: String!
+ comments: [Comment!]!
+}
+
+type Comment @entity {
+ id: Bytes!
+ content: String!
+}
+```
+
+Arrays like these will effectively store extra Comments data on the Post side of the relationship.
+
+Here’s what an optimized version looks like using `@derivedFrom`:
+
+```graphql
+type Post @entity {
+ id: Bytes!
+ title: String!
+ content: String!
+ comments: [Comment!]! @derivedFrom(field: "post")
+}
+
+type Comment @entity {
+ id: Bytes!
+ content: String!
+ post: Post!
+}
+```
+
+Just by adding the `@derivedFrom` directive, this schema will only store the “Comments” on the “Comments” side of the relationship and not on the “Post” side of the relationship. Arrays are stored across individual rows, which allows them to expand significantly. This can lead to particularly large sizes if their growth is unbounded.
+
+This will not only make our subgraph more efficient, but it will also unlock three features:
+
+1. We can query the `Post` and see all of its comments.
+2. We can do a reverse lookup and query any `Comment` and see which post it comes from.
+
+3. We can use [Derived Field Loaders](/developing/graph-ts/api/#looking-up-derived-entities) to unlock the ability to directly access and manipulate data from virtual relationships in our subgraph mappings.
+
+## Conclusion
+
+Use the `@derivedFrom` directive in subgraphs to effectively manage dynamically growing arrays, enhancing indexing efficiency and data retrieval.
+
+For a more detailed explanation of strategies to avoid large arrays, check out Kevin Jones' blog: [Best Practices in Subgraph Development: Avoiding Large Arrays](https://thegraph.com/blog/improve-subgraph-performance-avoiding-large-arrays/).
+
+## Subgraph Best Practices 1-6
+
+1. [Improve Query Speed with Subgraph Pruning](/cookbook/pruning/)
+
+2. [Improve Indexing and Query Responsiveness by Using @derivedFrom](/cookbook/derivedfrom/)
+
+3. [Improve Indexing and Query Performance by Using Immutable Entities and Bytes as IDs](/cookbook/immutable-entities-bytes-as-ids/)
+
+4. [Improve Indexing Speed by Avoiding `eth_calls`](/cookbook/avoid-eth-calls/)
+
+5. [Simplify and Optimize with Timeseries and Aggregations](/cookbook/timeseries/)
+
+6. [Use Grafting for Quick Hotfix Deployment](/cookbook/grafting-hotfix/)
diff --git a/website/pages/ha/cookbook/how-to-secure-api-keys-using-nextjs-server-components.mdx b/website/pages/ha/cookbook/how-to-secure-api-keys-using-nextjs-server-components.mdx
new file mode 100644
index 000000000000..e37d83acbe78
--- /dev/null
+++ b/website/pages/ha/cookbook/how-to-secure-api-keys-using-nextjs-server-components.mdx
@@ -0,0 +1,123 @@
+---
+title: How to Secure API Keys Using Next.js Server Components
+---
+
+## Overview
+
+We can use [Next.js server components](https://nextjs.org/docs/app/building-your-application/rendering/server-components) to properly secure our API key from exposure in the frontend of our dapp. To further increase our API key security, we can also [restrict our API key to certain subgraphs or domains in Subgraph Studio](/cookbook/upgrading-a-subgraph/#securing-your-api-key).
+
+In this cookbook, we will go over how to create a Next.js server component that queries a subgraph while also hiding the API key from the frontend.
+
+### Caveats
+
+- Next.js server components do not protect API keys from being drained using denial of service attacks.
+- The Graph Network gateways have denial of service detection and mitigation strategies in place, however using server components may weaken these protections.
+- Next.js server components introduce centralization risks as the server can go down.
+
+### Why It's Needed
+
+In a standard React application, API keys included in the frontend code can be exposed to the client-side, posing a security risk. While `.env` files are commonly used, they don't fully protect the keys since React's code is executed on the client side, exposing the API key in the headers. Next.js Server Components address this issue by handling sensitive operations server-side.
+
+### Using client-side rendering to query a subgraph
+
+
+
+### Prerequisites
+
+- An API key from [Subgraph Studio](https://thegraph.com/studio)
+- Basic knowledge of Next.js and React.
+- An existing Next.js project that uses the [App Router](https://nextjs.org/docs/app).
+
+## Step-by-Step Cookbook
+
+### Step 1: Set Up Environment Variables
+
+1. In our Next.js project root, create a `.env.local` file.
+2. Add our API key: `API_KEY=`.
+
+### Step 2: Create a Server Component
+
+1. In our `components` directory, create a new file, `ServerComponent.js`.
+2. Use the provided example code to set up the server component.
+
+### Step 3: Implement Server-Side API Request
+
+In `ServerComponent.js`, add the following code:
+
+```javascript
+const API_KEY = process.env.API_KEY
+
+export default async function ServerComponent() {
+ const response = await fetch(
+ `https://gateway-arbitrum.network.thegraph.com/api/${API_KEY}/subgraphs/id/HUZDsRpEVP2AvzDCyzDHtdc64dyDxx8FQjzsmqSg4H3B`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ query: /* GraphQL */ `
+ {
+ factories(first: 5) {
+ id
+ poolCount
+ txCount
+ totalVolumeUSD
+ }
+ }
+ `,
+ }),
+ },
+ )
+
+ const responseData = await response.json()
+ const data = responseData.data
+
+ return (
+
+ Server Component
+ {data ? (
+
+ {data.factories.map((factory) => (
+ -
+
ID: {factory.id}
+ Pool Count: {factory.poolCount}
+ Transaction Count: {factory.txCount}
+ Total Volume USD: {factory.totalVolumeUSD}
+
+ ))}
+
+ ) : (
+ Loading data...
+ )}
+
+ )
+}
+```
+
+### Step 4: Use the Server Component
+
+1. In our page file (e.g., `pages/index.js`), import `ServerComponent`.
+2. Render the component:
+
+```javascript
+import ServerComponent from './components/ServerComponent'
+
+export default function Home() {
+ return (
+
+
+
+ )
+}
+```
+
+### Step 5: Run and Test Our Dapp
+
+Start our Next.js application using `npm run dev`. Verify that the server component is fetching data without exposing the API key.
+
+
+
+### Conclusion
+
+By utilizing Next.js Server Components, we've effectively hidden the API key from the client-side, enhancing the security of our application. This method ensures that sensitive operations are handled server-side, away from potential client-side vulnerabilities. Finally, be sure to explore [other API key security measures](/cookbook/upgrading-a-subgraph/#securing-your-api-key) to increase your API key security even further.
diff --git a/website/pages/ha/cookbook/immutable-entities-bytes-as-ids.mdx b/website/pages/ha/cookbook/immutable-entities-bytes-as-ids.mdx
new file mode 100644
index 000000000000..725e53d1cf53
--- /dev/null
+++ b/website/pages/ha/cookbook/immutable-entities-bytes-as-ids.mdx
@@ -0,0 +1,190 @@
+---
+title: Subgraph Best Practice 3 - Improve Indexing and Query Performance by Using Immutable Entities and Bytes as IDs
+---
+
+## TLDR
+
+Using Immutable Entities and Bytes for IDs in our `schema.graphql` file [significantly improves ](https://thegraph.com/blog/two-simple-subgraph-performance-improvements/) indexing speed and query performance.
+
+## Immutable Entities
+
+To make an entity immutable, we simply add `(immutable: true)` to an entity.
+
+```graphql
+type Transfer @entity(immutable: true) {
+ id: Bytes!
+ from: Bytes!
+ to: Bytes!
+ value: BigInt!
+}
+```
+
+By making the `Transfer` entity immutable, graph-node is able to process the entity more efficiently, improving indexing speeds and query responsiveness.
+
+Immutable Entities structures will not change in the future. An ideal entity to become an Immutable Entity would be an entity that is directly logging on-chain event data, such as a `Transfer` event being logged as a `Transfer` entity.
+
+### Under the hood
+
+Mutable entities have a 'block range' indicating their validity. Updating these entities requires the graph node to adjust the block range of previous versions, increasing database workload. Queries also need filtering to find only live entities. Immutable entities are faster because they are all live and since they won't change, no checks or updates are required while writing, and no filtering is required during queries.
+
+### When not to use Immutable Entities
+
+If you have a field like `status` that needs to be modified over time, then you should not make the entity immutable. Otherwise, you should use immutable entities whenever possible.
+
+## Bytes as IDs
+
+Every entity requires an ID. In the previous example, we can see that the ID is already of the Bytes type.
+
+```graphql
+type Transfer @entity(immutable: true) {
+ id: Bytes!
+ from: Bytes!
+ to: Bytes!
+ value: BigInt!
+}
+```
+
+While other types for IDs are possible, such as String and Int8, it is recommended to use the Bytes type for all IDs due to character strings taking twice as much space as Byte strings to store binary data, and comparisons of UTF-8 character strings must take the locale into account which is much more expensive than the bytewise comparison used to compare Byte strings.
+
+### Reasons to Not Use Bytes as IDs
+
+1. If entity IDs must be human-readable such as auto-incremented numerical IDs or readable strings, Bytes for IDs should not be used.
+2. If integrating a subgraph’s data with another data model that does not use Bytes as IDs, Bytes as IDs should not be used.
+3. Indexing and querying performance improvements are not desired.
+
+### Concatenating With Bytes as IDs
+
+It is a common practice in many subgraphs to use string concatenation to combine two properties of an event into a single ID, such as using `event.transaction.hash.toHex() + "-" + event.logIndex.toString()`. However, as this returns a string, this significantly impedes subgraph indexing and querying performance.
+
+Instead, we should use the `concatI32()` method to concatenate event properties. This strategy results in a `Bytes` ID that is much more performant.
+
+```typescript
+export function handleTransfer(event: TransferEvent): void {
+ let entity = new Transfer(event.transaction.hash.concatI32(event.logIndex.toI32()))
+ entity.from = event.params.from
+ entity.to = event.params.to
+ entity.value = event.params.value
+
+ entity.blockNumber = event.block.number
+ entity.blockTimestamp = event.block.timestamp
+ entity.transactionHash = event.transaction.hash
+
+ entity.save()
+}
+```
+
+### Sorting With Bytes as IDs
+
+Sorting using Bytes as IDs is not optimal as seen in this example query and response.
+
+Query:
+
+```graphql
+{
+ transfers(first: 3, orderBy: id) {
+ id
+ from
+ to
+ value
+ }
+}
+```
+
+Query response:
+
+```json
+{
+ "data": {
+ "transfers": [
+ {
+ "id": "0x00010000",
+ "from": "0xabcd...",
+ "to": "0x1234...",
+ "value": "256"
+ },
+ {
+ "id": "0x00020000",
+ "from": "0xefgh...",
+ "to": "0x5678...",
+ "value": "512"
+ },
+ {
+ "id": "0x01000000",
+ "from": "0xijkl...",
+ "to": "0x9abc...",
+ "value": "1"
+ }
+ ]
+ }
+}
+```
+
+The IDs are returned as hex.
+
+To improve sorting, we should create another field on the entity that is a BigInt.
+
+```graphql
+type Transfer @entity {
+ id: Bytes!
+ from: Bytes! # address
+ to: Bytes! # address
+ value: BigInt! # unit256
+ tokenId: BigInt! # uint256
+}
+```
+
+This will allow for sorting to be optimized sequentially.
+
+Query:
+
+```graphql
+{
+ transfers(first: 3, orderBy: tokenId) {
+ id
+ tokenId
+ }
+}
+```
+
+Query Response:
+
+```json
+{
+ "data": {
+ "transfers": [
+ {
+ "id": "0x…",
+ "tokenId": "1"
+ },
+ {
+ "id": "0x…",
+ "tokenId": "2"
+ },
+ {
+ "id": "0x…",
+ "tokenId": "3"
+ }
+ ]
+ }
+}
+```
+
+## Conclusion
+
+Using both Immutable Entities and Bytes as IDs has been shown to markedly improve subgraph efficiency. Specifically, tests have highlighted up to a 28% increase in query performance and up to a 48% acceleration in indexing speeds.
+
+Read more about using Immutable Entities and Bytes as IDs in this blog post by David Lutterkort, a Software Engineer at Edge & Node: [Two Simple Subgraph Performance Improvements](https://thegraph.com/blog/two-simple-subgraph-performance-improvements/).
+
+## Subgraph Best Practices 1-6
+
+1. [Improve Query Speed with Subgraph Pruning](/cookbook/pruning/)
+
+2. [Improve Indexing and Query Responsiveness by Using @derivedFrom](/cookbook/derivedfrom/)
+
+3. [Improve Indexing and Query Performance by Using Immutable Entities and Bytes as IDs](/cookbook/immutable-entities-bytes-as-ids/)
+
+4. [Improve Indexing Speed by Avoiding `eth_calls`](/cookbook/avoid-eth-calls/)
+
+5. [Simplify and Optimize with Timeseries and Aggregations](/cookbook/timeseries/)
+
+6. [Use Grafting for Quick Hotfix Deployment](/cookbook/grafting-hotfix/)
diff --git a/website/pages/ha/cookbook/pruning.mdx b/website/pages/ha/cookbook/pruning.mdx
new file mode 100644
index 000000000000..d79d5b8911f9
--- /dev/null
+++ b/website/pages/ha/cookbook/pruning.mdx
@@ -0,0 +1,55 @@
+---
+title: Subgraph Best Practice 1 - Improve Query Speed with Subgraph Pruning
+---
+
+## TLDR
+
+[Pruning](/developing/creating-a-subgraph/#prune) removes archival entities from the subgraph’s database up to a given block, and removing unused entities from a subgraph’s database will improve a subgraph’s query performance, often dramatically. Using `indexerHints` is an easy way to prune a subgraph.
+
+## How to Prune a Subgraph With `indexerHints`
+
+Add a section called `indexerHints` in the manifest.
+
+`indexerHints` has three `prune` options:
+
+- `prune: auto`: Retains the minimum necessary history as set by the Indexer, optimizing query performance. This is the generally recommended setting and is the default for all subgraphs created by `graph-cli` >= 0.66.0.
+- `prune: `: Sets a custom limit on the number of historical blocks to retain.
+- `prune: never`: No pruning of historical data; retains the entire history and is the default if there is no `indexerHints` section. `prune: never` should be selected if [Time Travel Queries](/querying/graphql-api/#time-travel-queries) are desired.
+
+We can add `indexerHints` to our subgraphs by updating our `subgraph.yaml`:
+
+```yaml
+specVersion: 1.0.0
+schema:
+ file: ./schema.graphql
+indexerHints:
+ prune: auto
+dataSources:
+ - kind: ethereum/contract
+ name: Contract
+ network: mainnet
+```
+
+## Important Considerations
+
+- If [Time Travel Queries](/querying/graphql-api/#time-travel-queries) are desired as well as pruning, pruning must be performed accurately to retain Time Travel Query functionality. Due to this, it is generally not recommended to use `indexerHints: prune: auto` with Time Travel Queries. Instead, prune using `indexerHints: prune: ` to accurately prune to a block height that preserves the historical data required by Time Travel Queries, or use `prune: never` to maintain all data.
+
+- It is not possible to [graft](/cookbook/grafting/) at a block height that has been pruned. If grafting is routinely performed and pruning is desired, it is recommended to use `indexerHints: prune: ` that will accurately retain a set number of blocks (e.g., enough for six months).
+
+## Conclusion
+
+Pruning using `indexerHints` is a best practice for subgraph development, offering significant query performance improvements.
+
+## Subgraph Best Practices 1-6
+
+1. [Improve Query Speed with Subgraph Pruning](/cookbook/pruning/)
+
+2. [Improve Indexing and Query Responsiveness by Using @derivedFrom](/cookbook/derivedfrom/)
+
+3. [Improve Indexing and Query Performance by Using Immutable Entities and Bytes as IDs](/cookbook/immutable-entities-bytes-as-ids/)
+
+4. [Improve Indexing Speed by Avoiding `eth_calls`](/cookbook/avoid-eth-calls/)
+
+5. [Simplify and Optimize with Timeseries and Aggregations](/cookbook/timeseries/)
+
+6. [Use Grafting for Quick Hotfix Deployment](/cookbook/grafting-hotfix/)
diff --git a/website/pages/ha/deploying/deploying-a-subgraph-to-hosted.mdx b/website/pages/ha/deploying/deploying-a-subgraph-to-hosted.mdx
deleted file mode 100644
index d1bf3919519d..000000000000
--- a/website/pages/ha/deploying/deploying-a-subgraph-to-hosted.mdx
+++ /dev/null
@@ -1,291 +0,0 @@
----
-title: Deploying a Subgraph to the Hosted Service
----
-
-> If a network is not supported on the Hosted Service, you can run your own [graph-node](https://github.com/graphprotocol/graph-node) to index it.
-
-This page explains how to deploy a subgraph to the Hosted Service. To deploy a subgraph you need to first install the [Graph CLI](https://github.com/graphprotocol/graph-cli). If you have not created a subgraph already, see [creating a subgraph](/developing/creating-a-subgraph).
-
-## Create a Hosted Service account
-
-Before using the Hosted Service, create an account in our Hosted Service. You will need a [Github](https://github.com/) account for that; if you don't have one, you need to create that first. Then, navigate to the [Hosted Service](https://thegraph.com/hosted-service/), click on the _'Sign up with Github'_ button, and complete Github's authorization flow.
-
-## Store the Access Token
-
-After creating an account, navigate to your [dashboard](https://thegraph.com/hosted-service/dashboard). Copy the access token displayed on the dashboard and run `graph auth --product hosted-service `. This will store the access token on your computer. You only need to do this once, or if you ever regenerate the access token.
-
-## Create a Subgraph on the Hosted Service
-
-Before deploying the subgraph, you need to create it in The Graph Explorer. Go to the [dashboard](https://thegraph.com/hosted-service/dashboard) and click on the _'Add Subgraph'_ button and fill in the information below as appropriate:
-
-**Image** - Select an image to be used as a preview image and thumbnail for the subgraph.
-
-**Subgraph Name** - Together with the account name that the subgraph is created under, this will also define the `account-name/subgraph-name`-style name used for deployments and GraphQL endpoints. _This field cannot be changed later._
-
-**Account** - The account that the subgraph is created under. This can be the account of an individual or organization. _Subgraphs cannot be moved between accounts later._
-
-**Subtitle** - Text that will appear in subgraph cards.
-
-**Description** - Description of the subgraph, visible on the subgraph details page.
-
-**GitHub URL** - Link to the subgraph repository on GitHub.
-
-**Hide** - Switching this on hides the subgraph in the Graph Explorer.
-
-After saving the new subgraph, you are shown a screen with help on how to install the Graph CLI, how to generate the scaffolding for a new subgraph, and how to deploy your subgraph. The first two steps were covered in the [Defining a Subgraph section](/developing/defining-a-subgraph).
-
-## Deploy a Subgraph on the Hosted Service
-
-Deploying your subgraph will upload the subgraph files that you've built with `yarn build` to IPFS and tell the Graph Explorer to start indexing your subgraph using these files.
-
-You deploy the subgraph by running `yarn deploy`
-
-After deploying the subgraph, the Graph Explorer will switch to showing the synchronization status of your subgraph. Depending on the amount of data and the number of events that need to be extracted from historical blocks, starting with the genesis block, syncing can take from a few minutes to several hours.
-
-The subgraph status switches to `Synced` once the Graph Node has extracted all data from historical blocks. The Graph Node will continue inspecting blocks for your subgraph as these blocks are mined.
-
-## Redeploying a Subgraph
-
-When making changes to your subgraph definition, for example, to fix a problem in the entity mappings, run the `yarn deploy` command above again to deploy the updated version of your subgraph. Any update of a subgraph requires that Graph Node reindexes your entire subgraph, again starting with the genesis block.
-
-If your previously deployed subgraph is still in status `Syncing`, it will be immediately replaced with the newly deployed version. If the previously deployed subgraph is already fully synced, Graph Node will mark the newly deployed version as the `Pending Version`, sync it in the background, and only replace the currently deployed version with the new one once syncing the new version has finished. This ensures that you have a subgraph to work with while the new version is syncing.
-
-## Deploying the subgraph to multiple networks
-
-In some cases, you will want to deploy the same subgraph to multiple networks without duplicating all of its code. The main challenge that comes with this is that the contract addresses on these networks are different.
-
-### Using graph-cli
-
-Both `graph build` (since `v0.29.0`) and `graph deploy` (since `v0.32.0`) accept two new options:
-
-```sh
-Options:
-
- ...
- --network Network configuration to use from the networks config file
- --network-file Networks config file path (default: "./networks.json")
-```
-
-You can use the `--network` option to specify a network configuration from a `json` standard file (defaults to `networks.json`) to easily update your subgraph during development.
-
-**Note:** The `init` command will now auto-generate a `networks.json` based on the provided information. You will then be able to update existing or add additional networks.
-
-If you don't have a `networks.json` file, you'll need to manually create one with the following structure:
-
-```json
-{
- "network1": { // the network name
- "dataSource1": { // the dataSource name
- "address": "0xabc...", // the contract address (optional)
- "startBlock": 123456 // the startBlock (optional)
- },
- "dataSource2": {
- "address": "0x123...",
- "startBlock": 123444
- }
- },
- "network2": {
- "dataSource1": {
- "address": "0x987...",
- "startBlock": 123
- },
- "dataSource2": {
- "address": "0xxyz..",
- "startBlock": 456
- }
- },
- ...
-}
-```
-
-**Note:** You don't have to specify any of the `templates` (if you have any) in the config file, only the `dataSources`. If there are any `templates` declared in the `subgraph.yaml` file, their network will be automatically updated to the one specified with the `--network` option.
-
-Now, let's assume you want to be able to deploy your subgraph to the `mainnet` and `sepolia` networks, and this is your `subgraph.yaml`:
-
-```yaml
-# ...
-dataSources:
- - kind: ethereum/contract
- name: Gravity
- network: mainnet
- source:
- address: '0x123...'
- abi: Gravity
- mapping:
- kind: ethereum/events
-```
-
-This is what your networks config file should look like:
-
-```json
-{
- "mainnet": {
- "Gravity": {
- "address": "0x123..."
- }
- },
- "sepolia": {
- "Gravity": {
- "address": "0xabc..."
- }
- }
-}
-```
-
-Now we can run one of the following commands:
-
-```sh
-# Using default networks.json file
-yarn build --network sepolia
-
-# Using custom named file
-yarn build --network sepolia --network-file path/to/config
-```
-
-The `build` command will update your `subgraph.yaml` with the `sepolia` configuration and then re-compile the subgraph. Your `subgraph.yaml` file now should look like this:
-
-```yaml
-# ...
-dataSources:
- - kind: ethereum/contract
- name: Gravity
- network: sepolia
- source:
- address: '0xabc...'
- abi: Gravity
- mapping:
- kind: ethereum/events
-```
-
-Now you are ready to `yarn deploy`.
-
-**Note:** As mentioned earlier, since `graph-cli 0.32.0` you can directly run `yarn deploy` with the `--network` option:
-
-```sh
-# Using default networks.json file
-yarn deploy --network sepolia
-
-# Using custom named file
-yarn deploy --network sepolia --network-file path/to/config
-```
-
-### Using subgraph.yaml template
-
-One solution for older graph-cli versions that allows to parameterize aspects like contract addresses is to generate parts of it using a templating system like [Mustache](https://mustache.github.io/) or [Handlebars](https://handlebarsjs.com/).
-
-To illustrate this approach, let's assume a subgraph should be deployed to mainnet and Sepolia using different contract addresses. You could then define two config files providing the addresses for each network:
-
-```json
-{
- "network": "mainnet",
- "address": "0x123..."
-}
-```
-
-and
-
-```json
-{
- "network": "sepolia",
- "address": "0xabc..."
-}
-```
-
-Along with that, you would substitute the network name and addresses in the manifest with variable placeholders `{{network}}` and `{{address}}` and rename the manifest to e.g. `subgraph.template.yaml`:
-
-```yaml
-# ...
-dataSources:
- - kind: ethereum/contract
- name: Gravity
- network: mainnet
- network: {{network}}
- source:
- address: '0x2E645469f354BB4F5c8a05B3b30A929361cf77eC'
- address: '{{address}}'
- abi: Gravity
- mapping:
- kind: ethereum/events
-```
-
-In order to generate a manifest to either network, you could add two additional commands to `package.json` along with a dependency on `mustache`:
-
-```json
-{
- ...
- "scripts": {
- ...
- "prepare:mainnet": "mustache config/mainnet.json subgraph.template.yaml > subgraph.yaml",
- "prepare:sepolia": "mustache config/sepolia.json subgraph.template.yaml > subgraph.yaml"
- },
- "devDependencies": {
- ...
- "mustache": "^3.1.0"
- }
-}
-```
-
-To deploy this subgraph for mainnet or Sepolia you would now simply run one of the two following commands:
-
-```sh
-# Mainnet:
-yarn prepare:mainnet && yarn deploy
-
-# Sepolia:
-yarn prepare:sepolia && yarn deploy
-```
-
-A working example of this can be found [here](https://github.com/graphprotocol/example-subgraph/tree/371232cf68e6d814facf5e5413ad0fef65144759).
-
-**Note:** This approach can also be applied to more complex situations, where it is necessary to substitute more than contract addresses and network names or where generating mappings or ABIs from templates as well.
-
-## Checking subgraph health
-
-If a subgraph syncs successfully, that is a good sign that it will continue to run well forever. However, new triggers on the network might cause your subgraph to hit an untested error condition or it may start to fall behind due to performance issues or issues with the node operators.
-
-Graph Node exposes a graphql endpoint which you can query to check the status of your subgraph. On the Hosted Service, it is available at `https://api.thegraph.com/index-node/graphql`. On a local node, it is available on port `8030/graphql` by default. The full schema for this endpoint can be found [here](https://github.com/graphprotocol/graph-node/blob/master/server/index-node/src/schema.graphql). Here is an example query that checks the status of the current version of a subgraph:
-
-```graphql
-{
- indexingStatusForCurrentVersion(subgraphName: "org/subgraph") {
- synced
- health
- fatalError {
- message
- block {
- number
- hash
- }
- handler
- }
- chains {
- chainHeadBlock {
- number
- }
- latestBlock {
- number
- }
- }
- }
-}
-```
-
-This will give you the `chainHeadBlock` which you can compare with the `latestBlock` on your subgraph to check if it is running behind. `synced` informs if the subgraph has ever caught up to the chain. `health` can currently take the values of `healthy` if no errors occurred, or `failed` if there was an error which halted the progress of the subgraph. In this case, you can check the `fatalError` field for details on this error.
-
-## Hosted service subgraph archive policy
-
-The Hosted Service is a free Graph Node Indexer. Developers can deploy subgraphs indexing a range of networks, which will be indexed, and made available to query via graphQL.
-
-To improve the performance of the service for active subgraphs, the Hosted Service will archive subgraphs that are inactive.
-
-**A subgraph is defined as "inactive" if it was deployed to the Hosted Service more than 45 days ago, and if it has received 0 queries in the last 45 days.**
-
-Developers will be notified by email if one of their subgraphs has been marked as inactive 7 days before it is removed. If they wish to "activate" their subgraph, they can do so by making a query in their subgraph's Hosted Service graphQL playground. Developers can always redeploy an archived subgraph if it is required again.
-
-## Subgraph Studio subgraph archive policy
-
-When a new version of a subgraph is deployed, the previous version is archived (deleted from the graph-node DB). This only happens if the previous version is not published to The Graph's decentralized network.
-
-When a subgraph version isn’t queried for over 45 days, that version is archived.
-
-Every subgraph affected with this policy has an option to bring the version in question back.
diff --git a/website/pages/ha/deploying/deploying-a-subgraph-to-studio.mdx b/website/pages/ha/deploying/deploying-a-subgraph-to-studio.mdx
deleted file mode 100644
index d6f0f891c6cc..000000000000
--- a/website/pages/ha/deploying/deploying-a-subgraph-to-studio.mdx
+++ /dev/null
@@ -1,70 +0,0 @@
----
-title: Deploying a Subgraph to the Subgraph Studio
----
-
-> Learn how you can deploy non rate-limited subgraphs to Subgraph Studio [here](https://www.notion.so/edgeandnode/The-Graph-Subgraph-Studio-Non-Rate-Limited-Chain-Integration-889fe061ee6b4423a7f8e2c8070b9294).
-
-These are the steps to deploy your subgraph to the Subgraph Studio:
-
-- Install The Graph CLI (with either yarn or npm)
-- Create your Subgraph in the Subgraph Studio
-- Authenticate your account from the CLI
-- Deploying a Subgraph to the Subgraph Studio
-
-## Installing Graph CLI
-
-We are using the same CLI to deploy subgraphs to our [hosted service](https://thegraph.com/hosted-service/) and to the [Subgraph Studio](https://thegraph.com/studio/). Here are the commands to install graph-cli. This can be done using npm or yarn.
-
-**Install with yarn:**
-
-```bash
-yarn global add @graphprotocol/graph-cli
-```
-
-**Install with npm:**
-
-```bash
-npm install -g @graphprotocol/graph-cli
-```
-
-## Create your Subgraph in Subgraph Studio
-
-Before deploying your actual subgraph you need to create a subgraph in [Subgraph Studio](https://thegraph.com/studio/). We recommend you read our [Studio documentation](/deploying/subgraph-studio) to learn more about this.
-
-## Initialize your Subgraph
-
-Once your subgraph has been created in Subgraph Studio you can initialize the subgraph code using this command:
-
-```bash
-graph init --studio
-```
-
-The `` value can be found on your subgraph details page in Subgraph Studio:
-
-
-
-After running `graph init`, you will be asked to input the contract address, network, and ABI that you want to query. Doing this will generate a new folder on your local machine with some basic code to start working on your subgraph. You can then finalize your subgraph to make sure it works as expected.
-
-## Graph Auth
-
-Before being able to deploy your subgraph to Subgraph Studio, you need to login into your account within the CLI. To do this, you will need your deploy key that you can find on your "My Subgraphs" page or your subgraph details page.
-
-Here is the command that you need to use to authenticate from the CLI:
-
-```bash
-graph auth --studio
-```
-
-## Deploying a Subgraph to Subgraph Studio
-
-Once you are ready, you can deploy your subgraph to Subgraph Studio. Doing this won't publish your subgraph to the decentralized network, it will only deploy it to your Studio account where you will be able to test it and update the metadata.
-
-Here is the CLI command that you need to use to deploy your subgraph.
-
-```bash
-graph deploy --studio
-```
-
-After running this command, the CLI will ask for a version label, you can name it however you want, you can use labels such as `0.1` and `0.2` or use letters as well such as `uniswap-v2-0.1`. Those labels will be visible in Graph Explorer and can be used by curators to decide if they want to signal on this version or not, so choose them wisely.
-
-Once deployed, you can test your subgraph in Subgraph Studio using the playground, deploy another version if needed, update the metadata, and when you are ready, publish your subgraph to Graph Explorer.
diff --git a/website/pages/ha/deploying/hosted-service.mdx b/website/pages/ha/deploying/hosted-service.mdx
deleted file mode 100644
index 3b65cfbccdf0..000000000000
--- a/website/pages/ha/deploying/hosted-service.mdx
+++ /dev/null
@@ -1,62 +0,0 @@
----
-title: What is the Hosted Service?
----
-
-> Please note, the hosted service will begin sunsetting in 2023, but it will remain available to networks that are not supported on the decentralized network. Developers are encouraged to [upgrade their subgraphs to The Graph Network](/cookbook/upgrading-a-subgraph) as more networks are supported. Each network will have their hosted service equivalents gradually sunset to ensure developers have enough time to upgrade subgraphs to the decentralized network. Read more about the sunsetting of the hosted service [here](https://thegraph.com/blog/sunsetting-hosted-service).
-
-This section will walk you through deploying a subgraph to the [hosted service](https://thegraph.com/hosted-service/).
-
-If you don't have an account on the hosted service, you can sign up with your GitHub account. Once you authenticate, you can start creating subgraphs through the UI and deploying them from your terminal. The hosted service supports a number of networks, such as Polygon, Gnosis Chain, BNB Chain, Optimism, Arbitrum, and more.
-
-For a comprehensive list, see [Supported Networks](/developing/supported-networks/#hosted-service).
-
-## Create a Subgraph
-
-First follow the instructions [here](/developing/defining-a-subgraph) to install the Graph CLI. Create a subgraph by passing in `graph init --product hosted-service`
-
-### From an Existing Contract
-
-If you already have a smart contract deployed to your network of choice, bootstrapping a new subgraph from this contract can be a good way to get started on the hosted service.
-
-You can use this command to create a subgraph that indexes all events from an existing contract. This will attempt to fetch the contract ABI from [Etherscan](https://etherscan.io/).
-
-```sh
-graph init \
- --product hosted-service
- --from-contract \
- / []
-```
-
-Additionally, you can use the following optional arguments. If the ABI cannot be fetched from Etherscan, it falls back to requesting a local file path. If any optional arguments are missing from the command, it takes you through an interactive form.
-
-```sh
---network \
---abi \
-```
-
-The `` in this case is your GitHub user or organization name, `` is the name for your subgraph, and `` is the optional name of the directory where `graph init` will put the example subgraph manifest. The `` is the address of your existing contract. `` is the name of the network that the contract lives on. `` is a local path to a contract ABI file. **Both `--network` and `--abi` are optional.**
-
-### From an Example Subgraph
-
-The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this:
-
-```
-graph init --from-example --product hosted-service / []
-```
-
-The example subgraph is based on the Gravity contract by Dani Grant that manages user avatars and emits `NewGravatar` or `UpdateGravatar` events whenever avatars are created or updated. The subgraph handles these events by writing `Gravatar` entities to the Graph Node store and ensuring these are updated according to the events. Continue on to the [subgraph manifest](/developing/creating-a-subgraph#the-subgraph-manifest) to better understand which events from your smart contracts to pay attention to, mappings, and more.
-
-### From a Proxy Contract
-
-To build a subgraph tailored for monitoring a Proxy contract, initialize the subgraph by specifying the address of the implementation contract. Once the initialization process is concluded, the last step involves updating the network name in the subgraph.yaml file to the address of the Proxy contract. You can use the command below.
-
-```sh
-graph init \
- --product hosted-service
- --from-contract \
- / []
-```
-
-## Supported Networks on the hosted service
-
-You can find the list of the supported networks [Here](/developing/supported-networks).
diff --git a/website/pages/ha/deploying/subgraph-studio.mdx b/website/pages/ha/deploying/subgraph-studio.mdx
deleted file mode 100644
index 5925b2a1dfb9..000000000000
--- a/website/pages/ha/deploying/subgraph-studio.mdx
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: How to Use the Subgraph Studio
----
-
-Welcome to your new launchpad 👩🏽🚀
-
-The Subgraph Studio is your place to build and create subgraphs, add metadata, and publish them to the new decentralized Explorer (more on that [here](/network/explorer)).
-
-What you can do in the Subgraph Studio:
-
-- Create a subgraph through the Studio UI
-- Deploy a subgraph using the CLI
-- Publish a subgraph with the Studio UI
-- Test it in the playground
-- Integrate it in staging using the query URL
-- Create and manage your API keys for specific subgraphs
-
-Here in the Subgraph Studio, you have full control over your subgraphs. Not only can you test your subgraphs before you publish them, but you can also restrict your API keys to specific domains and only allow certain Indexers to query from their API keys.
-
-Querying subgraphs generates query fees, used to reward [Indexers](/network/indexing) on the Graph network. If you’re a dapp developer or subgraph developer, the Studio will empower you to build better subgraphs to power your or your community’s queries. The Studio is comprised of 5 main parts:
-
-- Your user account controls
-- A list of subgraphs that you’ve created
-- A section to manage, view details and visualize the status of a specific subgraph
-- A section to manage your API keys that you will need to query a subgraph
-- A section to manage your billing
-
-## How to Create Your Account
-
-1. Sign in with your wallet - you can do this via MetaMask or WalletConnect
-1. Once you sign in, you will see your unique deploy key on your account home page. This will allow you to either publish your subgraphs or manage your API keys + billing. You will have a unique deploy key that can be re-generated if you think it has been compromised.
-
-## How to Create a Subgraph in Subgraph Studio
-
-
-
-## Subgraph Compatibility with The Graph Network
-
-The Graph Network is not yet able to support all of the data-sources & features available on the Hosted Service. In order to be supported by Indexers on the network, subgraphs must:
-
-- Index a [supported network](/developing/supported-networks)
-- Must not use any of the following features:
- - ipfs.cat & ipfs.map
- - Non-fatal errors
- - Grafting
-
-More features & networks will be added to The Graph Network incrementally.
-
-### Subgraph lifecycle flow
-
-
-
-After you have created your subgraph, you will be able to deploy it using the [CLI](https://github.com/graphprotocol/graph-cli), or command-line interface. Deploying a subgraph with the CLI will push the subgraph to the Studio where you’ll be able to test subgraphs using the playground. This will eventually allow you to publish to the Graph Network. For more information on CLI setup, [check this out](/developing/defining-a-subgraph#install-the-graph-cli) (pst, make sure you have your deploy key on hand). Remember, deploying is **not the same as** publishing. When you deploy a subgraph, you just push it to the Studio where you’re able to test it. Versus, when you publish a subgraph, you are publishing it on-chain.
-
-## Testing your Subgraph in Subgraph Studio
-
-If you’d like to test your subgraph before publishing it to the network, you can do this in the Subgraph **Playground** or look at your logs. The Subgraph logs will tell you **where** your subgraph fails in the case that it does.
-
-## Publish your Subgraph in Subgraph Studio
-
-You’ve made it this far - congrats!
-
-In order to publish your subgraph successfully, you’ll need to go through the following steps outlined in this [blog](https://thegraph.com/blog/building-with-subgraph-studio).
-
-Check out the video overview below as well:
-
-
-
-Remember, while you’re going through your publishing flow, you’ll be able to push to either mainnet or Sepolia. If you’re a first-time subgraph developer, we highly suggest you start with publishing to Sepolia, which is free to do. This will allow you to see how the subgraph will work in The Graph Explorer and will allow you to test curation elements.
-
-Indexers need to submit mandatory Proof of Indexing records as of a specific block hash. Because publishing a subgraph is an action taken on-chain, remember that the transaction can take up to a few minutes to go through. Any address you use to publish the contract will be the only one able to publish future versions. Choose wisely!
-
-Subgraphs with curation signal are shown to Indexers so that they can be indexed on the decentralized network. You can publish subgraphs and signal in one transaction, which allows you to mint the first curation signal on the subgraph and saves on gas costs. By adding your signal to the signal later provided by Curators, your subgraph will also have a higher chance of ultimately serving queries.
-
-**Now that you’ve published your subgraph, let’s get into how you’ll manage them on a regular basis.** Note that you cannot publish your subgraph to the network if it has failed syncing. This is usually because the subgraph has bugs - the logs will tell you where those issues exist!
-
-## Versioning your Subgraph with the CLI
-
-Developers might want to update their subgraph, for a variety of reasons. When this is the case, you can deploy a new version of your subgraph to the Studio using the CLI (it will only be private at this point) and if you are happy with it, you can publish this new deployment to The Graph Explorer. This will create a new version of your subgraph that curators can start signaling on and Indexers will be able to index this new version.
-
-Up until recently, developers were forced to deploy and publish a new version of their subgraph to the Explorer to update the metadata of their subgraphs. Now, developers can update the metadata of their subgraphs **without having to publish a new version**. Developers can update their subgraph details in the Studio (under the profile picture, name, description, etc) by checking an option called **Update Details** in The Graph Explorer. If this is checked, an on-chain transaction will be generated that updates subgraph details in the Explorer without having to publish a new version with a new deployment.
-
-Please note that there are costs associated with publishing a new version of a subgraph to the network. In addition to the transaction fees, developers must also fund a part of the curation tax on the auto-migrating signal. You cannot publish a new version of your subgraph if curators have not signaled on it. For more information on the risks of curation, please read more [here](/network/curating).
-
-### Automatic Archiving of Subgraph Versions
-
-Whenever you deploy a new subgraph version in the Subgraph Studio, the previous version will be archived. Archived versions won't be indexed/synced and therefore cannot be queried. You can unarchive an archived version of your subgraph in the Studio UI. Please note that previous versions of non-published subgraphs deployed to the Studio will be automatically archived.
-
-
diff --git a/website/pages/ha/developing/creating-a-subgraph.mdx b/website/pages/ha/developing/creating-a-subgraph.mdx
deleted file mode 100644
index f1c00d1b6646..000000000000
--- a/website/pages/ha/developing/creating-a-subgraph.mdx
+++ /dev/null
@@ -1,1236 +0,0 @@
----
-title: Creating a Subgraph
----
-
-A subgraph extracts data from a blockchain, processing it and storing it so that it can be easily queried via GraphQL.
-
-
-
-The subgraph definition consists of a few files:
-
-- `subgraph.yaml`: a YAML file containing the subgraph manifest
-
-- `schema.graphql`: a GraphQL schema that defines what data is stored for your subgraph, and how to query it via GraphQL
-
-- `AssemblyScript Mappings`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) code that translates from the event data to the entities defined in your schema (e.g. `mapping.ts` in this tutorial)
-
-> In order to use your subgraph on The Graph's decentralized network, you will need to [create an API key](/deploying/subgraph-studio-faqs/#2-how-do-i-create-an-api-key). It is recommended that you [add signal](/network/curating/#how-to-signal) to your subgraph with at least [10,000 GRT](/network-transition-faq/#how-can-i-ensure-that-my-subgraph-will-be-picked-up-by-indexer-on-the-graph-network).
-
-Before you go into detail about the contents of the manifest file, you need to install the [Graph CLI](https://github.com/graphprotocol/graph-cli) which you will need to build and deploy a subgraph.
-
-## Install the Graph CLI
-
-The Graph CLI is written in JavaScript, and you will need to install either `yarn` or `npm` to use it; it is assumed that you have yarn in what follows.
-
-Once you have `yarn`, install the Graph CLI by running
-
-**Install with yarn:**
-
-```bash
-yarn global add @graphprotocol/graph-cli
-```
-
-**Install with npm:**
-
-```bash
-npm install -g @graphprotocol/graph-cli
-```
-
-Once installed, the `graph init` command can be used to set up a new subgraph project, either from an existing contract or from an example subgraph. This command can be used to create a subgraph on the Subgraph Studio by passing in `graph init --product subgraph-studio`. If you already have a smart contract deployed to your preferred network, bootstrapping a new subgraph from that contract can be a good way to get started.
-
-## From An Existing Contract
-
-The following command creates a subgraph that indexes all events of an existing contract. It attempts to fetch the contract ABI from Etherscan and falls back to requesting a local file path. If any of the optional arguments are missing, it takes you through an interactive form.
-
-```sh
-graph init \
- --product subgraph-studio
- --from-contract \
- [--network ] \
- [--abi ] \
- []
-```
-
-The `` is the ID of your subgraph in Subgraph Studio, it can be found on your subgraph details page.
-
-## From An Example Subgraph
-
-The second mode `graph init` supports is creating a new project from an example subgraph. The following command does this:
-
-```sh
-graph init --studio
-```
-
-The example subgraph is based on the Gravity contract by Dani Grant that manages user avatars and emits `NewGravatar` or `UpdateGravatar` events whenever avatars are created or updated. The subgraph handles these events by writing `Gravatar` entities to the Graph Node store and ensuring these are updated according to the events. The following sections will go over the files that make up the subgraph manifest for this example.
-
-## Add New dataSources To An Existing Subgraph
-
-Since `v0.31.0` the `graph-cli` supports adding new dataSources to an existing subgraph through the `graph add` command.
-
-```sh
-graph add []
-
-Options:
-
- --abi Path to the contract ABI (default: download from Etherscan)
- --contract-name Name of the contract (default: Contract)
- --merge-entities Whether to merge entities with the same name (default: false)
- --network-file